The real forms and look almost the same, with positive coefficients on both squares and the same cross term. Completing the square tells them apart. The first equals and is positive at every nonzero point, while the second equals and takes the value at . This lesson turns that square completion into the Cholesky factorization of every positive definite matrix, with a unique upper triangular factor whose diagonal entries are positive, and into a determinant test for positive definiteness.
Key terms
Positive definite matrix
Definition Let be or . A matrix is positive definite if it is Hermitian (real symmetric when ) and
For a Hermitian the following are equivalent. The matrix is positive definite. Every eigenvalue of is positive. The inertia of is . The matrix equals for some invertible . A positive definite matrix is invertible, its diagonal entries are positive, and each leading block, formed by the first rows and the first columns, is again positive definite, as one sees by testing on vectors whose last coordinates are . Over the symmetry is part of the definition, because only detects the symmetric part of .
In plain words The form of a positive definite matrix is a bowl. Every direction away from the origin goes up.
Example The matrix
from the opening is positive definite, because is only when and then . The matrix with in place of is not, although both of its diagonal entries are positive. Positive diagonal entries are necessary, not sufficient.
Positive semidefinite matrix
Definition A matrix is positive semidefinite if it is Hermitian and for every . For a Hermitian this holds exactly when every eigenvalue is nonnegative, exactly when the inertia is with , and exactly when for some matrix with columns. The eigenvalue test needs the Hermitian hypothesis, since the real matrix with rows and has both eigenvalues equal to , but its form takes the value at . For a positive semidefinite matrix the form vanishes exactly on the kernel, since forces and hence . A positive semidefinite matrix is positive definite exactly when it is invertible. A singular one has no factorization with triangular and every diagonal entry positive, because such a factor would give . An indefinite Hermitian matrix has no factorization at all, since is never negative.
In plain words A positive semidefinite form never dips below zero, but it may stay flat along some directions, and those flat directions are exactly the kernel.
Example The all-ones matrix
has form , eigenvalues and , and inertia . Its value is at , which lies in the kernel. It factors as with having rows and , so the second diagonal entry is . Triangular factors of singular matrices can also fail to be unique even with a nonnegative diagonal. For , both upper triangular matrices with rows and with rows satisfy .
Completing the square
Definition Let be Hermitian with first diagonal entry , which is real because is Hermitian, and write
with and Hermitian. Split an input as with and . Then
where . To check the last line, expand the square and use that the conjugate of the scalar is . Every appearance of is now inside one square, and the rest is a form in alone. Repeating the step on , as long as the pivots are nonzero, writes as a sum of real multiples of squared absolute values of triangular combinations of the coordinates.
In plain words Collect every term that contains the first coordinate into one perfect square. What is left over is a smaller quadratic form in the remaining coordinates, and you repeat.
Example For the matrix with rows and the first pivot is , and
The leftover coefficient is . Both squares have positive weight, so the form is positive definite, and the last line says for the triangular matrix with rows and .
Schur complement
Definition For a Hermitian partitioned as in the previous card, with first diagonal entry , the Schur complement of the entry is the Hermitian matrix
It is exactly what Gaussian elimination leaves in the lower right block after the first column is cleared below the pivot, by subtracting times the first row from row . That elimination does not change determinants and produces a block triangular matrix with diagonal blocks and , so . The same step inside the leading block of size shows that its determinant is times the determinant of the leading block of . If is positive definite, then and is positive definite. Indeed, for choose . The square then vanishes, the input is nonzero, and the identity from completing the square gives .
In plain words The Schur complement is the smaller matrix left after one step of elimination. It holds the part of the form that has not yet been written as a square, and positive definiteness passes down to it.
Example For
we have and , so
Then and .
Cholesky factorization
Definition Let be or , and let be positive definite. Then there is exactly one upper triangular with real positive diagonal entries such that
When the factor is real and . Many books write the same factorization as with lower triangular. Existence follows by induction on . For take . For the Schur complement is positive definite of size , so with upper triangular with positive diagonal, and
satisfies , since its lower right block is . For uniqueness, any such factor has with , so . The first row equations then force the rest of the first row to be , and the remaining block must factor the same , which by induction has only one such factor. The positive diagonal is what pins the factor down. Multiplying the rows of by signs, or over by complex numbers of modulus , gives other triangular factors. Conversely, every with invertible is positive definite, because .
In plain words Completing squares one coordinate at a time builds row by row, and the form becomes a sum of squares, . Each row of holds the coefficients inside one completed square, multiplied by the square root of its pivot.
Example For the matrix above, the first row of is . The Schur complement , with rows and , contributes the row , and its own Schur complement is , with square root . So
and multiplying out returns . As a sum of squares,
Changing the sign of the first row of gives another triangular factor, but its first diagonal entry is .
Sylvester’s criterion
Definition For and , the leading principal submatrix is the block in the first rows and the same first columns, and the leading principal minor is , with . Sylvester’s criterion says that a Hermitian matrix is positive definite if and only if
If is positive definite, each is positive definite, so and . Conversely, , and the Schur complement step gives , where is the leading block of . So every leading principal minor of is positive, is positive definite by induction, and the identity from completing the square gives for every . Because with the leading block of the Cholesky factor, the pivots satisfy
The hypotheses matter. The real matrix with rows and has , but it is not symmetric and its form equals at . The criterion also has no semidefinite version with leading minors alone. The matrix has , yet its form is at . A Hermitian matrix is positive semidefinite exactly when all of its principal minors, taken from any set of rows and the same set of columns, are nonnegative.
In plain words For a Hermitian matrix, positive definiteness can be read from determinants taken from the top left corner outward. When the matrix is positive definite, each ratio of consecutive minors is a pivot of the square completion.
Example For the matrix above, , and , all positive, so is positive definite. The ratios , and equal , and , the squares of the diagonal entries , and of . By contrast, the matrix with rows and has and , so it is not positive definite.
Check yourself
- Find the Cholesky factor of the matrix with rows and , and check it against the leading principal minors.
Show the answer
The first pivot gives and then . The Schur complement is , so and
Multiplying, has entries , , and , which is the matrix. The leading minors are and , and the ratios and are and .
- For which real numbers is the matrix with rows and positive definite? What happens at ?
Show the answer
The matrix is symmetric for every real , so Sylvester’s criterion applies. The minors are and , so the matrix is positive definite exactly when .
At the form is
which is never negative, so the matrix is positive semidefinite but not positive definite. The form vanishes at , and that vector is in the kernel. The Cholesky steps give and , and then , so the last pivot is and no factor with positive diagonal exists. For the determinant is negative, so the eigenvalues have opposite signs and the matrix is indefinite.
- Find the Schur complement and the Cholesky factor of the complex Hermitian matrix below, check Sylvester’s criterion, and explain why is not the matrix.
Show the answer
Here , the column below it is , and . The Schur complement is
So , and , which gives
The minors are and , both positive, and . Without the conjugate, has lower left entry and lower right entry , so it is not even Hermitian. Over the factorization uses .