Quadratic Form Definitions
For a real symmetric matrix , consider the quadratic form
The complex version uses a Hermitian matrix and . The sign of this scalar classifies the matrix:
| Class | Sign condition |
|---|---|
| Positive definite | |
| Positive semidefinite | |
| Negative definite | |
| Negative semidefinite | |
| Indefinite | the quadratic form takes both positive and negative values |
For the four definite or semidefinite classes, the inequality must hold for every nonzero vector. Indefinite means that at least one vector gives a positive value and another gives a negative value.
Symmetry is part of the usual definition. For a nonsymmetric real matrix,
This identity shows that the quadratic form depends only on the symmetric part of .
Spectral Criterion
The spectral theorem writes a real symmetric matrix as
In this decomposition, is orthogonal and is real and diagonal. Substituting gives
The calculation gives:
- is positive definite exactly when every .
- is positive semidefinite exactly when every .
- is indefinite exactly when it has both positive and negative eigenvalues.
Every diagonal entry of a positive definite matrix is positive because
A matrix can have positive diagonal entries and still fail to be positive definite because the cross terms also affect .
Ellipsoid Geometry
If is positive definite, then
The set is an ellipsoid centered at the origin. In eigenvector coordinates, its equation becomes
This equation shows that the principal axes of the ellipsoid follow the eigenvectors of . The th semiaxis has length . Small eigenvalues produce longer semiaxes, while large eigenvalues produce shorter semiaxes.
For , the three eigenvalues give semiaxis lengths . Rotate the model to compare the three directions. The curves are cross-sections of the same ellipsoid, not different surfaces.
- Lines
- 9
Principal Minor Tests
Let denote the upper-left block of a real symmetric or complex Hermitian matrix. Sylvester's criterion states
is positive definite if and only if every leading principal determinant is positive:
This leading-principal-minor test does not extend by replacing with . Positive semidefiniteness requires every principal minor to be nonnegative. Checking the leading ones alone is insufficient.
Worked Two by Two Checks
Consider
Its leading principal minors are
Both leading principal minors are positive, so is positive definite. Both eigenvalues are also positive:
Now compare
Although both diagonal entries are positive,
The negative determinant shows that the two eigenvalues of have opposite signs. Therefore, is indefinite.
Cholesky Characterization
A real symmetric matrix is positive definite exactly when it has a Cholesky factorization:
In this factorization, is lower triangular and has strictly positive diagonal entries. Then
Conversely, the Cholesky algorithm completes without a nonpositive pivot for every positive definite matrix. For a symmetric input in exact arithmetic, this completion tests positive definiteness. Once is available, solve and then .
Products with Swapped Rows and Columns
For every real matrix ,
This equation shows that is always positive semidefinite. The matrix is positive definite exactly when
Full column rank automatically implies . It does not need to be assumed before the semidefinite statement.
More generally, a Gram matrix is positive semidefinite and becomes positive definite exactly when the vectors are linearly independent.
Unique Minimizer of a Quadratic Objective
Consider the quadratic objective
Its gradient and Hessian are
If is positive definite, is strictly convex and has the unique minimizer
The numerical difficulty also depends on the condition number, defined as the ratio of the largest to the smallest eigenvalue:
A large condition number gives elongated contours. Numerical algorithms may then run slowly or become sensitive to rounding error.
Spectral Shifts and Inverses
For Hermitian , the eigenvalues of are . Hence
If , then as well, with eigenvalues . In numerical algorithms, solve the linear system directly because forming an explicit inverse requires more operations and can amplify rounding error.