96. Quadratic Form
A quadratic form is a polynomial expression in variables where every term has total degree exactly :
It can always be written compactly using a symmetric matrix :
The matrix is assumed symmetric without loss of generality — if isn’t symmetric, replacing it with gives the same quadratic form.
Example
As a matrix product (split the symmetrically as ):
96.1. Definiteness
Quadratic forms are classified by the sign of over all non-zero :
| Type | Sign of | All eigenvalues of |
|---|---|---|
| Positive definite | ||
| Positive semi-definite | ||
| Negative definite | ||
| Negative semi-definite | ||
| Indefinite | takes both signs | mixed |
The eigenvalue characterization comes from the Spectral Theorem: diagonalizing and changing variables gives
— a sum of squares weighted by eigenvalues. The signs of the eigenvalues determine the signs of .
96.2. Tests for positive definiteness
For a symmetric , equivalent conditions:
- All eigenvalues
- All leading principal minors (Sylvester’s criterion)
- admits a Cholesky decomposition
- for all
96.3. Geometric pictures (2D)
For , the level sets are conic sections aligned with the eigenvectors of :
- Positive definite: ellipse — closed, bounded, axes are eigenvectors with lengths
- Negative definite: ellipse (with negative )
- Indefinite: hyperbola — open curves with asymptotes
- Positive semi-definite (rank 1): parallel lines
96.4. Where they show up
- Semi-definiteness / Hessian: the second-order Taylor approximation of a function near a critical point is a quadratic form. Definiteness classifies the critical point as min / max / saddle.
- Norms: — a quadratic form with
- Mahalanobis distance: — a quadratic form using the inverse covariance
- Multivariate Gaussian density:
- Quadratic programming: optimize subject to linear constraints
- Kinetic energy / potential energy in mechanics
- Variance of a linear combination:
96.5. Diagonalization (principal axis theorem)
Every quadratic form can be brought to diagonal form by an orthogonal change of variables — equivalently, by rotating the coordinate axes to align with the eigenvectors of :
This is the “principal axes” of the conic / quadric.
96.6. See also
- Symmetric Matrix
- Spectral Theorem
- Leading Principal Minor — Sylvester’s criterion
- Cholesky Decomposition
- Semi-Definiteness in Calculus II