Skip to content
The book

Quadratic forms, positive definiteness, Sylvester's law

Why this is asked: Signature is the complete invariant over ℝ (Sylvester). Positive definiteness is tested by leading principal minors, or by all eigenvalues being positive — do not mix the two tests up.

In one sentence

A quadratic form is classified by its signature and by nothing else, congruence is the relation that preserves it, and congruence is not similarity — it changes eigenvalues freely.

Why the exam asks it

Because candidates arrive knowing one criterion — leading principal minors — and apply it to positive semidefiniteness, where it is false. And because congruence and similarity are easy to conflate when both are written P∙APP^{\bullet}AP, differing only in whether the left factor is PTP^{T} or P−1P^{-1}.

The idea

A quadratic form on Rn\mathbb{R}^n is q(x)=xTAxq(x) = x^{T}Ax with AA symmetric. The symmetry is a normalisation, not a restriction: any AA can be replaced by 12(A+AT)\tfrac12(A + A^T) without changing qq.

Under a change of variable x=Pyx = Py with PP invertible,

q(x)=(Py)TA(Py)=yT(PTAP)y,q(x) = (Py)^{T}A(Py) = y^{T}(P^{T}AP)y,

so the matrix transforms by A↦PTAPA \mapsto P^{T}AP. That relation is congruence.

Congruence is PTAPP^{T}AP. Similarity is P−1APP^{-1}AP. They agree exactly when PP is orthogonal.

That last remark is why the spectral theorem is so useful here: for symmetric AA we can take PP orthogonal, and then congruence and similarity coincide, so the diagonal entries can be taken to be the eigenvalues.

Sylvester's law of inertia

Every real quadratic form is congruent to a diagonal form with entries +1+1, −1-1 and 00, and the counts (p,n,z)(p, n, z) of each are invariants — independent of how you diagonalise it.

  • pp = number of positive eigenvalues, nn = negative, zz = zero.
  • rank⁡=p+n\operatorname{rank} = p + n, signature commonly means p−np - n or the pair (p,n)(p,n).

Two real symmetric matrices are congruent   ⟺  \iff they have the same (p,n,z)(p, n, z). Note what this does not say: nothing about the eigenvalues themselves. Congruence can scale them arbitrarily, as long as no sign changes.

signature (2, 0) positive definite an ellipse — bounded signature (1, 1) indefinite a hyperbola — unbounded signature (1, 0), rank 1 positive semidefinite degenerate — a whole line of zeros
The level set q = 1 for each signature in two variables. The signature is what the picture is, and congruence can stretch these but never turn one into another.

Over C\mathbb{C} there are no signs to preserve — −1-1 is a square — so only the rank classifies, and every complex quadratic form of rank rr is congruent to y12+⋯+yr2y_1^2 + \cdots + y_r^2.

Definiteness

AA symmetric is:

  • positive definite if xTAx>0x^TAx > 0 for all x≠0x \ne 0   ⟺  \iff all eigenvalues >0> 0;
  • positive semidefinite if xTAx≥0x^TAx \ge 0   ⟺  \iff all eigenvalues ≥0\ge 0;
  • indefinite if it takes both signs   ⟺  \iff eigenvalues of both signs.

Sylvester's criterion: AA is positive definite   ⟺  \iff all nn leading principal minors are >0> 0. This is a genuine shortcut — no eigenvalues required.

And it does not adapt to the semidefinite case. The correct statement there needs all principal minors ≥0\ge 0, not just the leading ones. The counterexample is small and worth knowing cold:

A=(000−1).A = \begin{pmatrix}0 & 0\\ 0 & -1\end{pmatrix}.

Its leading principal minors are det⁡(0)=0\det(0) = 0 and det⁡A=0\det A = 0, both ≥0\ge 0. Its eigenvalues are 00 and −1-1, so it is not positive semidefinite — indeed q(0,1)=−1q(0,1) = -1. The non-leading principal minor, the (2,2)(2,2) entry −1-1, is the one that catches it, and the leading sequence never looks at it.

Where intuition breaks

"Leading principal minors ≥0\ge 0, so positive semidefinite." diag⁡(0,−1)\operatorname{diag}(0,-1). The single most productive trap in this topic, because the definite version is true with strict inequalities and the weakening looks harmless.

"Congruent, so similar." II and diag⁡(4,1)\operatorname{diag}(4,1) are congruent via P=diag⁡(2,1)P = \operatorname{diag}(2,1), and their eigenvalues are {1,1}\{1,1\} and {4,1}\{4,1\}, so they are not similar. Congruence preserves only the signs.

"Similar, so congruent." Also false in general, for real symmetric matrices it happens to follow from equal eigenvalues, but similar non-symmetric matrices need not be congruent at all. Do not treat either as implying the other.

"All diagonal entries positive, so positive definite." (1221)\begin{pmatrix}1&2\\2&1\end{pmatrix} has positive diagonal and eigenvalues 33 and −1-1. The diagonal entries are q(ei)q(e_i) — they only test the coordinate directions.

"Positive definite, so all entries positive." (2−1−12)\begin{pmatrix}2&-1\\-1&2\end{pmatrix} is positive definite with a negative entry. The two statements are unrelated in both directions.

"det⁡A>0\det A > 0, so positive definite." −I-I in two variables has determinant 11. The determinant is the product of the eigenvalues, and an even number of negatives cancels.

"The signature depends on how you diagonalise." It does not — that is exactly Sylvester's law, and it is the reason signature is a legitimate invariant to ask about.

"A quadratic form is determined by its matrix." By its symmetric matrix. (0200)\begin{pmatrix}0&2\\0&0\end{pmatrix} and (0110)\begin{pmatrix}0&1\\1&0\end{pmatrix} give the same form 2xy2xy.

The exam's angle

  1. Get the signature and stop. Almost every question about congruence, classification, or the shape of a conic is answered by (p,n,z)(p, n, z).
  2. For definiteness, use leading minors — but only for the strict case. If the question says semidefinite, go to eigenvalues or check all principal minors.
  3. Read PTAPP^TAP against P−1APP^{-1}AP carefully. The exponent is the whole question.
  4. Count sign changes in the characteristic polynomial if the eigenvalues are awkward: Descartes' rule gives the number of positive roots quickly for a symmetric matrix.
  5. Over C\mathbb{C}, only rank matters. If the stem moves to C\mathbb{C}, every signature distinction collapses.

The night before

  • q(x)=xTAxq(x) = x^TAx with AA symmetric; change of variable gives congruence PTAPP^TAP.
  • Congruence ≠\ne similarity. They coincide only for orthogonal PP.
  • Sylvester's law: (p,n,z)(p, n, z) is invariant. Congruent   ⟺  \iff same (p,n,z)(p,n,z). Over C\mathbb{C}, rank alone.
  • Positive definite   ⟺  \iff all eigenvalues >0>0   ⟺  \iff all leading principal minors >0>0.
  • Semidefinite needs all principal minors ≥0\ge 0. diag⁡(0,−1)\operatorname{diag}(0,-1) has both leading minors 00 and is not semidefinite.
  • Positive diagonal does not give definiteness: (1221)\begin{pmatrix}1&2\\2&1\end{pmatrix}. det⁡>0\det > 0 does not either: −I-I.
  • Positive definite matrices can have negative entries.
  • Congruence preserves signs of eigenvalues, not their values: II and diag⁡(4,1)\operatorname{diag}(4,1).

See it move

Testing definiteness, and reading Sylvester's lawinteractive

This visual is part of Trap Analysis

The leading-minors test done right — including the sign pattern for negative definite that catches people out.

Unlock interactive visuals

More in Inner Product Spaces and Forms

Take it further

Last revised . Found a mistake? Tell us — corrections are the fastest thing we act on.

Next: Determinants, trace, block matrices, rank inequalities

Create a free account to keep your place and have this feed your study plan.

ShareWhatsAppTelegram

Open this in the full syllabus view · Unit 1