Contents · Linear Algebra
Part 0 · Orientation
Part 1 · Vectors & Spaces
Part 2 · Matrices as Maps
Part 3 · Solving Systems
Part 4 · Orthogonality
Part 5 · Eigenvalues
Part 6 · Singular Value Decomposition
Part 7 · Spectral & Positive Definite
- Symmetric Matrices, the Spectral Theorem, and Positive Definiteness
Part 8 · Numerical Linear Algebra
Part 7 · Spectral & Positive Definite
Symmetric Matrices, the Spectral Theorem, and Positive Definiteness
Among all square matrices, the symmetric ones, , have the cleanest structure of all. Their eigenvalues are real, their eigenvectors can be chosen orthonormal, and the whole matrix factors into a rotation times a diagonal stretch times the inverse rotation. This is not a curiosity: mass matrices, covariance matrices, graph Laplacians, and every product are symmetric, so the theory below is the theory of most matrices that arise from real problems.
The spectral theorem
If is real and , then it has an orthonormal basis of eigenvectors with real eigenvalues. Equivalently, there is an orthogonal (so ) and a diagonal with
The eigenvalues are real because for an eigenpair with ,
Eigenvectors of distinct eigenvalues are orthogonal, since
So acts by resolving any into the orthonormal directions and scaling each by . Nothing rotates into anything else.
Quadratic forms measure curvature
Attach to the scalar function
its quadratic form. Substituting the spectral factorization and setting (an orthonormal change of coordinates, so ) diagonalizes it completely:
In the eigenbasis the form is just a weighted sum of squares. Its sign is therefore dictated entirely by the signs of the eigenvalues: curves upward along a with and downward where .
Positive definiteness, four ways
is positive definite when for every . For a symmetric the following are equivalent, and each is a usable test.1
The eigenvalue test is immediate from . The pivot test reads the diagonal of elimination ( has ). The minor test is Sylvester's criterion: the determinants of the top-left blocks are all positive. Geometrically, positive definite means the level sets are ellipsoids around a single minimum: the graph is a bowl. If the eigenvalues have mixed signs the matrix is indefinite and the graph is a saddle; if some vanish it is only semidefinite, with flat directions.
A clean consequence: is positive definite exactly when it has a Cholesky factorization with lower triangular and positive diagonal, which is elimination specialized to the symmetric positive definite case and the workhorse for solving in practice.2
- A
- [2.0 1.0 ; 1.0 2.0]
- λ₁ (larger)
- 3.00
- λ₂ (smaller)
- 1.00
- minor d₁ = a
- 2.00
- minor d₂ = det
- 4.00 − 1.00 = 3.00
classification: positive definite
A worked example
Take
The eigenvalues of a symmetric are
both positive, so is positive definite. The other three tests agree. The leading principal minors are
and elimination gives pivots and , both positive. The eigenvectors are for and for , orthogonal as promised, so
a bowl steeper along than along . Contrast this with
whose eigenvalues have opposite signs. Here already fails Sylvester's test, and is a saddle: positive on the diagonal , negative on the anti-diagonal.
Why this matters
The forms that show up in simulation and estimation are symmetric by construction, so definiteness is the property that decides whether they behave. The joint-space mass matrix is symmetric positive definite because kinetic energy is positive for any nonzero motion, which is exactly what lets forward dynamics solve by Cholesky. Any Gram matrix is symmetric positive semidefinite, and positive definite precisely when has full column rank, which is what makes the normal equations of least squares solvable. And a critical point of a smooth function is a strict minimum exactly when its Hessian is positive definite: the same curvature test, one dimension at a time.