14.2  Congruence

The matrix of a form in Definition 14.1.2 depends on a basis, and a basis is a choice. As with linear maps in Chapter 4, the useful question is therefore not “what is the matrix?” but “which matrices arise from the same form?”. The answer here is P⊤AP rather than P−1AP, and one symbol’s difference changes the whole theory: the new relation keeps the rank and the symmetry type of a matrix and throws its eigenvalues away. This section proves the change-of-basis rule, names the relation, sorts the invariants from the casualties, and settles the debt Chapters 12 and 13 ran up when they kept postponing all of this.

Throughout, V is a vector space over an arbitrary field F with dim⁡V=n≥1, and β is a bilinear form on V. No hypothesis on the characteristic of F is needed in this section.

14.2.1. The change-of-basis rule for a form

Two bases B and B′ of V give two matrices for one form. The link between them is the change-of-coordinates matrix of Definition 4.2.1, and the computation is three lines, because Theorem 14.1.1 (a) already expresses the form through coordinates.

Theorem 14.2.1 (Change of Basis for a Form)

Let β be a bilinear form on a finite-dimensional V, let B and B′ be ordered bases of V, and let P=[id]B′B be the change-of-coordinates matrix from B′ to B. Then [β]B′B′=P⊤[β]BBP.

Idea. There is nothing to discover: write the form in B-coordinates, substitute [v]B=P[v]B′ in both slots, and read off the matrix that appears between the two coordinate vectors. The uniqueness clause of Theorem 14.1.1 then says that matrix is the one we want, with no further checking.

Proof. Write A=[β]BB. By Theorem 4.2.1 (a), [v]B=P[v]B′ for every v∈V. So for all u,v∈V, using Theorem 14.1.1 (a) and then Theorem 0.9.5 (part 4), β(u,v)=[u]B⊤A[v]B=(P[u]B′)⊤A(P[v]B′)=[u]B′⊤(P⊤AP)[v]B′. Thus P⊤AP is a matrix with the property that characterizes [β]B′B′, and by the uniqueness in Theorem 14.1.1 (b) it is [β]B′B′. This proves the theorem.

Notice that P is the same matrix as in Theorem 4.2.3: the change-of-coordinates matrix from the new basis to the old one, whose columns are the new basis vectors written in old coordinates. Only the way it acts has changed, from P−1AP to P⊤AP.

Example (Killing the cross term)

On R2, let β(x,y)=x1y1+2x1y2+2x2y1+x2y2, so that A=[β]EE=(1221). Compute [β]B′B′ for B′=((1,0), (−2,1)), both by Theorem 14.2.1 and directly from Definition 14.1.2.

Solution. The columns of P=[id]B′E are the vectors of B′ in standard coordinates, so P=(1−201),AP=(102−3), and therefore P⊤AP=(10−21)(102−3)=(100−3). Directly: with v1′=(1,0) and v2′=(−2,1), the four values are β(v1′,v1′)=1, β(v1′,v2′)=β(v2′,v1′)=0, and β(v2′,v2′)=−3. The two computations agree.

The new basis was not guessed. In coordinates the form reads q(x)=x12+4x1x2+x22=(x1+2x2)2−3x22, a perfect square plus a leftover, and the substitution y1=x1+2x2, y2=x2 — that is, x=Py — is what completing the square asks for. A later section turns this into a theorem and an algorithm.

14.2.2. Congruent matrices

Every invertible P is a change-of-coordinates matrix between some pair of bases (Proposition 4.2.2), so Theorem 14.2.1 says exactly this: the matrices of one form, over all bases, are the matrices P⊤AP with P invertible. That set deserves a name, and the name is the organizing idea of the chapter.

Two matrices are congruent when they record the same form in two bases.

Definition 14.2.1 (Congruent Matrices)

Let A,B∈Mn(F). We say A is congruent to B, written A≃B, if there exists an invertible P∈Mn(F) such that B=P⊤AP.

In words: congruence allows one matrix to be sandwiched by an invertible matrix and its transpose. The word invertible is essential; without it, A↦P⊤AP with P=O would relate everything to O. The transpose, not the inverse, is what distinguishes the relation from similarity (Definition 4.2.2), and the symbol ≃ is chosen to sit near ∼ without being it.

Three immediate readings. First, by Theorem 14.2.1, A≃B if and only if A and B are the matrices of a single bilinear form in two bases. Second, in the language of quadratic expressions on Fn, A≃B says that the substitution x=Py turns x⊤Ax into y⊤By: congruence is invertible change of variables in a quadratic expression. Third, over R it is the relation A↦S∗AS of Chapter 13, because there the star is the transpose.

Example (Congruences and a noncongruence)
  • (a) I2≃(1112) over any field.
  • (b) I2≃diag(4,1) over Q.
  • (c) A≃A for every A.
  • (d) I2≄(1101) over any field.

Solution.

  • (a) Take P=(1101), which is invertible with determinant 1. Then P⊤I2P=P⊤P=(1112).

  • (b) Take P=diag(2,1), invertible over Q. Then P⊤I2P=diag(4,1). Scaling a basis vector by c scales the corresponding diagonal entry by c2, which is the single most useful congruence to have in mind.

  • (c) Take P=In.

  • (d) Suppose (1101)=P⊤I2P=P⊤P for some P. Then, by Theorem 0.9.5, (P⊤P)⊤=P⊤P, so the matrix would be symmetric; it is not. This is the nonexample by minimal change: one entry of (1112) in (a) is altered, and congruence to I2 is lost — not for a subtle reason, but because the altered matrix is not the matrix of a symmetric form in any basis. The general statement is Proposition 14.2.4 below.

Before using the word “congruent” in both directions, we owe the usual check.

Proposition 14.2.2 (Congruence is an equivalence relation)

Congruence is an equivalence relation on Mn(F) (Definition 0.5.2).

Proof. Reflexive: A=In⊤AIn.

Symmetric: suppose B=P⊤AP with P invertible, and put Q=P−1, which is invertible. By Theorem 0.9.5 (part 4), Q⊤P⊤=(PQ)⊤=In⊤=In, so Q⊤BQ=(Q⊤P⊤)A(PQ)=InAIn=A.

Transitive: if B=P⊤AP and C=Q⊤BQ with P,Q invertible, then PQ is invertible and C=Q⊤P⊤APQ=(PQ)⊤A(PQ). This proves the proposition.

So the matrices in Mn(F) fall into congruence classes, and the classification problem of this chapter is to describe them. The rest of the section collects the tools for telling classes apart.

14.2.3. What congruence preserves

Three invariants come out of the definition with almost no work. The first is the rank, which we already know is the co-dimension of the radical (Proposition 14.1.2).

Theorem 14.2.3 (Congruence preserves rank)

Let A,B∈Mn(F) with A≃B. Then rankA=rankB. Consequently, whether the associated form is nondegenerate is a property of the congruence class, and it is legitimate to speak of the rank of a bilinear form, meaning the rank of its matrix in any basis.

Proof. Write B=P⊤AP with P invertible. Then P⊤ is invertible, with inverse (P−1)⊤ (Theorem 0.9.5). Multiplying by invertible matrices on either side does not change the rank (Theorem 3.5.9), so rankB=rank(AP)=rankA. Nondegeneracy is the condition rankA=n by Proposition 14.1.2 (c), so it too depends only on the class. The last sentence follows because, by Theorem 14.2.1, any two matrices of one form are congruent.

The second invariant is the symmetry type. Here “alternating” is used in the matrix sense that Definition 7.2.2 suggests: a zero diagonal on top of skew-symmetry. The next section separates the three conditions carefully; for now we only need that congruence respects each of them.

Proposition 14.2.4 (Congruence preserves the symmetry type)

Let A,B∈Mn(F) with B=P⊤AP for an invertible P.

  • (a) If A⊤=A, then B⊤=B.
  • (b) If A⊤=−A, then B⊤=−B.
  • (c) If A⊤=−A and every diagonal entry of A is 0, the same holds for B.

Each implication is an equivalence, since congruence is symmetric (Proposition 14.2.2).

Proof. By Theorem 0.9.5, B⊤=(P⊤AP)⊤=P⊤A⊤P.

  • (a) If A⊤=A, this is P⊤AP=B.

  • (b) If A⊤=−A, it is P⊤(−A)P=−B.

  • (c) Assume the hypothesis of (c). Then B is skew-symmetric by (b), so only the diagonal is left to check. For any x∈Fn, grouping the terms of the double sum in pairs, x⊤Ax=∑i<j(aij+aji)xixj+∑iaiixi2=0, since aij+aji=0 by skew-symmetry and aii=0 by hypothesis. Writing p1,…,pn for the columns of P, the i-th diagonal entry of B=P⊤AP is bii=ei⊤P⊤APei=pi⊤Api, which is 0 by the display. This proves the proposition.

The third invariant is the determinant, but only in a weakened sense: congruence multiplies it by a square.

Theorem 14.2.5 (Congruence changes the determinant by a square)

Let A,B∈Mn(F) with B=P⊤AP for an invertible P. Then detB=(detP)2detA, with detP≠0. In particular detA=0 if and only if detB=0, and when they are nonzero, detB=c2detA for some c∈F∖{0}.

Proof. By Theorem 7.5.4 and Theorem 7.4.5, detB=det(P⊤)detAdetP=(detP)2detA. Since P is invertible, detP≠0 (Theorem 7.5.2), so (detP)2≠0 and the two determinants vanish together. Taking c=detP gives the last claim.

The determinant itself is therefore not a congruence invariant — Example (Congruences and a noncongruence) (b) moved it from 1 to 4. What is invariant is the determinant read modulo squares. Write F×=F∖{0}, and for a,b∈F× declare a and b equivalent when a=c2b for some c∈F×. This is an equivalence relation on F× (Definition 0.5.2): it is reflexive with c=1, symmetric with c−1, and transitive by multiplying the two scalars. Its classes are called square classes, and the set of them is commonly written F×/(F×)2.

Definition 14.2.2 (Discriminant)

Let β be a nondegenerate bilinear form on an n-dimensional V. The discriminant of β is the square class of det[β]BB in F×, for any ordered basis B of V.

This is well defined by Theorem 14.2.5 and Theorem 14.2.1: another basis changes the determinant by the square (detP)2, hence not its class. The discriminant is coarse but genuinely useful, and how much it sees depends entirely on the field. Over C every nonzero number is a square, so there is only one class and the discriminant says nothing. Over R there are two, {t>0} and {t<0}, so the discriminant records one bit: the sign of the determinant. Over Q there are infinitely many, and the discriminant is a strong invariant.

Quick check. Over R, are diag(1,1) and diag(−1,−1) distinguished by their discriminants?

Solution. No. Both determinants equal 1, so the discriminants agree. And yet the two matrices are not congruent over R. Suppose diag(−1,−1)=P⊤I2P=P⊤P for an invertible P. Evaluating both sides on x=e1 gives −1=e1⊤diag(−1,−1)e1=e1⊤P⊤Pe1=‖Pe1‖2≥0, a contradiction. So the discriminant is not a complete invariant, even over R and even for 2×2 matrices. Proving that the full “sign pattern” is an invariant, and that it is the complete one over R, is the law of inertia, proved later in this chapter.

14.2.4. What congruence destroys

Now the negative result of the section, and the reason the previous three chapters could not have been this one.

Example (Congruent, with no eigenvalue in common)

Solution.

  • (a) I2 has the single eigenvalue 1, twice. The characteristic polynomial of (1112) is x2−3x+1, whose roots are (3±5)/2, that is, approximately 2.618 and 0.382. The two matrices share no eigenvalue. They do share a rank, 2; a symmetry type, symmetric; and a discriminant, since det=1 for both.

  • (b) The characteristic polynomial of (1221) is x2−2x−3=(x−3)(x+1), so its eigenvalues are 3 and −1. Those of diag(1,−3) are 1 and −3. Again no eigenvalue in common — but this time one positive and one negative on each side, and the determinants are −3 both times. The signs survived; the numbers did not. That is the pattern the law of inertia will explain.

Chapter 13 introduced this operation twice and both times deferred it to here. Section 1 of that chapter wrote that “the operation A↦S∗AS is called congruence, and Chapter 14 studies it for its own sake”, keeping only that it preserves the sign of a positive form (Proposition 13.1.2). Section 4 repeated the promise in fuller form: “Chapter 14 studies congruence in its own right, including what it does preserve; for now, note that it certainly does not preserve eigenvalues, since S∗IS=S∗S can be any positive definite matrix at all.”

Both debts are now paid, and it is worth saying the answer in one place. What congruence preserves: the rank (Theorem 14.2.3), and with it nondegeneracy and the dimension of the radical; the symmetry type (Proposition 14.2.4); and the square class of the determinant when that is nonzero (Theorem 14.2.5), the discriminant. Over R it preserves one thing more, the triple of signs, and that is the deepest of the four; it is proved in the section on inertia. What congruence destroys: the eigenvalues, and therefore the characteristic polynomial, the trace, and the determinant itself. Not every similarity invariant is lost — rank and invertibility, parts (a) and (b) of Proposition 4.2.6, survive both relations — but every invariant that reads the eigenvalues is. Chapter 13’s parenthetical remark is exactly right and can be made sharper: taking A=In in Definition 14.2.1, the congruence class of In over R is the set of all matrices P⊤P with P invertible, which by Theorem 13.1.5 (c) is the set of all positive definite matrices. One class, every spectrum with all eigenvalues positive.

Warning. Congruent and similar are different relations, and neither implies the other. By Example (Congruent, with no eigenvalue in common) (a), I2≃(1112), while the only matrix similar to I2 is I2 itself, since P−1I2P=I2 for every invertible P. In the other direction, diag(1,2) is similar to (1−102) — conjugate by (1101) — but not congruent to it, because diag(1,2) is symmetric and the other matrix is not (Proposition 14.2.4). So do not carry any habit across. In particular, “diagonalizable” means two different things in this chapter, and a matrix that is diagonalizable by congruence need not be diagonalizable by similarity, nor conversely.

14.2.5. Where the two relations meet

There is exactly one situation in which the confusion is harmless: when the change-of-basis matrix satisfies P⊤=P−1, that is, when P is orthogonal (Definition 11.7.3).

Proposition 14.2.6 (An orthogonal change of basis is both)

Let A∈Mn(R) and Q∈O(n). Then Q⊤AQ=Q−1AQ, so this matrix is at once congruent and similar to A. Consequently, if A is symmetric, then A is congruent to the diagonal matrix D of its eigenvalues, listed with multiplicity in any prescribed order.

Proof. The first statement is the definition of an orthogonal matrix, Q⊤Q=In, which gives Q⊤=Q−1; the matrix Q⊤AQ is then congruent to A by Definition 14.2.1, since Q is invertible, and similar to A by Definition 4.2.2.

For the second statement, let A be symmetric. By Corollary 12.5.2 there are Q∈O(n) and a real diagonal D, carrying the eigenvalues of A in any prescribed order, with A=QDQ⊤. Multiplying on the left by Q⊤ and on the right by Q gives D=Q⊤AQ, which is a congruence. This proves the proposition.

This is why the real spectral theorem is so strong, and it is what Chapter 12 meant when it said, of the principal axis theorem, that “an orthogonal change of variables is a similarity and a congruence, so it keeps the eigenvalues and the geometry at once”. The general theory of this chapter has no orthogonal matrices to call on — a general field has no inner product, hence no orthogonal group in that sense — so the two relations part company and only congruence remains. What Proposition 14.2.6 gives over R is a bridge: it says that every real symmetric matrix is congruent to a diagonal matrix, and it identifies the diagonal entries as eigenvalues. The section on inertia will show that the entries are free to move but their signs are not, which is how the two pictures are finally reconciled.

Quick check. Over R, which matrices are congruent to In?

Solution. Exactly the positive definite symmetric matrices. If B=P⊤InP=P⊤P with P invertible, then B is symmetric and x⊤Bx=‖Px‖2>0 for x≠0, since Px≠0. Conversely every positive definite B is P⊤P for an invertible P by Theorem 13.1.5. Compare the similarity class of In, which contains In alone: one relation collapses this class to a point, the other spreads it over every positive definite matrix there is.

14.2.6. Exercises

A. Check your understanding

Exercise (A1)
  • (a) State the change-of-basis rule for the matrix of a bilinear form, saying which matrix P appears.
  • (b) Define what it means for A,B∈Mn(F) to be congruent.
  • (c) For each of rank, symmetry, determinant, eigenvalues, and the square class of a nonzero determinant, say whether it is a congruence invariant.
  • (d) Determine whether the following is correct, with a reason: congruent matrices are similar.
  • (e) State the one circumstance in which a change of basis is simultaneously a similarity and a congruence.

Solution.

B. Practice

Exercise (B1: A congruence in Q)

Let A=(0110) and P=(111−1), both over Q.

  • (a) Compute P⊤AP, and hence write down a matrix congruent to A that is diagonal.
  • (b) Find the eigenvalues of both matrices and compare them.
  • (c) Compute the discriminant of the form x⊤Ay and check that it agrees for the two matrices.

Solution.

  • (a) P is invertible, with detP=−2≠0. Then AP=(1−111),P⊤AP=(200−2). So A≃diag(2,−2) over Q.

  • (b) The characteristic polynomial of A is x2−1, so its eigenvalues are 1 and −1; those of diag(2,−2) are 2 and −2. No eigenvalue is shared, and each matrix has one positive and one negative eigenvalue.

  • (c) detA=−1 and detdiag(2,−2)=−4=(−2)2⋅(−1), which is the relation detB=(detP)2detA of Theorem 14.2.5. The two determinants differ by the square 4, so they lie in the same square class of Q× and the discriminants agree, as Definition 14.2.2 requires.

Exercise (B2: A noncongruence over Q)
  • (a) Prove that diag(1,1) and diag(1,2) are not congruent over Q.
  • (b) Prove that they are congruent over R, by exhibiting P.
  • (c) Explain in one sentence why (a) and (b) are consistent.

Solution.

  • (a) Suppose diag(1,2)=P⊤diag(1,1)P with P∈M2(Q) invertible. By Theorem 14.2.5, 2=(detP)2⋅1, so detP∈Q would satisfy (detP)2=2. No rational number squares to 2 (Theorem 0.2.3), a contradiction. Hence the two are not congruent over Q.

  • (b) Take P=diag(1,1/2), which is invertible over R. Then P⊤diag(1,2)P=diag(1,1), and congruence is symmetric (Proposition 14.2.2).

  • (c) Congruence is a relation over a specified field: the matrix P is required to have entries in that field, and 1/2 is available in R but not in Q. Equivalently, 2 is a square in R× and not in Q×, so the discriminant separates the two matrices over Q and not over R.

Exercise (B3: Completing the square, again)

On R2, let β(x,y)=x1y1−x1y2−x2y1+2x2y2.

  • (a) Write down A=[β]EE and expand q(x)=β(x,x) as a polynomial in x1,x2.
  • (b) Complete the square to find a basis B′ with [β]B′B′=I2. Verify by computing P⊤AP.
  • (c) Hence find the eigenvalues of A and compare them with those of I2.

Solution.

  • (a) A=(1−1−12), and q(x)=x12−2x1x2+2x22.

  • (b) q(x)=(x1−x2)2+x22. So the substitution y1=x1−x2, y2=x2, that is x1=y1+y2 and x2=y2, makes q=y12+y22. This is x=Py with P=(1101),AP=(10−11),P⊤AP=I2. By Theorem 14.2.1 the basis is B′=((1,0), (1,1)), the columns of P.

  • (c) The characteristic polynomial of A is x2−3x+1, with roots (3±5)/2; I2 has the eigenvalue 1 twice. The two matrices are congruent with no eigenvalue in common. What they share is that all eigenvalues are positive on both sides, which by the check above is no accident: the congruence class of I2 over R consists of exactly the positive definite matrices.

C. Going deeper

Exercise (C1: Congruence versus equivalence)
  • (a) Prove that if A≃B then A and B are equivalent in the sense of Definition 4.3.1.
  • (b) Give two matrices in M2(Q) that are equivalent but not congruent, and justify your example.
  • (c) Hence explain what “the congruence classes refine the equivalence classes” means, and say what extra information a congruence class carries that a rank does not.

Solution.

  • (a) If B=P⊤AP with P invertible, then P⊤ is invertible (Theorem 0.9.5), so B=QAP with Q=P⊤ and P both invertible, which is Definition 4.3.1.

  • (b) Take diag(1,1) and diag(1,2). Both have rank 2, so they are equivalent by Theorem 4.3.3 (c). They are not congruent over Q by Exercise (B2: A noncongruence over Q) (a).

  • (c) By (a), each congruence class lies inside a single equivalence class, and by (b) an equivalence class may split into more than one congruence class; that is what “refine” means. An equivalence class is named by the rank alone (Theorem 4.3.3 (c)). A congruence class remembers the rank, and in addition the symmetry type and the discriminant — and over R, the signs. Equivalence allows two independent changes of basis, one in each slot; congruence allows only one, used twice, and the extra invariants are the price of that constraint.

Exercise (C2: Orthogonal congruence)

Let A∈Mn(R) be symmetric with eigenvalues λ1,…,λn, listed with multiplicity.

  • (a) Prove that A≃diag(λ1,…,λn).
  • (b) Deduce that if every λi is nonzero, then A is congruent to a diagonal matrix all of whose entries are ±1.
  • (c) Give two real symmetric 2×2 matrices that are congruent and have no eigenvalue in common.

Hint for (b): recall from Example (Congruences and a noncongruence) (b) what scaling a basis vector does to a diagonal entry.

Solution.

  • (a) This is Proposition 14.2.6: by Corollary 12.5.2 there is Q∈O(n) with Q⊤AQ=D=diag(λ1,…,λn), and Q is invertible, so A≃D.

  • (b) Let S=diag(c1,…,cn) with ci=1/|λi|, which is defined and nonzero because λi≠0. Then S is invertible and S⊤DS=diag(c12λ1,…,cn2λn), whose i-th entry is λi/|λi|=±1 according to the sign of λi. By (a) and transitivity (Proposition 14.2.2), A is congruent to that matrix.

  • (c) By (b), diag(1,−3) and diag(2,−1) are both congruent to diag(1,−1), hence to each other by Proposition 14.2.2; explicitly, P=diag(2,1/3) gives P⊤diag(1,−3)P=diag(2,−1). Their eigenvalues are {1,−3} and {2,−1}, which are disjoint. Note that the signs match, one positive and one negative on each side; part (b) is the reason, and the law of inertia will say it is forced.

Exercise (C3: How much the discriminant sees)
  • (a) Show that C× has exactly one square class, and that R× has exactly two.
  • (b) List the squares in F5× and show that F5× has exactly two square classes.
  • (c) Hence determine, for each of C, R, and F5, the largest number of pairwise noncongruent invertible matrices in Mn that the discriminant alone can distinguish.

Solution.

  • (a) Over C, every a≠0 has a square root (Example (Square Roots of 5−12i)), so a=c2⋅1 and every element is equivalent to 1: one class. Over R, squares of nonzero reals are exactly the positive reals, so a and b are equivalent precisely when a/b>0, which happens exactly when they have the same sign. The classes are the positive reals and the negative reals: two classes, and they are distinct since 1 and −1 are not related.

  • (b) The squares are 12=1, 22=4, 32=4, 42=1, so the set of nonzero squares is {1,4}. Multiplying {1,4} by 2 gives {2,3}, so the classes are {1,4} and {2,3}: two classes, each of size 2, covering all four elements of F5×.

  • (c) The discriminant takes one value per square class, so it can separate at most as many classes as there are square classes: one over C, two over R, and two over F5. Over C it is therefore useless, and over R and F5 it sorts invertible matrices into at most two piles. By Exercise (C2: Orthogonal congruence) (b), over R every invertible symmetric matrix is congruent to one of the n+1 matrices Ip⊕−In−p, whose determinant is (−1)n−p; so the discriminant sees only the parity of n−p, and for n≥2 it cannot separate, say, I2 from −I2. That the n+1 matrices really are pairwise noncongruent is the law of inertia, not anything the discriminant can deliver.

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.