9.6  The Cayley–Hamilton Theorem

An operator on an n-dimensional space now carries two monic polynomials. The characteristic polynomial pT comes from determinants and has degree exactly n. The minimal polynomial mT comes from the ideal of polynomials that kill T, and the previous section showed that it has the same roots as pT. Chapter 7 stated, without proof, the fact that ties the two together: every square matrix satisfies its own characteristic polynomial. Chapter 7 also warned against a one-line fake proof of that statement. This section gives a real proof, built on the adjugate identity of Chapter 7 read over F[x]. It then draws the consequences: mT divides pT, inverses are polynomials, and high powers of a matrix reduce to low ones.

9.6.1. The statement, and a proof that is not one

Chapter 6 proved that every operator on an n-dimensional space is killed by some nonzero polynomial of degree at most n2 (Theorem 6.7.2). The bound came from counting: L(V) has dimension n2. Counting cannot do better, yet in every example so far a polynomial of degree at most n sufficed. The characteristic polynomial always has degree n, and it is the natural candidate.

Theorem 9.6.1 (Cayley–Hamilton Theorem)

Let n≥1 and A∈Mn(F). Then pA(A)=O. Likewise, if V is a finite-dimensional vector space over F with dim⁡V≥1 and T∈L(V), then pT(T)=0.

Here pA(A) means what it always means (Definition 0.9.14): if pA=xn+cn−1xn−1+⋯+c1x+c0, then pA(A)=An+cn−1An−1+⋯+c1A+c0In, an n×n matrix, with the constant term becoming c0In.

For n=2 the theorem can be checked by hand. With A=(abcd), pA=x2−(trA)x+detA, and Exercise (C2: Nilpotent 2×2 matrices) (b) multiplied out A2−(a+d)A+(ad−bc)I2=O. For n=3, the same brute force already involves cubic expressions in nine entries, and for general n it is hopeless. We need an argument. There is a tempting one, and we name it before it can do any harm.

Warning. The fake proof of Cayley–Hamilton, again. “Since pA(x)=det(xI−A), substitute x=A to get pA(A)=det(AI−A)=detO=0.” Chapter 7 (the warning at the end of its §10) explained why this is not a proof. The left side pA(A) is a matrix, while det(⋯) is a scalar, so the equation compares objects of different kinds. And substituting A for x inside the entries of xI−A is not what substituting into a polynomial means: the entry x−a11 would have to become the matrix A−a11I, and the determinant of a matrix whose entries are matrices is undefined. The same “argument” applied to q(x)=tr(xI−A)=nx−trA would prove q(A)=O, which is false for A=diag(1,0): there q(A)=2A−I=diag(1,−1). Any correct proof must keep x a polynomial variable until the very end, and only then put a matrix in its place.

9.6.2. A proof through the adjugate

The adjugate identity of Chapter 7 says MadjM=(detM)I for every square matrix M, and the remark after Theorem 7.6.2 notes that its proof works over any commutative ring. Over F[x], with M=xI−A, it reads (1)(xI−A)adj(xI−A)=pA(x)I. This is an identity between matrices of polynomials, and it contains pA on the right. The proof extracts pA(A) from it legally.

Idea. Try n=2 first. By Exercise (C3: An adjugate over F[x]) (b) (done there over R, but the computation works over any field), adj(xI−A)=xI−adjA, a polynomial in x with matrix coefficients B1=I and B0=−adjA. Expanding the left side of (1), (xI−A)(xI−adjA)=x2I−x(A+adjA)+AadjA. Comparing the coefficients of x2, x, and 1 with those of (x2−(trA)x+detA)I gives three matrix equations: I=I,−(A+adjA)=−(trA)I,AadjA=(detA)I. Now multiply the first by A2, the second by A, the third by I, and add. The right sides add up to A2−(trA)A+(detA)I=pA(A). The left sides add up to A2−A2−AadjA+AadjA, in which every term cancels against its neighbor. So pA(A)=O. This is the whole proof; for general n there are n+1 equations and the cancellation is a telescoping sum. The variable x is never replaced by a matrix: we compare coefficients first, and only then multiply the resulting matrix equations by powers of A.

Proof. Let pA=cnxn+cn−1xn−1+⋯+c1x+c0 with cn=1 (Theorem 7.10.2).

Step 1: the adjugate as a polynomial with matrix coefficients. If n=1, then adj(xI−A)=(1) by Definition 7.6.2. If n≥2, each entry of adj(xI−A) is a cofactor ±detN, where N is an (n−1)×(n−1) submatrix of xI−A (Definition 7.6.2, Definition 7.6.1). Every entry of N lies in F[x]≤1. A product of n−1 such polynomials lies in F[x]≤n−1 (Theorem 0.8.3, the zero polynomial being harmless), and so does a sum of such products (Theorem 0.8.2); in particular the Leibniz sum detN does (Definition 7.4.1). In both cases every entry of adj(xI−A) lies in F[x]≤n−1. For 0≤k≤n−1, let Bk∈Mn(F) be the matrix whose (i,j)-entry is the coefficient of xk in the (i,j)-entry of adj(xI−A). Then, entry by entry, adj(xI−A)=∑k=0n−1xkBk. Put B−1=Bn=O for convenience.

Step 2: compare coefficients. By (1), which holds by Theorem 7.6.2 over the commutative ring F[x] (the remark after it), the (i,j)-entries of both sides of (1) agree. On the left, by Definition 0.9.9, ∑l=1n(xδil−ail)∑k=0n−1(Bk)ljxk=∑k=0n−1(Bk)ijxk+1−∑k=0n−1(ABk)ijxk, where δil=1 if i=l and 0 otherwise. So for 0≤k≤n, the coefficient of xk is (Bk−1)ij−(ABk)ij. On the right the (i,j)-entry is pAδij, whose coefficient of xk is ckδij. Two polynomials are equal exactly when their coefficients are equal (Definition 0.8.1). Since this holds for every (i,j), (2)Bk−1−ABk=ckI(0≤k≤n).

Step 3: telescope. Multiply equation (2) for k on the left by Ak, and add the n+1 equations. On the right we get ∑k=0nckAk=pA(A) by Definition 0.9.14. On the left, writing Sk=AkBk−1 for 0≤k≤n+1, ∑k=0n(AkBk−1−Ak+1Bk)=∑k=0n(Sk−Sk+1)=S0−Sn+1=B−1−An+1Bn=O, since B−1=Bn=O. Hence pA(A)=O.

The operator version. Let B be a basis of V and A=[T]BB. By Definition 7.10.2, pT=pA. By Corollary 4.1.3, [pT(T)]BB=pT(A)=pA(A)=O, so pT(T)=0 (Theorem 4.1.4). This proves the theorem.

Compare with the fake proof. There, A was pushed into the entries of xI−A. Here, (1) is first unpacked into the n+1 matrix equations (2), which contain no x at all, and A enters only when we multiply those equations by Ak. Every multiplication is on the left, so no commutativity of matrices was used; the only commutativity used is inside F[x], in the adjugate identity.

Nothing in the proof divides. The determinant, the adjugate identity, coefficient comparison, and matrix multiplication all make sense over a commutative ring, and Exercise (C1: Cayley–Hamilton over a commutative ring) asks you to check that the theorem holds, with the same proof, for matrices with entries in a commutative ring such as Z or R[t].

The proof also produced more than it was asked for. Equation (2) with k=n says Bn−1=I, and the others say Bk−1=ABk+ckI. Working down from Bn−1, every Bk is a polynomial in A; Exercise (C2: The adjugate is a polynomial in the matrix) turns this into a formula for adjA.

9.6.3. Consequences

The first consequence is the promised comparison of the two polynomials.

Corollary 9.6.2 (The Minimal Polynomial Divides the Characteristic Polynomial)

Let V be finite-dimensional with dim⁡V=n≥1, and let T∈L(V).

  • (a) mT∣pT; in particular 1≤deg⁡mT≤n.
  • (b) If pT splits over F, say pT=(x−λ1)a1⋯(x−λk)ak with distinct λi, then mT=(x−λ1)s1⋯(x−λk)skwith 1≤si≤ai=aT(λi).

The same holds for A∈Mn(F) with mA and pA. In particular, over C, (b) applies to every A∈Mn(C).

Proof.

This pays off a promise from Chapter 6: the bound n2 of Theorem 6.7.2 improves to n, and pT is an explicit annihilating polynomial of degree exactly n. It also makes Method 2 of the previous section a finite search that always succeeds. For a matrix with pA=(x−2)2(x−3), the corollary leaves exactly two candidates, (x−2)(x−3) and (x−2)2(x−3), and one matrix product decides between them.

Warning. Cayley–Hamilton gives an annihilating polynomial, not the minimal one. From pA(A)=O we may not conclude mA=pA; only mA∣pA. For A=diag(1,1,2), pA=(x−1)2(x−2) kills A, and so does the proper divisor (x−1)(x−2)=mA. Nor may we conclude that every divisor of pA with the right roots kills A: for J=(1101), x−1 has the right root and does not.

The second consequence expresses inverses through powers.

Corollary 9.6.3 (The Inverse Is a Polynomial in the Matrix)

Let n≥1, A∈Mn(F), and pA=xn+cn−1xn−1+⋯+c1x+c0. Then c0=(−1)ndetA. If A is invertible, then c0≠0 and A−1=−1c0(An−1+cn−1An−2+⋯+c2A+c1I). (For n=1 the bracket is I alone, and the formula reads A−1=−c0−1I.) The same holds for an invertible operator T on a space of dimension n≥1, with idV in place of I.

Proof. By Theorem 7.10.2, c0=(−1)ndetA, which is nonzero when A is invertible (Theorem 7.5.3). By Theorem 9.6.1, A(An−1+cn−1An−2+⋯+c1I)=An+cn−1An−1+⋯+c1A=−c0I. Multiplying by −c0−1, the matrix in parentheses times −c0−1 is a right inverse of A, hence the inverse by Theorem 3.4.5. For an operator, apply this to [T]BB and use Corollary 4.1.3.

So inverting an n×n matrix never requires more than its first n−1 powers and the coefficients of pA. The theorem also reduces every power of A to the first n−1. Divide xN by pA (Theorem 6.1.1): xN=qpA+r with deg⁡r<n. Then by Theorem 6.7.1 and Theorem 9.6.1, AN=q(A)pA(A)+r(A)=r(A). When pA has n distinct roots λ1,…,λn, the remainder can be found without long division. Substituting x=λi in xN=qpA+r gives r(λi)=λiN for each i, and these n conditions determine r∈F[x]≤n−1 by Lagrange interpolation (Theorem 6.6.1). This substitution is legal: λi is a scalar plugged into an identity of polynomials.

Example (Cayley–Hamilton for a 3×3 Matrix)

Let A=(110001101)∈M3(Q). Compute pA and verify pA(A)=O. Then use it to find A−1 and A5, and write down the matrices Bk of the proof.

Solution. Characteristic polynomial. Expand det(xI−A) along the first row (Theorem 7.6.1 over Q[x]): pA=det(x−1−100x−1−10x−1)=(x−1)det(x−10x−1)+(−1)(−1)1+2det(0−1−1x−1). The two minors are x(x−1) and −1, so pA=x(x−1)2−1=x3−2x2+x−1. As a check, trA=2 matches the coefficient −2 of x2, and c0=−1=(−1)3detA says detA=1.

Verification. Multiplying out, A2=(111101211),A3=AA2=(212211322). Then A3−2A2+A−I has first row (2−2+1−1, 1−2+1, 2−2+0)=(0,0,0), second row (2−2+0, 1−0+0−1, 1−2+1)=(0,0,0), and third row (3−4+1, 2−2+0, 2−2+1−1)=(0,0,0). So pA(A)=O, as the theorem predicts.

Inverse. Here c0=−1, c1=1, c2=−2. By Corollary 9.6.3, A−1=A2−2A+I=(0−1111−1010). Check: the first row of AA−1 is (0+1, −1+1, 1−1)=(1,0,0), and the other rows work the same way. The entries are integers, as they must be for an integer matrix of determinant 1 (Corollary 7.6.5).

Fifth power. The relation A3=2A2−A+I lets us lower degrees step by step: A4=2A3−A2+A=2(2A2−A+I)−A2+A=3A2−A+2I, A5=3A3−A2+2A=3(2A2−A+I)−A2+2A=5A2−A+3I. (Equivalently, x5=(x2+2x+3)pA+(5x2−x+3).) Hence A5=5(111101211)−(110001101)+3I=(745534957).

The matrices of the proof. By (2), B2=I, B1=AB2+c2I=A−2I, and B0=AB1+c1I=A2−2A+I. So adj(xI−A)=x2I+x(A−2I)+(A2−2A+I)=(x2−xx−111x2−2x+1x−1x1x2−x), which one can confirm entry by entry from cofactors of xI−A; for instance the (1,3)-entry is the cofactor C31=det(−10x−1)=1. The last equation of (2), −AB0=c0I=−I, is the statement A−1=B0 found above.

Quick check. Let A∈M2(R) with trA=5 and detA=6. Write A2 and A3 as combinations of A and I, and write A−1 the same way.

Solution. pA=x2−5x+6, so by Theorem 9.6.1 A2=5A−6I. Then A3=5A2−6A=5(5A−6I)−6A=19A−30I. By Corollary 9.6.3 with c0=6 and c1=−5, A−1=−16(A−5I)=16(5I−A).

Alternatively. When pT splits, there is a second proof that avoids determinants of polynomial matrices entirely. The next section shows that such an operator has an upper triangular matrix, and a triangular matrix reveals directly why the product (T−λ1idV)⋯(T−λnidV) is zero. That proof is set out as an exercise there. The adjugate proof has the advantage of working over every field at once, with no splitting hypothesis.

9.6.4. Exercises

A. Check your understanding

Exercise (A1)
  • (a) State the Cayley–Hamilton Theorem for A∈Mn(F).
  • (b) True or false: deg⁡mA≤n for every A∈Mn(F), n≥1. Justify your answer.
  • (c) In one sentence, why is “pA(A)=det(AI−A)=0” not a proof?
  • (d) Suppose pA=(x−1)2(x+2). Which polynomials can mA be?
  • (e) True or false: if pA(A)=O, then pA is the minimal polynomial of A. Justify your answer.
  • (f) How do you write A−1 as a polynomial in A when A is invertible?

Solution.

  • (a) If n≥1 and A∈Mn(F), then pA(A)=O (Theorem 9.6.1).

  • (b) True. By Corollary 9.6.2, mA∣pA, and deg⁡pA=n.

  • (c) It substitutes a matrix into the entries of xI−A and then equates the matrix pA(A) with the scalar detO, neither of which is legitimate.

  • (d) By Corollary 9.6.2 (b), mA=(x−1)s(x+2)t with 1≤s≤2 and t=1: so (x−1)(x+2) or (x−1)2(x+2). Both occur, for diag(1,1,−2) and for (1101)⊕(−2) (Proposition 9.5.6).

  • (e) False. pI2=(x−1)2 kills I2, but mI2=x−1.

  • (f) If pA=xn+cn−1xn−1+⋯+c0, then c0=(−1)ndetA≠0 and A−1=−c0−1(An−1+cn−1An−2+⋯+c1I) (Corollary 9.6.3).

B. Practice

Exercise (B1: Inverse and a hundredth power)

Let A=(3−210)∈M2(R).

  • (a) Find pA, and use the Cayley–Hamilton Theorem to compute A−1.
  • (b) Hence find A100 as a combination aA+bI, and write it as a matrix.

Solution.

  • (a) trA=3 and detA=2, so pA=x2−3x+2=(x−1)(x−2). By Theorem 9.6.1, A2−3A+2I=O, that is, A(3I−A)=2I. By Corollary 9.6.3, A−1=12(3I−A)=(01−1232). Check: AA−1=(0+13−301)=I.

  • (b) By Theorem 6.1.1, x100=qpA+(ax+b) for some q and scalars a,b. Substituting the roots x=1 and x=2 of pA gives 1=a+b and 2100=2a+b. So a=2100−1 and b=2−2100. By Theorem 9.6.1, A100=q(A)pA(A)+aA+bI=aA+bI, that is, A100=(2100−1)A+(2−2100)I=(2101−12−21012100−12−2100). For k=1 in place of 100, the same recipe gives a=1, b=0, and returns A, as it should.

Exercise (B2: Trace zero in size two)
  • (a) Let A∈M2(F) with trA=0. Prove that A2=−(detA)I.
  • (b) Deduce that for all X,Y∈M2(F), the matrix (XY−YX)2 is a scalar multiple of I.
  • (c) Show that the converse of (a) fails: give A∈M2(R) with A2 scalar and trA≠0.

Solution.

  • (a) By Theorem 9.6.1, A2−(trA)A+(detA)I=O. With trA=0, this is A2=−(detA)I.

  • (b) By Theorem 4.5.3 applied to TX,TY, or directly by tr(XY)=tr(YX), we have tr(XY−YX)=0. By (a), (XY−YX)2=−det(XY−YX)I.

  • (c) A=I2 has A2=I2 and trA=2≠0.

Exercise (B3: Minimal polynomial from one product)

Each of the real matrices M1=(210020−113),M2=(200020−103) has characteristic polynomial (x−2)2(x−3). Find mM1 and mM2. Are M1 and M2 similar?

Solution. By Corollary 9.6.2 (b), each minimal polynomial is (x−2)(x−3) or (x−2)2(x−3), and only the first needs testing.

For M1: M1−2I=(010000−111) and M1−3I=(−1100−10−110). The first row of the product (M1−2I)(M1−3I) is row 2 of M1−3I, namely (0,−1,0)≠0. So mM1=(x−2)2(x−3).

For M2: M2−2I=(000000−101) and M2−3I=(−1000−10−100). The only nonzero row of the product is −(row 1)+(row 3) of M2−3I, which is (1,0,0)+(−1,0,0)=0. So the product is O, and mM2=(x−2)(x−3).

The minimal polynomials differ, so M1≁M2 by Theorem 9.5.5.

C. Going deeper

Exercise (C1: Cayley–Hamilton over a commutative ring)

Let R be a commutative ring (the remark in Chapter 7, §4), and suppose, as for F[x], that the polynomials in x with coefficients in R form a commutative ring R[x] in which two polynomials are equal exactly when all their coefficients are equal. For A∈Mn(R), define pA=det(xI−A)∈R[x].

  • (a) Go through the proof of Theorem 9.6.1 and name, for each step, the fact it uses. Explain why each fact holds over R and R[x], and conclude that pA(A)=O for every A∈Mn(R).
  • (b) Let R=R[t] and A=(t1t20). Compute pA and verify pA(A)=O directly.
  • (c) Let A∈Mn(Z) with detA=±1. Using (a) with R=Z, show that A−1 has integer entries.

Solution.

  • (a) The shape of pA. In the Leibniz sum for det(xI−A), the identity permutation contributes (x−a11)⋯(x−ann), of degree n with leading coefficient 1, and every other term omits at least two diagonal entries, so it has degree at most n−2. Hence pA=xn+cn−1xn−1+⋯+c0 with ck∈R, which is what the proof uses in place of Theorem 7.10.2; only sums and products of entries appear. Step 1 uses the Leibniz formula over R[x] (which only multiplies and adds entries) and the degree bounds for sums and products, which hold because the degree of a product of polynomials is at most the sum of the degrees; no inverse is needed for the upper bound. Step 2 uses the adjugate identity over the commutative ring R[x], which holds by the remark after Theorem 7.6.2, and coefficient comparison in R[x], which is the assumption on R[x]. Step 3 uses only associativity and distributivity of matrix multiplication over R and a telescoping sum. No step divides, so each works verbatim over R, and pA(A)=O.

  • (b) xI−A=(x−t−1−t2x), so pA=x(x−t)−t2=x2−tx−t2. Then A2=(t2+t2tt3t2),A2−tA−t2I=(2t2−t2−t2t−tt3−t3t2−0−t2)=O.

  • (c) The Leibniz formula for det(xI−A) only adds and multiplies integers and x, so the coefficients ck of pA are integers. Regarding A as a rational matrix, Theorem 7.10.2 gives c0=(−1)ndetA=±1. By (a), A(An−1+cn−1An−2+⋯+c1I)=−c0I. Since c02=1, multiplying by −c0 gives AB=I with B=−c0(An−1+⋯+c1I)∈Mn(Z). Regarding A and B as rational matrices, Theorem 3.4.5 gives B=A−1, which therefore has integer entries. (This reproves part of Corollary 7.6.5.)

Exercise (C2: The adjugate is a polynomial in the matrix)

Let n≥2, A∈Mn(F), pA=xn+cn−1xn−1+⋯+c0, and let B0,…,Bn−1 be as in the proof of Theorem 9.6.1.

  • (a) Using equation (2) of the proof, show that B0=An−1+cn−1An−2+⋯+c2A+c1I.
  • (b) Show that the constant matrix B0 equals adj(−A), and that adj(−A)=(−1)n−1adjA.
  • (c) Deduce that for every A∈Mn(F), invertible or not, adjA=(−1)n−1(An−1+cn−1An−2+⋯+c2A+c1I).
  • (d) Check (c) for S=(123246101), whose adjugate Chapter 7 computed (the warning after Corollary 7.6.3), given that pS=x3−6x2+2x.

Solution.

  • (a) Equation (2) with k=n gives Bn−1=cnI=I, and for 1≤k≤n−1 it gives Bk−1=ABk+ckI. By downward induction on k, Bk−1=An−k+cn−1An−k−1+⋯+ckI: this holds for k=n, and if it holds for k, then Bk−2=ABk−1+ck−1I=An−k+1+cn−1An−k+⋯+ckA+ck−1I. The case k=1 is the claim.

  • (b) Each entry of adj(xI−A) is a cofactor ±detN of xI−A, and its constant coefficient is its value at 0. By Lemma 8.3.7, (detN)(0)=detN(0), and N(0) is the corresponding submatrix of −A. So the matrix of constant coefficients, B0, is adj(−A). Each cofactor of −A is ± the determinant of an (n−1)×(n−1) submatrix of −A, which is −1 times the corresponding submatrix of A. Multiplying each of the n−1 rows by −1 multiplies the determinant by (−1)n−1 (Theorem 7.5.1). Hence adj(−A)=(−1)n−1adjA.

  • (c) By (a) and (b), (−1)n−1adjA=B0=An−1+cn−1An−2+⋯+c1I; multiply by (−1)n−1. Nothing assumed detA≠0.

  • (d) Here n=3, c2=−6, c1=2, so the formula predicts adjS=S2−6S+2I. Now S2=(81018162036224),S2−6S+2I=(8−6+210−1218−1816−1220−24+236−362−624−6+2)=(4−204−20−420), which is the adjugate found in Chapter 7.

Exercise (C3: Nilpotent matrices of size n)

Let F be any field, n≥1, and A∈Mn(F) with Ak=O for some k≥1.

  • (a) Prove that mA=xs for some s with 1≤s≤n.
  • (b) Deduce that An=O.
  • (c) Give a 3×3 example with A2≠O, and explain why no 3×3 matrix has A3≠O=A4.

Solution.

  • (a) xk annihilates A, so mA∣xk (Theorem 9.5.1). The polynomial x is monic and irreducible (degree 1), so by Lemma 9.5.2, mA=xs with 0≤s≤k. By Corollary 9.6.2 (a), 1≤s=deg⁡mA≤n.

  • (b) xn=xn−sxs, so mA∣xn and An=O by Theorem 9.5.1.

  • (c) The matrix N of the Quick check in Section 5 has N2≠O=N3. If A∈M3(F) satisfies A4=O, then A is nilpotent and A3=O by (b), so A3≠O=A4 is impossible. Note that no splitting or complex numbers were needed; compare Exercise (C2: Nilpotent operators), which worked over C.

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.