14.5  Sylvester’s Law of Inertia

The previous section produced a diagonal matrix and then took it away again: the diagonal entries are not invariants, because rescaling the i-th basis vector by t multiplies the i-th entry by t2. Over R the squares are exactly the positive numbers, so rescaling can change the size of an entry but never its sign. This section proves that the signs are all that survives, and that they survive completely: the number of positive, negative, and zero entries is the same for every diagonalization. That is the classification of real symmetric matrices up to congruence, and it is also the missing link between congruence and the spectral theorem.

Throughout this section the field is R. Every form is a symmetric bilinear form on a finite-dimensional real vector space V, and every matrix is a real symmetric matrix. The words “positive” and “negative” have no meaning over a general field, and almost nothing in this section survives the move to one; Corollary 14.4.4 already showed that over C the answer is different, since rank alone classifies there.

14.5.1. Normalizing the diagonal

Start from Theorem 14.4.2, which applies because charR=0. It gives an orthogonal basis (v1,…,vn) for β, with q(vi)=di. Over R we may go one step further and scale.

By Proposition 14.4.3, replacing vi by tivi replaces di by ti2di. Choosing ti=1/|di| when di≠0, and ti=1 when di=0, turns every diagonal entry into 1, −1, or 0. A permutation of the basis then sorts them, so after a further congruence by a permutation matrix the matrix of β is

In+⊕(−In−)⊕On0,
(14.5.1)

where n+ counts the positive di, n− the negative ones and n0 the zeros, and n++n−+n0=n. Nothing yet says that these three counts do not depend on the orthogonal basis we started from. That is the theorem.

Quick check. One of the three counts is already known to be an invariant, by a result of Section 2. Which one, and why?

Solution. The count n0. A diagonal matrix has rank equal to its number of nonzero entries, so n++n−=rank[β]BB, and congruence preserves rank (Theorem 14.2.3). Hence n++n− is the same for every orthogonal basis, and so is n0=n−(n++n−). What is not yet known is how that total splits into positives and negatives — which is exactly the work left for the theorem below.

14.5.2. The law of inertia

Theorem 14.5.1 (Sylvester’s Law of Inertia)

Let β be a symmetric bilinear form on a real vector space V with dim⁡V=n, and let B and B′ be two orthogonal bases for β. Let (n+,n−,n0) be the numbers of positive, negative, and zero diagonal entries of [β]BB, and (n+′,n−′,n0′) the corresponding numbers for [β]B′B′. Then n+=n+′,n−=n−′,n0=n0′.

Idea. Rank has already delivered n++n−=n+′+n−′, so it is enough to prove n+=n+′, and for that we may suppose n+>n+′ and look for a disaster. The two bases carve out two subspaces with incompatible behavior: on U=span(v1,…,vn+) the form is strictly positive away from 0, because Eq. 14.4.1 has only positive coefficients there; on U′=span(vn+′+1′,…,vn′) it is ≤0 everywhere, because there the coefficients are all ≤0. A nonzero vector in both would have q(v)>0 and q(v)≤0 at once, so the two subspaces meet only in 0. But their dimensions add up to more than n, and two such subspaces of an n-dimensional space cannot meet only in 0. Contradiction plus a dimension count.

Proof. Write B=(v1,…,vn) and B′=(v1′,…,vn′), and order each so that the positive entries come first, then the negative ones, then the zeros; reordering a basis does not change the three counts. Put di=q(vi) and dj′=q(vj′), so that d1,…,dn+>0,dn+′+1′,…,dn′≤0.

As in the Quick check, n++n−=rank[β]BB=rank[β]B′B′=n+′+n−′ by Theorem 14.2.3, and n0=n−(n++n−). So it suffices to prove n+=n+′; the other two equalities then follow.

Suppose not. Swapping the names of the two bases if necessary, we may assume n+>n+′. Put U=span(v1,…,vn+),U′=span(vn+′+1′,…,vn′), so that dim⁡U=n+ and dim⁡U′=n−n+′.

Claim: U∩U′={0}. Let v∈U∩U′ with v≠0. Writing v=∑i≤n+civi and using Eq. 14.4.1 for the basis B, whose later coordinates of v are zero, q(v)=∑i=1n+dici2>0, because every di with i≤n+ is positive, every ci2≥0, and at least one ci≠0 since v≠0. Writing instead v=∑j>n+′bjvj′ and using Eq. 14.4.1 for B′, q(v)=∑j=n+′+1ndj′bj2≤0, because every dj′ with j>n+′ is ≤0 and every bj2≥0. A real number cannot be both >0 and ≤0, so no such v exists, which proves the claim.

On the other hand, U+U′ is a subspace of V, so dim⁡(U+U′)≤n, and the dimension formula (Theorem 1.7.3) gives dim⁡(U∩U′)=dim⁡U+dim⁡U′−dim⁡(U+U′)≥n++(n−n+′)−n=n+−n+′>0. So U∩U′ contains a nonzero vector, contradicting the claim. Therefore n+=n+′, and with it n−=n−′ and n0=n0′. This proves the theorem.

The name comes from mechanics, where the form is an inertia tensor and the theorem says that a change of coordinates cannot turn a direction of positive inertia into one of negative inertia. The invariant has a name of its own.

Definition 14.5.1 (Inertia and Signature)

Let β be a symmetric bilinear form on a real vector space V of dimension n, diagonalized in some orthogonal basis. The triple (n+,n−,n0) of numbers of positive, negative, and zero diagonal entries is the inertia of β, and it is well defined by Theorem 14.5.1. The pair (n+,n−) is the signature of β, and n++n−=rankβ while n0=n−rankβ. The same words are used for a real symmetric matrix A, through the form β(x,y)=x⊤Ay, and we write n+(A), n−(A), n0(A).

Two conventions are in circulation and both are called the signature: the pair (n+,n−), used here, and the single integer n+−n−. They carry the same information once the rank is known, and the difference is only ever notational; where a source writes “signature 2” it means n+−n−=2. The triple (n+,n−,n0) is the safest thing to quote, since it also records the degeneracy.

14.5.3. The classification over the reals

Corollary 14.5.2 (Classification of Real Symmetric Matrices by Signature)

Let A,B∈Mn(R) be symmetric. Then:

  • (a) A is congruent to In+⊕(−In−)⊕On0, where (n+,n−,n0) is the inertia of A, and to no other matrix of this shape;
  • (b) A≃B if and only if A and B have the same inertia;
  • (c) the number of congruence classes of symmetric matrices in Mn(R) is 12(n+1)(n+2).

Proof.

  • (a) The congruence to In+⊕(−In−)⊕On0 is Eq. 14.5.1, obtained from Theorem 14.4.2 followed by the scaling and sorting described above. That matrix is itself diagonal with inertia (n+,n−,n0), so by Theorem 14.5.1 no matrix of the same shape with a different triple can be congruent to A.

  • (b) (⇒) A congruence B=P⊤AP with P invertible is a change of basis for the form (Theorem 14.2.1), so an orthogonal basis diagonalizing B yields one diagonalizing A with the same diagonal, and Theorem 14.5.1 makes the inertia equal.

    (⇐) If A and B have the same inertia, each is congruent to the same matrix In+⊕(−In−)⊕On0 by (a), hence to each other, since congruence is an equivalence relation (Proposition 14.2.2).

  • (c) By (b) the classes correspond to the triples (n+,n−,n0) of nonnegative integers summing to n, equivalently to the pairs (n+,n−) with n++n−≤n. For each value k=n++n−∈{0,1,…,n} there are k+1 choices of n+, so the total is 1+2+⋯+(n+1)=12(n+1)(n+2). This proves the corollary.

So congruence over R has a complete and finite list of invariants, in sharp contrast to similarity, where even 2×2 real symmetric matrices fall into infinitely many classes (one for each unordered pair of eigenvalues). Congruence forgets a great deal; the point of the law of inertia is that what it forgets is precisely everything except the signs.

14.5.4. Reconciling congruence with the spectral theorem

Chapter 12 diagonalized a real symmetric matrix a different way, by an orthogonal Q, and got the eigenvalues on the diagonal. Chapter 12 also pointed out why that theorem is special: because Q⊤=Q−1, the one equation Q⊤AQ=D can be read twice, and “an orthogonal change of variables is a similarity and a congruence, so it keeps the eigenvalues and the geometry at once”. Reading the same equation twice is all that is needed to identify the inertia.

Theorem 14.5.3 (Inertia Is the Sign Pattern of the Spectrum)

Let A∈Mn(R) be symmetric. Then n+(A) is the number of positive eigenvalues of A, counted with multiplicity, n−(A) the number of negative ones, and n0(A) the multiplicity of 0.

Proof. By Corollary 12.5.2 there is an orthogonal Q∈O(n) and a real diagonal D=diag(λ1,…,λn) with A=QDQ⊤, where λ1,…,λn is the eigenvalue list of A with multiplicity. Equivalently D=Q⊤AQ.

Read as a similarity: Q⊤=Q−1, so D=Q−1AQ and the diagonal entries of D are the eigenvalues of A.

Read as a congruence: Q is invertible, so D=Q⊤AQ exhibits D as congruent to A (Definition 14.2.1). Being diagonal, D is the matrix of the form of A in an orthogonal basis, namely the columns of Q. By Theorem 14.5.1 its numbers of positive, negative, and zero entries are the inertia of A.

The same list of numbers is being counted both times, so the counts agree. This proves the theorem.

This is what Chapter 13 promised when, having diagonalized a pencil and found S⊤BS=diag(−1,3) while the eigenvalues of B were 3±32, it observed that the signs (−,+) “match the signs of the eigenvalues of B itself” and said that Chapter 14 would show this is no coincidence. It is not: the congruence S⊤BS has the inertia of B by Theorem 14.5.1, and that inertia is the sign pattern of the spectrum by Theorem 14.5.3. Here 3+32>0 and 3−32<0 — since 32>4 — so the inertia of B is (1,1,0), and any congruent diagonal matrix must show exactly one positive and one negative entry, as diag(−1,3) does.

The same reading settles the definiteness tests of Chapter 13 in one line: A≻O means x⊤Ax>0 for all x≠0, which by Theorem 13.1.5 is the statement that every eigenvalue is positive, which by Theorem 14.5.3 is the statement that the inertia is (n,0,0). Section 6 takes that dictionary further.

Warning. Congruent matrices have the same inertia and unrelated eigenvalues. Take A=diag(1,−1) and P=diag(2,3). Then P⊤AP=diag(4,−9), so A≃diag(4,−9), yet the eigenvalues have moved from 1,−1 to 4,−9. Nothing about their sizes, their ratios, their sum, or their product is preserved — tr goes from 0 to −5, det from −1 to −36 — and only the pattern (+,−) survives. For a second witness with no scaling in sight, I2 is congruent to S⊤S=(1112) with S=(1101); the eigenvalues change from 1,1 to (3±5)/2, and the inertia stays (2,0,0).

14.5.5. Computing a signature

Theorem 14.5.3 gives a method — find the eigenvalues and count signs — but it is the expensive one, since it needs the roots of a degree-n polynomial. The cheap method is the algorithm of the previous section, which needs only arithmetic: diagonalize by paired row and column operations and read off the signs. The eigenvalues are never computed and never needed.

Example (A signature by symmetric elimination)

Find the inertia of A=(112123231), and say whether the form q(x)=x⊤Ax is positive definite.

Solution. The corner entry is 1, so no repair move is needed.

Clear the first row and column. Subtract row 1 from row 2 and 2× row 1 from row 3, then do the same two operations on columns: (11201101−3) ⟶ (10001101−3).

Clear the second row and column. The pivot is 1 and a23=1, so subtract row 2 from row 3 and then column 2 from column 3: (10001100−4) ⟶ diag(1,1,−4).

So the inertia is (2,1,0) and the signature is (2,1). The form is not positive definite: it is negative at the third basis vector of the new basis, namely the third column of P=(1−1−101−1001), which is p3=(−1,−1,1). Checking directly, Ap3=(0,0,−4) and p3⋅(0,0,−4)=−4<0.

The eigenvalue route would have to factor det(xI−A)=x3−4x2−9x+4, whose roots are irrational; the elimination never met them. As a partial check on the arithmetic, detA=−4 and detdiag(1,1,−4)=−4, consistent with detP=1.

Over R, then, a symmetric matrix carries exactly two pieces of congruence data, and both are cheap: its rank and how that rank splits into positive and negative directions. The next section reads the same two numbers as a statement about definiteness, and uses them to decide maxima and minima.

14.5.6. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Define the inertia and the signature of a real symmetric matrix.
  • (b) State Theorem 14.5.1, with all hypotheses.
  • (c) Which part of the inertia is already an invariant before the law of inertia is proved, and by which earlier result?
  • (d) Determine whether the following statement is correct, and justify your answer: congruent real symmetric matrices have the same trace.
  • (e) Explain in one sentence why an orthogonal change of basis lets the spectral theorem compute an inertia.

Solution.

  • (a) Diagonalize the associated form in an orthogonal basis. The inertia is the triple (n+,n−,n0) of numbers of positive, negative, and zero diagonal entries, and the signature is the pair (n+,n−).

  • (b) If β is a symmetric bilinear form on a finite-dimensional real vector space and B,B′ are two orthogonal bases for β, then the two matrices [β]BB and [β]B′B′ have the same numbers of positive, negative, and zero diagonal entries.

  • (c) The count n0, equivalently the sum n++n−, because that sum is the rank and congruence preserves rank (Theorem 14.2.3).

  • (d) Incorrect. diag(1,−1) and diag(4,−9) are congruent, by the congruence with P=diag(2,3), and their traces are 0 and −5. Trace is a similarity invariant (Theorem 4.2.5), not a congruence invariant.

  • (e) For an orthogonal Q we have Q⊤=Q−1, so the single equation Q⊤AQ=D is simultaneously a similarity, which puts the eigenvalues on the diagonal, and a congruence, which makes that diagonal compute the inertia.

B. Practice

Exercise (B1: Signatures by elimination)

Find the inertia of each of the following real symmetric matrices by paired row and column operations. Do not compute any eigenvalues.

  • (a) A=(120213031).
  • (b) B=(011101110).
  • (c) C=(1224).

Solution.

Exercise (B2: Which of these are congruent?)

Sort the following real symmetric matrices into congruence classes, justifying each answer. A1=diag(1,1,−1),A2=diag(5,2,−7),A3=diag(1,−1,−1), A4=(010100001),A5=(20000000−3).

Solution. Compute each inertia and apply Corollary 14.5.2 (b).

A1: (2,1,0). A2: (2,1,0). A3: (1,2,0). A5: (1,1,1).

For A4, the top-left 2×2 block is the form 2x1x2, which Exercise (B2: No pivot on the diagonal) diagonalizes to diag(2,−2); so A4 is congruent to diag(2,−2,1), with inertia (2,1,0).

Therefore the classes are {A1,A2,A4}, {A3}, and {A5}. Note that A1 and A3 have the same rank and are still not congruent, so rank alone does not classify over R — unlike over C (Corollary 14.4.4).

Exercise (B3: Inertia from a characteristic polynomial)

Let A∈M3(R) be symmetric with det(xI−A)=x3−2x2−5x+6.

  • (a) Find the inertia of A.
  • (b) Is A congruent to diag(1,1,−1)? Is it similar to it?

Solution.

  • (a) The polynomial factors as (x−1)(x+2)(x−3), since 1 is a root and dividing gives x2−x−6. The eigenvalues are 1,3,−2, so by Theorem 14.5.3 the inertia is (2,1,0).

  • (b) Congruent: yes, since diag(1,1,−1) also has inertia (2,1,0) and Corollary 14.5.2 (b) applies. Similar: no, because similar matrices have equal characteristic polynomials, and diag(1,1,−1) has (x−1)2(x+1)≠(x−1)(x−3)(x+2).

C. Going deeper

Exercise (C1: An intrinsic description of n+)

Let β be a symmetric bilinear form on a real vector space V of dimension n, with quadratic form q. Call a subspace U⊆V positive if q(v)>0 for every v∈U with v≠0.

  • (a) Prove that n+ is the largest dimension of a positive subspace of V.
  • (b) Deduce Theorem 14.5.1 again from (a), in two lines.
  • (c) State and prove the corresponding description of n−.

Hint: for (a), use an orthogonal basis to produce one positive subspace of dimension n+, and the dimension formula to rule out a larger one.

Solution.

  • (a) Fix an orthogonal basis (v1,…,vn) ordered so that d1,…,dn+>0 and dj≤0 for j>n+.

    A positive subspace of dimension n+. Put U=span(v1,…,vn+). For v=∑i≤n+civi nonzero, Eq. 14.4.1 gives q(v)=∑i≤n+dici2>0, since all di>0 and some ci≠0. So U is positive and dim⁡U=n+.

    No larger one. Let X be positive with dim⁡X=k, and put W=span(vn++1,…,vn), of dimension n−n+. Every w∈W has q(w)=∑j>n+djcj2≤0. If k>n+ then by Theorem 1.7.3, dim⁡(X∩W)≥k+(n−n+)−n=k−n+>0, so there is a nonzero v∈X∩W with q(v)>0 and q(v)≤0, which is impossible. Hence k≤n+, and the maximum is n+.

  • (b) The right-hand side of (a) — the largest dimension of a positive subspace — is defined from β alone and mentions no basis. So the number n+ computed from any orthogonal basis equals that basis-free quantity, hence is the same for all of them. Then n++n−=rankβ is basis-free too (Theorem 14.2.3), so n− and n0 are determined as well.

  • (c) n− is the largest dimension of a negative subspace, one on which q(v)<0 for every v≠0. Apply (a) to the form −β, whose diagonal entries in any orthogonal basis are the negatives of those of β, so that n+(−β)=n−(β), and whose positive subspaces are exactly the negative subspaces of β.

Exercise (C2: Congruence cannot be read off the eigenvalues, and inertia can)
  • (a) Give two real symmetric 2×2 matrices that are congruent but have no eigenvalue in common.
  • (b) Prove that if A and B are real symmetric and similar, then they are congruent.
  • (c) Give two real symmetric 2×2 matrices that are congruent but not similar, so that the converse of (b) fails.

Solution.

  • (a) diag(1,−1) and diag(4,−9), congruent by P=diag(2,3). Their spectra are {1,−1} and {4,−9}, which are disjoint.

  • (b) Similar matrices have the same characteristic polynomial (Theorem 7.10.3), hence the same eigenvalues with multiplicity. By Theorem 14.5.3 they then have the same inertia, and by Corollary 14.5.2 (b) they are congruent. (Alternatively and more directly: by Corollary 12.5.2 each is orthogonally congruent to the diagonal matrix of its eigenvalues, and those diagonal matrices agree up to a permutation.)

  • (c) The pair in (a) again: diag(1,−1) and diag(4,−9) are congruent, but their characteristic polynomials are x2−1 and x2+5x−36, so they are not similar (Theorem 7.10.3). Congruence is strictly coarser than similarity on real symmetric matrices.

Exercise (C3: Inertia of a block matrix)

Let A∈Mm(R) and B∈Mk(R) be symmetric. Let also D∈Mn(R) be symmetric and invertible, let b∈Rn, let c∈R, and put M=(Dbb⊤c)∈Mn+1(R).

  • (a) Prove that the inertia of A⊕B is the entrywise sum of the inertias of A and B.
  • (b) Prove that M is congruent to D⊕(c−b⊤D−1b).
  • (c) Hence find the inertia of M when D=diag(1,−1), b=(1,1), and c=0.

Hint: for (b), the congruence is the block elimination of Chapter 8, and the leftover scalar is a Schur complement.

Solution.

  • (a) Let P⊤AP and Q⊤BQ be the canonical forms of Corollary 14.5.2 (a). Then P⊕Q is invertible and (P⊕Q)⊤(A⊕B)(P⊕Q)=(P⊤AP)⊕(Q⊤BQ), a diagonal matrix whose positive, negative, and zero entries are those of the two blocks together. By Theorem 14.5.1 those counts are the inertia of A⊕B.

  • (b) Put S=(In−D−1b0⊤1), which is invertible, being unit upper triangular. Multiplying, the first block row of MS is (D∣D(−D−1b)+b)=(D∣0), and then S⊤MS=(D00⊤c−b⊤D−1b), using D⊤=D. This is D⊕(c−b⊤D−1b), the Schur complement M/D sitting in the corner.

  • (c) Here D−1=diag(1,−1), so b⊤D−1b=1−1=0 and the leftover scalar is c−0=0. By (b) and (a), the inertia of M is the inertia of diag(1,−1) plus that of the 1×1 zero matrix, namely (1,1,0)+(0,0,1)=(1,1,1). In particular M is singular.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.