Quadratic Forms & Definiteness: Tests and Examples
A quadratic form is an expression like 2x² + 4xy + 5y² where every term has total degree exactly two. It can always be written in matrix form as Q(x) = x^T A x with a symmetric matrix A, which turns questions about the shape of the expression into questions about the eigenvalues of A.
Quadratic forms decide the geometry of optimization: whether a critical point is a valley, peak, or saddle depends on the Hessian's definiteness. They also describe energy, distance, and variance.
Key Concepts
- Quadratic form. Q(x) = x^T A x with A symmetric. For Q = ax² + 2bxy + cy² the matrix is A = [[a, b], [b, c]]: the cross-term coefficient is split in half.
- Positive definite. Q(x) > 0 for every nonzero x. The graph is a bowl opening upward.
- Negative definite. Q(x) < 0 for every nonzero x: a bowl opening downward.
- Positive/negative semidefinite. Q(x) ≥ 0 or ≤ 0 for all x, with equality allowed at nonzero points: flat directions exist.
- Indefinite. Q takes both positive and negative values: a saddle shape.
Formulas
- Eigenvalue test: positive definite iff all eigenvalues of A are > 0; negative definite iff all are < 0.
- Sylvester criterion: positive definite iff all leading principal minors are positive: Δ1 = a11 > 0, Δ2 = det of top-left 2×2 > 0, and so on.
- Completing the square: 2x² + 4xy + 5y² = 2(x + y)² + 3y² ≥ 0.
- Assumptions and limits: A must be symmetric; otherwise use (A + A^T)/2, which gives the same form.
Worked Example
Test Q(x, y) = 2x² + 4xy + 5y² for definiteness.
- Build the symmetric matrix: A = [[2, 2], [2, 5]], splitting the 4xy coefficient in half on the off-diagonal.
- First leading minor: Δ1 = 2 > 0.
- Second leading minor: Δ2 = 2 × 5 − 2 × 2 = 10 − 4 = 6 > 0.
- Both minors positive, so A is positive definite and Q(x, y) > 0 for all nonzero (x, y).
- Double-check by completing the square: 2x² + 4xy + 5y² = 2(x² + 2xy) + 5y² = 2(x + y)² − 2y² + 5y² = 2(x + y)² + 3y². This is zero only when x + y = 0 and y = 0, i.e. only at the origin. Confirmed: positive definite.
Common Misconceptions
- Putting the full cross-term on the off-diagonal. For 4xy the off-diagonals are 2, not 4.
- Judging by entry signs. A positive definite matrix can contain negative entries; only minors or eigenvalues decide.
- Calling a semidefinite form definite. If Q vanishes at a nonzero point, as x² does on the y-axis, it is only semidefinite.
Real-World Applications
- Second-derivative test: the Hessian quadratic form at a critical point classifies it as a minimum, maximum, or saddle.
- Physics energy: kinetic energy ½mv² and spring energy ½kx² are positive definite quadratic forms, which is why equilibria are stable.
- Statistics: the Mahalanobis distance (x − μ)^T Σ^−1 (x − μ) is a positive definite quadratic form measuring how unusual a data point is.
A quadratic form x^T A x is classified by the definiteness of its symmetric matrix A: positive definite when all leading principal minors (or eigenvalues) are positive. Sylvester's criterion makes the test a quick determinant computation, and completing the square gives a hands-on confirmation.
Related blogs
- Vector Spaces Over a Field: Axioms Explained Simply
- Subspaces and Quotient Spaces: Linear Algebra Explained
- Linear Independence and Dependence: Vectors Explained
- Basis and Dimension: Concepts, Formulas and Examples
- Coordinates and Change of Basis: Explained with Examples
- Linear Transformations: Matrices, Kernels and Images