Module 1 of 1 · Lesson 9 of 14
Quadratic Forms and Definiteness
Degree-two expressions as symmetric matrices, and what their eigenvalues decide.
What you will be able to do
Given a quadratic form written in variables, the learner can produce its symmetric matrix, compute the eigenvalues, classify the definiteness, give the principal axes and the diagonalised form, and confirm the verdict by evaluating the form on specific vectors.
Orientation
Writing the expression as
That is why this classification appears wherever second-order behaviour matters: a critical point is a minimum, a maximum or a saddle according to whether the Hessian's form is positive definite, negative definite or indefinite.
Figure
Level sets of positive definite, indefinite and semidefinite forms
The three classifications as three families of level sets, each in its own coordinate frame centred on its own origin.
Closed nested ellipses mean every nonzero direction gives a positive value, so the origin is a strict minimum: positive definite. Hyperbolas mean the form takes both signs, with the zero set a pair of crossing lines and the origin a saddle: indefinite. Parallel lines mean the form is flat along one eigenvector, whose eigenvalue is zero: semidefinite.
The axes of each family are the eigenvectors, which is what the spectral theorem supplies: a rotation that removes the cross term. On the level set
Definition
Splitting the cross terms, and why symmetry is forced
Reading a form into a matrix. The coefficient of
Forgetting to halve is the most common error, and it changes the matrix without changing the intent:
Why the symmetric representative is canonical. For any square
Concretely,
What the matrix is a property of. Given the form, the symmetric matrix is unique. Given a non-symmetric matrix, the form is still determined, but the matrix is not recoverable from it, information about the antisymmetric part is discarded, and it never affected the values.
Evaluation is a double sum.
Theorem
The spectral theorem, and what it gives the form
Spectral theorem. Every real symmetric matrix
Real eigenvalues. Suppose
Taking the conjugate transpose of the left side and using
Orthogonal eigenvectors for distinct eigenvalues. If
using symmetry in the middle step. So
This is the theorem the diagonalization and SVD units invoked without proof; here it is discharged.
Corollary (principal axes). Substituting
Every real quadratic form is a weighted sum of squares in suitable perpendicular coordinates, with the eigenvalues as weights.
Corollary (classification).
Why orthogonality matters here. Completing the square also removes cross terms, and Sylvester's law of inertia guarantees it produces the same counts of positive, negative and zero coefficients. But its change of variables is not orthogonal, so it does not preserve lengths: the axes it produces are not perpendicular and the level set it describes is a sheared picture of the true one. The eigenvalues are recoverable only from the orthogonal route.
Procedure
From expression to verdict
- Build the symmetric matrix. Squared coefficients on the diagonal; each cross-term coefficient halved and placed symmetrically.
- If given a matrix instead, check it is symmetric. If not, replace it by
. The form is unchanged. - Find the eigenvalues.
- Classify by their signs: all positive, all negative, mixed, or some zero with the rest of one sign.
- For the axes, compute an orthonormal eigenbasis; these are the principal directions, and
in those coordinates. - Confirm by evaluating
on a few vectors, including an eigenvector, for a unit eigenvector.
Shortcuts for
| Condition | Verdict |
|---|---|
| positive definite | |
| negative definite | |
| indefinite | |
| semidefinite, sign from |
These follow from
The analogue for larger matrices is Sylvester's criterion: positive definite exactly when every leading principal minor is positive. It does not extend naively to semidefiniteness, where all principal minors, not only the leading ones, must be checked.
Checks worth running.
and , both free.- A positive definite matrix has every diagonal entry positive, since
. The converse fails, which is what the non-example block is about. - For a semidefinite verdict, exhibit the nonzero vector on which
vanishes; it lies in the kernel.
A note on what not to do. Do not classify by inspecting the coefficients of the squared terms.
Worked example
Classifying a form and finding its axes
Step 1: the symmetric matrix. Squared coefficients 5 and 5 on the diagonal; the cross coefficient 4 halved to 2 off it:
Check.
Step 2–3: eigenvalues.
Check.
Step 4: classify. Both eigenvalues positive, so
Step 5: principal axes. For
perpendicular as the spectral theorem promised. In these coordinates
Step 6: confirm. Evaluating the original form on the unit eigenvectors:
Each eigenvalue is literally the value of the form along its own axis.
The geometry. The level set
Completing the square, for contrast.
Checking at
Both coefficients, 5 and
Example
One of each class
Positive definite, despite a negative cross term.
The sign of the cross term was irrelevant. Checking a few values:
Its principal axes are
Indefinite.
Negative definite.
Positive semidefinite in three variables.
which is block diagonal: the
The zero eigenvalue's eigenvector is
Cross terms decide as much as squared ones; a positive determinant does not mean positive definite; and the gap between definite and semidefinite is a single nonzero vector on which the form vanishes. None of this is visible without the eigenvalues.
Non-example
Five ways a classification goes wrong
Reading definiteness off the squared coefficients. "
The converse error is just as common:
Forgetting to halve the cross coefficient. Writing
Using a non-symmetric matrix's eigenvalues.
Calling a semidefinite form definite.
Taking completing-the-square coefficients as eigenvalues. From
The first three mistake a representation for the object, coefficients, an unhalved matrix, an asymmetric one. The last two mistake a weaker conclusion for a stronger one. All five are caught by the same habit: build the symmetric matrix, take its eigenvalues, and test the verdict on a concrete vector.
Optional enrichment (1)
Application
Second derivatives, covariance, and energy
Classifying a critical point. For a twice-differentiable
where
| Hessian form | Critical point |
|---|---|
| positive definite | local minimum |
| negative definite | local maximum |
| indefinite | saddle |
| semidefinite | undetermined at this order |
The last row is the one to watch. A zero eigenvalue means the form vanishes along some direction, and the second-order term says nothing about what happens there,
For two variables this is the familiar test:
Covariance matrices. For a random vector
That is also why the principal components of the SVD unit are eigenvectors of
Energy and stability. In mechanics the potential energy near equilibrium is a quadratic form in the displacements, and the equilibrium is stable exactly when that form is positive definite. Every displacement raises the energy. An indefinite form gives an unstable equilibrium with a direction of descent, and the eigenvector for the most negative eigenvalue is the direction the system falls fastest.
What the classification does not do. It is local and second-order. Positive definiteness of a Hessian at a point establishes a local minimum, not a global one, and says nothing away from that point. For the semidefinite case it establishes nothing at all, and higher-order terms must be examined.