JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Sylvester's law of inertia: signature and definiteness

Different bases give different diagonal forms — but the count of plus, minus, and zero signs never changes. That invariance is Sylvester's law of inertia, and it hands you a basis-free classification of every real quadratic form.

Different diagonals, same signs

Guide 3 left an unsettling freedom: the diagonal entries d_i depend on which substitutions you chose. Scaling y_i by c rescales d_i by c^2, so over R the magnitudes are not invariant. But the sign of each d_i survives any positive scaling, and that is the crack through which a true invariant escapes.

Sylvester's law of inertia makes this precise: for a real symmetric form, however you diagonalize it, the number of positive diagonal entries (call it p), the number of negative ones (q), and the number of zeros (z) are always the same. The triple (p, q, z) is a congruence invariant — it does not depend on the basis at all.

The signature and the classification of forms

The signature is the pair (p, q) — equivalently the single number p - q. By inertia, two real quadratic forms in n variables are congruent iff they have the same signature. That is a complete invariant: over R there is, up to congruence, exactly one form for each admissible (p, q, z) with p + q + z = n, and every form is congruent to diag(+1, ..., +1, -1, ..., -1, 0, ..., 0).

Definiteness is just the extreme cases of signature, read straight off (p, q, z): positive definite means p = n (all plus, q(x) > 0 for x != 0); negative definite means q = n; positive semidefinite means q = 0 but some zeros; indefinite means both p > 0 and q > 0. The example q = y1^2 - 3 y2^2 from Guide 3 has signature (1, 1) — indefinite.

Sylvester's criterion: definiteness from minors

You rarely want to diagonalize just to learn the signs. Sylvester's criterion reads positive-definiteness straight off the matrix: a symmetric A is positive definite iff every leading principal minor is positive — the determinants of the top-left 1x1, 2x2, ..., n x n blocks are all > 0. (For negative definite, the leading minors must alternate in sign starting negative.)

Test  A = [2, 1; 1, 2]  for positive-definiteness:
   leading 1x1 minor:  det[2]          = 2  > 0   OK
   leading 2x2 minor:  det[2,1; 1,2]   = 3  > 0   OK
   => A is positive definite (signature (2, 0)).

Now  A = [1, 2; 2, 1]  (the Guide 3 example):
   1x1 minor:  1  > 0     OK so far...
   2x2 minor:  det = 1 - 4 = -3  < 0   FAILS
   => not positive definite; signature is (1, 1), indefinite.
Sylvester's criterion: chase leading principal minors instead of diagonalizing.