Positive-Definite Matrices
Among all symmetric matrices, one family is the gold standard: the
positive-definite ones. A symmetric matrix
M is positive-definite when its
quadratic form
is strictly positive for every non-zero vector:
\vec{x}^{\mathsf{T}} M\, \vec{x} > 0 \quad\text{for all } \vec{x} \neq \vec{0}.
Geometrically the form is a perfect bowl — its level sets are ellipses, and it
curves upward in every direction from the origin, never flat, never down. The whole point of this
page is one clean test for when that happens.
The eigenvalue characterisation
The headline result reduces "positive in every direction" to a single check on the
eigenvalues.
Step 1 — diagonalize with the spectral decomposition. Because
M is symmetric, the
spectral
theorem gives an orthonormal basis of eigenvectors
\vec{u}_1, \dots, \vec{u}_n with real eigenvalues
\lambda_1, \dots, \lambda_n.
Step 2 — write \vec{x} in that basis. Any vector is a
combination of the eigenvectors,
\vec{x} = c_1\vec{u}_1 + \cdots + c_n\vec{u}_n, where the
c_i are its coordinates in the eigenframe.
Step 3 — evaluate the form. Since
M\vec{u}_i = \lambda_i \vec{u}_i and the
\vec{u}_i are orthonormal
(\vec{u}_i^{\mathsf{T}}\vec{u}_j = 0 unless
i = j), every cross term dies and the form collapses to a clean sum of
squares:
\vec{x}^{\mathsf{T}} M\vec{x} = \lambda_1 c_1^2 + \lambda_2 c_2^2 + \cdots + \lambda_n c_n^2.
Step 4 — read off the condition. This is a weighted sum of squares with weights
\lambda_i. The squares c_i^2 \ge 0 are never
negative, and for \vec{x} \neq \vec{0} at least one is positive. So the
sum is strictly positive for every non-zero \vec{x}
exactly when every weight is positive — that is, when every
\lambda_i > 0. If any eigenvalue were \le 0,
pushing \vec{x} along that eigenvector would make the form
\le 0, breaking positivity.
M \text{ positive-definite} \iff \lambda_i > 0 \text{ for all } i.
Quick tests you can run by hand
Computing eigenvalues is overkill for a small matrix. Two shortcuts decide definiteness directly.
Sylvester's criterion. A symmetric matrix is positive-definite if and only if
every leading principal minor — the determinant of the top-left
1\times1, then 2\times2, up to the full
matrix — is strictly positive.
The 2×2 test. For
M = \begin{bmatrix} a & b \\ b & c \end{bmatrix} this is just two
conditions:
a > 0 \qquad\text{and}\qquad \det M = ac - b^2 > 0.
The first leading minor is a; the second is the determinant. Together
they force both eigenvalues positive (their product ac - b^2 and their
sum a + c are both positive).
Loosening to "semi". Allow the form to be zero in some directions and you
get positive-semi-definite: \vec{x}^{\mathsf{T}} M\vec{x} \ge 0
for all \vec{x}, which corresponds to every
\lambda_i \ge 0. The bowl is allowed to have a flat trough.
For a symmetric matrix M, these are all equivalent:
-
\vec{x}^{\mathsf{T}} M\vec{x} > 0 for every
\vec{x} \neq \vec{0} (the form is a bowl);
-
all eigenvalues are positive,
\lambda_i > 0 — the headline test;
-
Sylvester's criterion: every leading principal minor is positive;
-
for a 2\times2 matrix, simply
a > 0 and ac - b^2 > 0.
Relaxing >0 to \ge 0 (and
\lambda_i \ge 0) gives positive-semi-definite.
Bowl or saddle?
Slide a, b, c and
watch the level curve \vec{x}^{\mathsf{T}} M\vec{x} = 1 for
M = \begin{bmatrix} a & b \\ b & c \end{bmatrix}. When both eigenvalues
are positive the curves are ellipses and the matrix is positive-definite — the
readout turns green. Push the form indefinite (a large b, or a negative
diagonal entry) and the level set becomes a hyperbola — that direction makes the
form negative, so it is no longer a bowl. The live a > 0 and
ac - b^2 > 0 checks confirm the eigenvalue verdict.
Positive-definiteness is the algebraic fingerprint of a genuine minimum, and it shows up wherever
we minimise something.
-
Covariance matrices. A covariance matrix is symmetric and positive-semi-definite
by construction — a variance can't be negative. When the data spans every direction it is strictly
positive-definite, and its positive eigenvalues are the variances along the principal directions.
-
The Hessian at a minimum. The second-derivative matrix (the Hessian) of a smooth
function is symmetric. A critical point is a true local minimum precisely when the Hessian
there is positive-definite — the surface curves up in every direction, a bowl, not a saddle.
-
Cost matrices in control and least squares. Quadratic cost functions
\vec{x}^{\mathsf{T}} Q\vec{x} are well-posed only when
Q is positive-definite (or semi-definite), so the optimiser has a unique
bottom to roll toward — as in the
LQR cost of optimal
control and the normal equations of least squares.