Lesson 7.21,017 words

Quadratic Forms

A quadratic form xᵀAx is the second-degree analogue of a linear map, attached to a symmetric matrix A. Orthogonal diagonalization changes variables to the eigenbasis, removing all cross-terms and rotating the form into standard position.

╌╌╌╌

Linear systems involve expressions of degree one in the variables. The next step up is degree two. Sums of squares already appeared in the norm; a general second-degree homogeneous expression, allowing cross-products , is a quadratic form. These occur throughout applications: as energies in physics, as the objective in optimization, as the noise power of a signal, and as the covariance ellipsoids of statistics. Symmetric-matrix theory supplies the tools to analyze them.

The simplest nonzero form is . In general, is a scalar assembled from products of the coordinates, with the diagonal of supplying the squared terms and the off-diagonal entries the cross-terms.

From matrix to form and back

Multiplying out for a matrix shows how the entries enter. With ,

The squared coefficients and come from the diagonal. The cross-term collects both off-diagonal entries: the in position and the matching in position each contribute . A diagonal matrix produces no cross-term at all.

Reversing the direction, any quadratic form has a unique symmetric matrix. The rule: the coefficient of goes on the diagonal, and the coefficient of (for ) is split evenly between positions and . For the three-variable form ,

The coefficient splits into two entries; the coefficient splits into two entries; the absent term leaves zeros in positions and . Splitting evenly is what keeps symmetric, and symmetry is what makes the Spectral Theorem available.

Removing the cross-terms

Cross-terms make a quadratic form awkward to read: the sign of and its extreme values are obscured by the coupling between variables. A change of variable removes them.

Substituting into and collecting the matrix,

so the new matrix of the form is . Since is symmetric, the Spectral Theorem supplies an orthogonal with diagonal. In those coordinates the form becomes , a pure sum of squares with no cross-terms.

Principal axes are eigenvector axes

The geometry behind the algebra is a rotation. For an invertible symmetric and a constant , the set is a conic: an ellipse, a hyperbola, a pair of lines, a point, or empty. When is diagonal the conic sits in standard position, its axes along the coordinate directions. When has cross-terms, the same conic is rotated out of standard position, and the principal axes — the eigenvectors of — mark the new coordinate directions in which it straightens out.

The equation xᵀAx = c is an ellipse rotated out of standard position; its principal axes are the eigenvectors u₁, u₂ of A, and in those coordinates it becomes the axis-aligned diagonal form λ₁y₁² + λ₂y₂² = c.

Finding the principal axes means finding coordinates in which the conic is standard, the same decoupling that change of basis performs elsewhere.

The change of variable y = Pᵀx rotates the tilted conic xᵀAx = c into the axis-aligned yᵀDy = c, whose axes are the coordinate directions e₁, e₂.

Classifying quadratic forms

Once decoupled to , the sign of a form is decided by the signs of the eigenvalues. The graph over makes the classification visible: a bowl opening upward when all eigenvalues are positive, a bowl opening downward when all are negative, and a saddle when the signs are mixed.

The graph z = Q(x) is an upward bowl when Q is positive definite (values positive off the origin) and a saddle when Q is indefinite (positive along one principal axis, negative along the other).

The classification carries over to the matrix: a positive definite matrix is a symmetric matrix whose form is positive definite, and likewise for the other terms. The eigenvalue criterion is immediate from the Principal Axes Theorem.

The semidefinite case is the boundary: is positive semidefinite exactly when every eigenvalue is nonnegative (allowing zeros), since a zero eigenvalue leaves along its eigenvector while never turning negative.

The eigenvalue test corrects a naive reading of the coefficients.

Seen from above, level curves xᵀAx = c are nested ellipses when Q is positive definite (same-sign eigenvalues) and crossing hyperbolas when Q is indefinite (opposite-sign eigenvalues).
The signs of the eigenvalues, not the signs of the coefficients, sort a form into its class.

The 2×2 shortcut

For a symmetric matrix with , the class can be read from the determinant and the corner entry without computing eigenvalues. Writing the characteristic polynomial two ways, , and matching coefficients,

The product of the eigenvalues is and their sum is the trace. Two same- sign eigenvalues give a positive product; opposite signs give a negative one.

ConditionSign of eigenvaluesClass
, both positivepositive definite
, both negativenegative definite
one of eachindefinite

When the eigenvalues share a sign, and the sign of the corner entry (with ) reveals which. When the eigenvalues have opposite signs, so the form is indefinite regardless of the diagonal.

Positive definiteness and factorization

Positive definite matrices are the ones that behave like positive numbers, and they are precisely the matrices admitting a square-root factorization. If is then is always positive semidefinite, because ; and if is square and invertible then for , making positive definite. Conversely, a symmetric positive definite can be written by taking with the diagonal matrix of square roots of the eigenvalues.

A fast test for positive definiteness attempts to factor with upper triangular and positive diagonal entries. This Cholesky factorization succeeds if and only if is positive definite, and it costs about half a general elimination.

╌╌ END ╌╌