Unit 8, lesson 39

The Cayley-Hamilton Theorem

Why every square matrix satisfies its characteristic polynomial, proved from the adjugate identity and polynomials with matrix coefficients, how this reduces high powers, and how characteristic and minimal polynomials differ.

  • Video 39
  • Polynomial Tools and Cyclic Structure

Computing the hundredth power of a 2×22 \times 2 matrix by repeated multiplication takes 9999 matrix products. For the matrix AA with rows (2,1)(2, 1) and (0,3)(0, 3) there is a shortcut, because its characteristic polynomial is t2−5t+6t^2 - 5t + 6 and A2−5A+6I=0A^2 - 5A + 6I = 0, so every power of AA is a combination of AA and II. The Cayley-Hamilton theorem says that every square matrix satisfies its own characteristic polynomial in this way, whether or not it has an eigenbasis. This lesson proves the theorem from the adjugate identity by comparing coefficients, uses it to reduce high powers, and compares the characteristic polynomial with the minimal polynomial. Throughout, F\mathbb{F} is R\mathbb{R} or C\mathbb{C}, n≥1n \ge 1, the matrix AA lies in Fn×n\mathbb{F}^{n \times n}, χA(t)=det⁡(tI−A)\chi_A(t) = \det(tI - A) is its characteristic polynomial and μA\mu_A is its minimal polynomial.

Key terms

Adjugate identity

Definition Let MM be an n×nn \times n matrix whose entries lie in F\mathbb{F} or in the polynomial ring F[t]\mathbb{F}[t]. For n≥2n \ge 2 the cofactor CijC_{ij} is (−1)i+j(-1)^{i+j} times the determinant of the (n−1)×(n−1)(n - 1) \times (n - 1) matrix obtained by deleting row ii and column jj of MM, and for n=1n = 1 the single cofactor is 11. The adjugate of MM is the transpose of the cofactor matrix, (adj⁡M)ij=Cji(\operatorname{adj} M)_{ij} = C_{ji}. The adjugate identity says

Madj⁡(M)=adj⁡(M) M=det⁡(M) I.\begin{aligned} M \operatorname{adj}(M) &= \operatorname{adj}(M)\, M \\[0.4em] &= \det(M)\, I. \end{aligned}

Entry (i,i)(i, i) of Madj⁡(M)M \operatorname{adj}(M) is ∑kmikCik\sum_k m_{ik} C_{ik}, the cofactor expansion of det⁡M\det M along row ii. For i≠ji \ne j, entry (i,j)(i, j) is ∑kmikCjk\sum_k m_{ik} C_{jk}, which is the expansion along row jj of the matrix obtained from MM by replacing row jj with a copy of row ii. That matrix has two equal rows, so the entry is 00. Expansions along columns give the second product in the same way. The permutation formula for the determinant and every step of this argument use only sums and products of entries, so the identity also holds when the entries are polynomials in tt. For M=tI−AM = tI - A it reads

(tI−A)adj⁡(tI−A)=χA(t) I.(tI - A)\operatorname{adj}(tI - A) = \chi_A(t)\, I.

In plain words Over a field with det⁡M≠0\det M \ne 0, the identity is the familiar inverse formula M−1=adj⁡(M)/det⁡MM^{-1} = \operatorname{adj}(M) / \det M. Its strength is that it needs no division. The matrix tI−AtI - A has polynomial entries and its determinant χA(t)\chi_A(t) cannot be divided out, yet the identity still holds as an equation between matrices of polynomials.

Example For AA with rows (2,1)(2, 1) and (0,3)(0, 3), the adjugate of a 2×22 \times 2 matrix swaps the diagonal entries and negates the other two, so

tI−A=[t−2−10t−3],adj⁡(tI−A)=[t−310t−2].\begin{aligned} tI - A &= \begin{bmatrix} t - 2 & -1 \\ 0 & t - 3 \end{bmatrix}, \\[0.4em] \operatorname{adj}(tI - A) &= \begin{bmatrix} t - 3 & 1 \\ 0 & t - 2 \end{bmatrix}. \end{aligned}

Their product has diagonal entries (t−2)(t−3)=t2−5t+6(t - 2)(t - 3) = t^2 - 5t + 6 and upper right entry (t−2)⋅1+(−1)(t−2)=0(t - 2) \cdot 1 + (-1)(t - 2) = 0, so it equals χA(t) I\chi_A(t)\, I.

Polynomial with matrix coefficients

Definition A polynomial with matrix coefficients is an expression

B(t)=B0+B1t+⋯+BktkB(t) = B_0 + B_1 t + \cdots + B_k t^k

with B0,…,Bk∈Fn×nB_0, \dots, B_k \in \mathbb{F}^{n \times n} and tt a scalar variable. Its entry (i,j)(i, j) is the scalar polynomial ∑r(Br)ij tr\sum_r (B_r)_{ij}\, t^r, so these expressions are the same objects as n×nn \times n matrices with entries in F[t]\mathbb{F}[t]. Two of them are equal exactly when they have the same coefficient matrix at every power of tt. Since the scalar tt commutes with every matrix, products are formed by

(∑rBrtr)(∑sDsts)=∑m(∑r+s=mBrDs)tm,\begin{aligned} &\Bigl(\sum_r B_r t^r\Bigr)\Bigl(\sum_s D_s t^s\Bigr) \\[0.4em] &\quad = \sum_m \Bigl(\sum_{r + s = m} B_r D_s\Bigr) t^m, \end{aligned}

with each BrB_r kept to the left of DsD_s. For n≥2n \ge 2 every entry of adj⁡(tI−A)\operatorname{adj}(tI - A) is, up to sign, the determinant of an (n−1)×(n−1)(n - 1) \times (n - 1) matrix whose entries have degree at most one in tt, and for n=1n = 1 the adjugate is the constant II. In both cases there are matrices B0,…,Bn−1∈Fn×nB_0, \dots, B_{n-1} \in \mathbb{F}^{n \times n} with

adj⁡(tI−A)=∑j=0n−1Bj tj.\operatorname{adj}(tI - A) = \sum_{j=0}^{n-1} B_j\, t^j.

Replacing tt by a matrix XX in an identity between such polynomials is not allowed in general, because tt commutes with every coefficient and XX need not.

In plain words The same object can be read as a matrix of polynomials or as a polynomial whose coefficients are matrices. The second reading lets us compare the coefficients of each power of tt, and those comparisons are honest matrix equations that keep the order of the factors.

Example The adjugate in the previous example is B0+B1tB_0 + B_1 t with B1=IB_1 = I and

B0=[−310−2]=A−5I.B_0 = \begin{bmatrix} -3 & 1 \\ 0 & -2 \end{bmatrix} = A - 5I.

To see why substitution needs care, multiply the polynomial tItI by the constant polynomial CC. The product is CtCt, with the single coefficient CC. Putting a matrix XX to the right of each coefficient turns tItI into XX and CtCt into CXCX, but the product of the evaluated factors is XCXC. With

C=[1000],X=[0100],C = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \qquad X = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix},

the matrix CXCX equals X≠0X \ne 0 while XC=0XC = 0.

Cayley-Hamilton theorem

Definition Let F\mathbb{F} be R\mathbb{R} or C\mathbb{C}, let n≥1n \ge 1 and A∈Fn×nA \in \mathbb{F}^{n \times n}, and write χA(t)=tn+cn−1tn−1+⋯+c1t+c0\chi_A(t) = t^n + c_{n-1}t^{n-1} + \cdots + c_1 t + c_0. The Cayley-Hamilton theorem says that

χA(A)=An+cn−1An−1+⋯+c1A+c0I=0.\begin{aligned} \chi_A(A) &= A^n + c_{n-1}A^{n-1} + \cdots \\[0.4em] &\quad + c_1 A + c_0 I = 0. \end{aligned}

The same holds for every operator TT on a nonzero finite-dimensional space, with χT\chi_T computed from any matrix of TT. For the proof, write adj⁡(tI−A)=∑j=0n−1Bjtj\operatorname{adj}(tI - A) = \sum_{j=0}^{n-1} B_j t^j, multiply out (tI−A)adj⁡(tI−A)(tI - A)\operatorname{adj}(tI - A) and compare coefficients with χA(t) I\chi_A(t)\, I. The coefficient of tnt^n gives Bn−1=IB_{n-1} = I, the coefficient of tjt^j for 1≤j≤n−11 \le j \le n - 1 gives Bj−1−ABj=cjIB_{j-1} - AB_j = c_j I, and the constant term gives −AB0=c0I-AB_0 = c_0 I. Multiply the equation for tjt^j on the left by AjA^j, so that cjAj=AjBj−1−Aj+1Bjc_j A^j = A^j B_{j-1} - A^{j+1} B_j, and add all the terms of χA(A)\chi_A(A).

χA(A)=AnBn−1−AB0+∑j=1n−1(AjBj−1−Aj+1Bj).\begin{aligned} \chi_A(A) &= A^n B_{n-1} - AB_0 \\[0.4em] &\quad + \sum_{j=1}^{n-1} \bigl(A^j B_{j-1} - A^{j+1} B_j\bigr). \end{aligned}

Every product AkBk−1A^k B_{k-1} with 1≤k≤n1 \le k \le n appears once with a plus sign and once with a minus sign, in the same factor order, so the sum telescopes to 00. Reading Bj−1=ABj+cjIB_{j-1} = AB_j + c_j I downward from Bn−1=IB_{n-1} = I also shows that every BjB_j is a polynomial in AA. Since χA\chi_A annihilates AA, the minimal polynomial divides it, μA∣χA\mu_A \mid \chi_A, and in particular deg⁡μA≤n\deg \mu_A \le n.

In plain words The characteristic polynomial, built from a determinant, is also a polynomial equation that the matrix itself satisfies. The proof never uses eigenvectors, so it covers shears and other matrices without an eigenbasis, and it never puts a matrix inside a determinant.

Example Let AA be a 2×22 \times 2 matrix with rows (p,q)(p, q) and (r,s)(r, s), so χA(t)=t2−(p+s)t+(ps−qr)\chi_A(t) = t^2 - (p + s)t + (ps - qr). Then

A2=[p2+qr(p+s)q(p+s)rs2+qr].A^2 = \begin{bmatrix} p^2 + qr & (p + s)q \\ (p + s)r & s^2 + qr \end{bmatrix}.

Subtracting (p+s)A(p + s)A, which has rows (p2+ps,(p+s)q)(p^2 + ps, (p + s)q) and ((p+s)r,ps+s2)((p + s)r, ps + s^2), leaves (qr−ps)I(qr - ps)I. So A2−(p+s)A+(ps−qr)I=0A^2 - (p + s)A + (ps - qr)I = 0 for every 2×22 \times 2 matrix, diagonalizable or not.

Reduction of high powers

Definition Let mm be any annihilating polynomial of AA, for example χA\chi_A by the Cayley-Hamilton theorem or μA\mu_A, and let d=deg⁡md = \deg m. For f∈F[t]f \in \mathbb{F}[t], divide f=qm+rf = qm + r with r=0r = 0 or deg⁡r<d\deg r < d. Evaluating at AA gives

f(A)=q(A) m(A)+r(A)=r(A),f(A) = q(A)\, m(A) + r(A) = r(A),

so every power AkA^k, and every polynomial in AA, is a combination of I,A,…,Ad−1I, A, \dots, A^{d-1}. For n=2n = 2, with trace τ\tau and determinant δ\delta, the theorem gives A2=τA−δIA^2 = \tau A - \delta I. Writing Ak=αkA+βkIA^k = \alpha_k A + \beta_k I with α1=1\alpha_1 = 1 and β1=0\beta_1 = 0, one more multiplication by AA gives Ak+1=αk(τA−δI)+βkAA^{k+1} = \alpha_k(\tau A - \delta I) + \beta_k A, which is the recurrence

αk+1=τ αk+βk,βk+1=−δ αk.\begin{aligned} \alpha_{k+1} &= \tau\,\alpha_k + \beta_k, \\[0.4em] \beta_{k+1} &= -\delta\,\alpha_k. \end{aligned}

In plain words Once a matrix satisfies a polynomial equation of degree dd, all of its powers can be rewritten with the first dd powers I,A,…,Ad−1I, A, \dots, A^{d-1}. For a 2×22 \times 2 matrix two numbers per power are enough, and updating them is much cheaper than multiplying matrices.

Example For AA with rows (2,1)(2, 1) and (0,3)(0, 3) the trace is τ=5\tau = 5 and the determinant is δ=6\delta = 6, so A2=5A−6IA^2 = 5A - 6I. Then

A3=5A2−6A=19A−30I,A4=19A2−30A=65A−114I.\begin{aligned} A^3 &= 5A^2 - 6A = 19A - 30I, \\[0.4em] A^4 &= 19A^2 - 30A = 65A - 114I. \end{aligned}

So A4A^4 has rows (16,65)(16, 65) and (0,81)(0, 81). The diagonal entries are 242^4 and 343^4, and the upper right entry is 34−24=653^4 - 2^4 = 65. Division gives the same result in one step,

t4=(t2+5t+19)(t2−5t+6)+65t−114.\begin{aligned} t^4 &= (t^2 + 5t + 19)(t^2 - 5t + 6) \\[0.4em] &\quad + 65t - 114. \end{aligned}

Continuing the recurrence to k=10k = 10 gives A10=58025A−115026IA^{10} = 58025A - 115026I, whose diagonal entries are 1024=2101024 = 2^{10} and 59049=31059049 = 3^{10}.

Characteristic versus minimal polynomial

Definition For A∈Fn×nA \in \mathbb{F}^{n \times n}, the Cayley-Hamilton theorem and the divisibility theorem give μA∣χA\mu_A \mid \chi_A, so deg⁡μA≤n\deg \mu_A \le n. Both polynomials have the same roots in F\mathbb{F}, namely the eigenvalues of AA in F\mathbb{F}. Suppose χA\chi_A splits into linear factors over F\mathbb{F}, as it always does for F=C\mathbb{F} = \mathbb{C}. Then μA\mu_A, a divisor of χA\chi_A, splits too. If λ1,…,λs\lambda_1, \dots, \lambda_s are the distinct eigenvalues and aia_i is the algebraic multiplicity of λi\lambda_i, then

χA(t)=∏i=1s(t−λi)ai,μA(t)=∏i=1s(t−λi)mi,\begin{aligned} \chi_A(t) &= \prod_{i=1}^{s} (t - \lambda_i)^{a_i}, \\[0.4em] \mu_A(t) &= \prod_{i=1}^{s} (t - \lambda_i)^{m_i}, \end{aligned}

with 1≤mi≤ai1 \le m_i \le a_i for every ii. The upper bound comes from divisibility, and the lower bound from the fact that every eigenvalue is a root of μA\mu_A. In general χA\chi_A does not determine the exponents mim_i, although ai=1a_i = 1 forces mi=1m_i = 1. The two polynomials are equal exactly when deg⁡μA=n\deg \mu_A = n.

In plain words The characteristic polynomial records each eigenvalue with its algebraic multiplicity, and its degree is the dimension. The minimal polynomial records the smallest powers of the factors t−λit - \lambda_i whose product kills every vector. A repeated eigenvalue can fill several independent directions without forcing a repeated factor in μA\mu_A.

Example The diagonal matrix DD with entries 2,2,32, 2, 3 has χD(t)=(t−2)2(t−3)\chi_D(t) = (t - 2)^2(t - 3) but μD(t)=(t−2)(t−3)\mu_D(t) = (t - 2)(t - 3), since (D−2I)(D−3I)=0(D - 2I)(D - 3I) = 0. The shear JJ with rows (1,1)(1, 1) and (0,1)(0, 1) has χJ=μJ=(t−1)2\chi_J = \mu_J = (t - 1)^2, since J−I≠0J - I \ne 0 and (J−I)2=0(J - I)^2 = 0. The 2×22 \times 2 identity has the same characteristic polynomial (t−1)2(t - 1)^2 as JJ but minimal polynomial t−1t - 1. So the characteristic polynomial alone does not always decide the minimal one.

Check yourself

  1. Let AA be the matrix with rows (1,1)(1, 1) and (1,0)(1, 0). Use the Cayley-Hamilton theorem to write A5A^5 as αA+βI\alpha A + \beta I, and then as a matrix.
Show the answer

The trace is 11 and the determinant is −1-1, so χA(t)=t2−t−1\chi_A(t) = t^2 - t - 1 and A2=A+IA^2 = A + I. Multiplying by AA and replacing A2A^2 each time,

A3=A2+A=2A+I,A4=2A2+A=3A+2I,A5=3A2+2A=5A+3I.\begin{aligned} A^3 &= A^2 + A = 2A + I, \\[0.4em] A^4 &= 2A^2 + A = 3A + 2I, \\[0.4em] A^5 &= 3A^2 + 2A = 5A + 3I. \end{aligned}

So A5A^5 has rows (8,5)(8, 5) and (5,3)(5, 3). The coefficients are consecutive Fibonacci numbers.

  1. A classmate proposes the one-line proof χA(A)=det⁡(AI−A)=det⁡(0)=0\chi_A(A) = \det(AI - A) = \det(0) = 0. Explain what goes wrong.
Show the answer

In χA(t)=det⁡(tI−A)\chi_A(t) = \det(tI - A) the variable tt is a scalar, and the determinant produces a scalar polynomial. The expression χA(A)\chi_A(A) means that this finished polynomial is evaluated at the matrix AA, which gives an n×nn \times n matrix. The one-line argument instead puts AA in place of tt before the determinant is taken, and its last step produces the number 00, not the zero matrix, so the two ends of the chain are not even the same kind of object. Reading tI−AtI - A with the matrix AA in place of each tt and each constant entry cc replaced by cIcI would instead create an n2×n2n^2 \times n^2 block matrix, whose determinant is a different operation on a different object. The same pattern of reasoning gives false results. For f(t)=tr⁡(tI−A)=nt−tr⁡Af(t) = \operatorname{tr}(tI - A) = nt - \operatorname{tr} A it would claim f(A)=tr⁡(A−A)=0f(A) = \operatorname{tr}(A - A) = 0, yet for n=2n = 2 and the diagonal matrix AA with entries 1,01, 0,

f(A)=2A−I=[100−1]≠0.f(A) = 2A - I = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} \ne 0.

The proof through the adjugate identity avoids this by doing all determinant work with scalar polynomials and then comparing matrix coefficients.

  1. Let CC be the 3×33 \times 3 matrix with rows (2,1,0)(2, 1, 0), (0,2,0)(0, 2, 0) and (0,0,2)(0, 0, 2). Find χC\chi_C and μC\mu_C, decide whether they agree, and compute C5C^5.
Show the answer

The matrix is upper triangular with diagonal entries 2,2,22, 2, 2, so χC(t)=(t−2)3\chi_C(t) = (t - 2)^3. Let N=C−2IN = C - 2I, whose only nonzero entry is a 11 in row 11, column 22. Then N≠0N \ne 0 and N2=0N^2 = 0. The minimal polynomial is a monic divisor of (t−2)3(t - 2)^3 with root 22, so it is t−2t - 2, (t−2)2(t - 2)^2 or (t−2)3(t - 2)^3. The first fails because N≠0N \ne 0, and the second works, so

μC(t)=(t−2)2≠χC(t).\mu_C(t) = (t - 2)^2 \ne \chi_C(t).

Since 2I2I and NN commute and N2=0N^2 = 0, the binomial expansion stops after two terms,

C5=(2I+N)5=32I+80N=[3280003200032].\begin{aligned} C^5 &= (2I + N)^5 = 32I + 80N \\[0.4em] &= \begin{bmatrix} 32 & 80 & 0 \\ 0 & 32 & 0 \\ 0 & 0 & 32 \end{bmatrix}. \end{aligned}

How this lesson connects

It also uses cofactors and the adjugate matrix.