The Cayley-Hamilton Theorem

Can a matrix be plugged into its own characteristic polynomial? It sounds like a category error. The polynomial det⁡(tI−A)\det(tI - A) eats scalars, not matrices. But once we agree that t0t^0 becomes II, and multiplication of scalars becomes matrix multiplication, the substitution makes perfect sense. The astonishing fact, discovered independently by Cayley and Hamilton in the mid-19th century, is that the resulting matrix is zero. Every square matrix annihilates its own characteristic polynomial. This is not a tautology. The tempting one-line "proof" — substitute t=At = A into det⁡(tI−A)=0\det(tI-A)=0 — is nonsense. This is because det⁡(AI−A)=det⁡(0)=0\det(AI - A) = \det(0) = 0 is a statement about a scalar. It is not a statement about the matrix-valued expression p(A)p(A). The theorem requires a genuine argument. Working through why the naive argument fails is one of the best ways to appreciate what is really being claimed. The result sits at the crossroads of the Characteristic Polynomial and the Minimal Polynomial. It guarantees that the minimal polynomial always divides the characteristic polynomial. This fact is the engine behind the classification of operators up to similarity. It is the reason every operator decomposes into generalized eigenspaces. It is the reason Jordan form and rational canonical form exist. It is also a workhorse for computing matrix inverses and powers by hand. Its reach extends into control theory, numerical linear algebra, and the structure theory of modules over polynomial rings. This article gives a fully rigorous proof via triangularization. It explains precisely why the substitution shortcut fails. It works two concrete asymmetric examples. It also shows what breaks when the field is not algebraically closed. We examine what breaks when the "proof" ignores commutativity subtleties. We close by connecting the theorem to the generalized eigenspace decomposition and the rational canonical form.

Key takeaways
  • Every linear operator TT on a finite-dimensional vector space satisfies pT(T)=0p_T(T) = 0, where pTp_T is its characteristic polynomial.
  • The proof uses Triangularization of Operators: over an algebraically closed field (or after extending scalars), every operator is similar to an upper-triangular matrix.
  • The naive "plug in t=At=A" argument is invalid because det⁡(tI−A)\det(tI-A) is scalar-valued in tt, while pT(A)p_T(A) is a matrix; the two live in different algebraic worlds.
  • A direct corollary: the minimal polynomial of TT divides the characteristic polynomial of TT.
  • The theorem holds over every field, not just C\mathbb{C}, via a field-extension or adjugate-matrix argument.
  • Key idea: an operator can always be triangularized after extending scalars, and a triangular operator visibly kills its own characteristic polynomial one factor at a time.

Where this lives today

The Cayley–Hamilton theorem is a load-bearing wall in the structure theory of linear operators. It immediately yields that the minimal polynomial divides the characteristic polynomial (proved above), which is the starting point for the Generalized Eigenspace Decomposition: factoring the characteristic polynomial into powers of irreducible factors lets one decompose VV into TT-invariant generalized eigenspaces, ultimately producing Jordan canonical form over algebraically closed fields and the Rational Canonical Form over arbitrary fields. In control theory, Cayley–Hamilton underlies the Cayley–Hamilton method for computing the matrix exponential eAte^{At} in closed form as a polynomial in AA of degree less than nn, crucial for solving linear ODE systems x˙=Ax\dot{x} = Ax symbolically. In numerical linear algebra, the theorem justifies expressing A−1A^{-1} as a polynomial in AA (as in Example 2), which underlies iterative schemes for matrix inversion and for computing functions of matrices without diagonalizing. In algebraic graph theory, the theorem constrains the powers of an adjacency matrix, since any power An,An+1,…A^n, A^{n+1}, \ldots can be re-expressed via lower powers, controlling the growth of walk-counting sequences. In cryptography and coding theory, recurrences derived from characteristic polynomials of companion matrices (linear feedback shift registers) are a direct application of the same algebraic mechanism. In commutative algebra, the determinant-trick generalization of Cayley–Hamilton (for matrices over a commutative ring, using the adjugate) is the key technical lemma behind the Nakayama lemma and integral dependence, connecting this classical linear-algebra fact to modern algebraic geometry and number theory.

Ask the tutor: How does Cayley–Hamilton's guarantee that mT∣pTm_T \mid p_T get used to build the generalized eigenspace decomposition of an operator?

DefinitionThe Cayley–Hamilton Theorem — statement of the object

Let VV be a finite-dimensional vector space over a field F\mathbb{F}, with dim⁡V=n≥1\dim V = n \ge 1, and let T:V→VT : V \to V be a linear operator. Let

pT(t)=det⁡(tI−T)∈F[t]p_T(t) = \det(tI - T) \in \mathbb{F}[t]

be the characteristic polynomial of TT (computed, e.g., from any matrix representation AA of TT; it is independent of the choice of basis since similar matrices have the same characteristic polynomial). Write

pT(t)=tn+cn−1tn−1+⋯+c1t+c0,ci∈F.p_T(t) = t^n + c_{n-1}t^{n-1} + \cdots + c_1 t + c_0, \qquad c_i \in \mathbb{F}.

Define the operator

pT(T):=Tn+cn−1Tn−1+⋯+c1T+c0I  :  V→V.p_T(T) := T^n + c_{n-1}T^{n-1} + \cdots + c_1 T + c_0 I \; : \; V \to V.

The Cayley–Hamilton Theorem asserts:

pT(T)=0,p_T(T) = 0,

the zero operator on VV. Equivalently, for any n×nn\times n matrix AA over F\mathbb{F} with characteristic polynomial pA(t)=det⁡(tI−A)p_A(t) = \det(tI - A), we have pA(A)=0p_A(A) = 0 as an n×nn \times n zero matrix.

Intuition

The apparent shortcut is seductive: "pT(t)=det⁡(tI−T)p_T(t) = \det(tI - T) vanishes when t=Tt = T, since det⁡(TI−T)=det⁡(0)=0\det(TI - T) = \det(0) = 0." This sentence contains a category confusion. The polynomial pT(t)p_T(t) is built by taking a determinant of a matrix whose entries are polynomials in the scalar tt; it is a scalar-valued function of the scalar variable tt. The object pT(T)p_T(T), by contrast, is built by first computing the scalar coefficients cic_i, and then forming the honestly matrix-valued combination Tn+cn−1Tn−1+⋯+c0IT^n + c_{n-1}T^{n-1} + \cdots + c_0 I. Setting "t=Tt = T" inside the determinant would require making sense of det⁡(TI−T)\det(TI - T) where TI−TTI-T is the zero matrix of operators — but that is a different, degenerate computation that tells us nothing about Tn+cn−1Tn−1+⋯T^n + c_{n-1}T^{n-1}+\cdots. There is no valid algebraic manipulation that turns one into the other without extra work. The theorem is true, but it needs a genuine proof. The right mental picture comes from triangular matrices. If AA is upper triangular with diagonal entries λ1,…,λn\lambda_1, \ldots, \lambda_n, then

pA(t)=(t−λ1)(t−λ2)⋯(t−λn),p_A(t) = (t - \lambda_1)(t-\lambda_2)\cdots(t - \lambda_n),

and one can show that the operators (A−λ1I),(A−λ2I),…,(A−λnI)(A - \lambda_1 I), (A-\lambda_2 I), \ldots, (A - \lambda_n I), applied in sequence to any vector, successively collapse it into smaller and smaller triangular subspaces, eventually reaching 00. Every operator over an algebraically closed field (and, after a scalar extension trick, over any field) is similar to such a triangular matrix, by Triangularization of Operators. This is the geometric heart of the proof: each linear factor of the characteristic polynomial "eats" one more dimension of a triangularizing flag.

Figure
Triangular collapse: each factor (A−λiI)(A-\lambda_i I) crushes one more basis vector into the span of earlier ones
Flag: V₀ ⊂ V₁ ⊂ V₂ ⊂ V₃ = V, dim Vᵢ = i V₁ = span(e₁) V₂ = span(e₁,e₂) V₃ = span(e₁,e₂,e₃) (A − λ₁I): sends e₁ ↦ 0, fixes flag structure (A − λ₂I): sends V₂ into V₁ (A − λ₃I): sends V₃ into V₂ Composite (A−λ₁I)(A−λ₂I)(A−λ₃I): sends all of V₃ to 0

Theorem

TheoremCayley–Hamilton

Let F\mathbb{F} be any field, let VV be a finite-dimensional vector space over F\mathbb{F} with dim⁡V=n≥1\dim V = n \ge 1, and let T:V→VT: V \to V be a linear operator with characteristic polynomial pT(t)=det⁡(tI−T)p_T(t) = \det(tI - T). Then

pT(T)=0.p_T(T) = 0.
LemmaTriangular case

Let VV be finite-dimensional over F\mathbb{F}, dim⁡V=n\dim V = n, and suppose T:V→VT: V \to V has an upper-triangular matrix representation with respect to some basis (v1,…,vn)(v_1, \ldots, v_n), with diagonal entries λ1,…,λn∈F\lambda_1, \ldots, \lambda_n \in \mathbb{F} (in that order). Then

pT(t)=∏i=1n(t−λi),p_T(t) = \prod_{i=1}^n (t - \lambda_i),

and pT(T)=0p_T(T) = 0.

Proof

Step 1: the characteristic polynomial of a triangular matrix. If AA is the upper-triangular matrix of TT in the basis (v1,…,vn)(v_1,\ldots,v_n), then tI−AtI - A is also upper triangular, with diagonal entries t−λ1,…,t−λnt - \lambda_1, \ldots, t-\lambda_n. The determinant of an upper-triangular matrix is the product of its diagonal entries (expand by cofactors along the first column repeatedly, or induct on nn: expanding det⁡(tI−A)\det(tI-A) along the first column, the only nonzero entry is the (1,1)(1,1) entry t−λ1t-\lambda_1, times the determinant of the (n−1)×(n−1)(n-1)\times(n-1) upper-triangular lower-right block). Hence

pT(t)=det⁡(tI−A)=∏i=1n(t−λi).p_T(t) = \det(tI - A) = \prod_{i=1}^n (t-\lambda_i).

Step 2: the flag structure. Let Wk:=span⁡(v1,…,vk)W_k := \operatorname{span}(v_1, \ldots, v_k) for k=0,1,…,nk = 0, 1, \ldots, n (with W0={0}W_0 = \{0\}). Since AA is upper triangular in this basis, T(vk)∈span⁡(v1,…,vk)=WkT(v_k) \in \operatorname{span}(v_1,\ldots,v_k) = W_k for every kk (the kk-th column of AA has zero entries below row kk). Hence T(Wk)⊆WkT(W_k) \subseteq W_k for all kk: the WkW_k form a TT-invariant flag. Moreover, for each kk, the diagonal entry λk\lambda_k is exactly the coefficient of vkv_k in T(vk)T(v_k), so

(T−λkI)(vk)∈Wk−1.(T - \lambda_k I)(v_k) \in W_{k-1}.

Since Wk=Wk−1+span⁡(vk)W_k = W_{k-1} + \operatorname{span}(v_k) and (T−λkI)(T-\lambda_k I) maps Wk−1W_{k-1} into Wk−1W_{k-1} (as TT does and λkI\lambda_k I trivially does), we get

(T−λkI)(Wk)⊆Wk−1for every k=1,…,n.(∗)(T - \lambda_k I)(W_k) \subseteq W_{k-1} \qquad \text{for every } k=1,\ldots,n. \tag{$\ast$}

Step 3: composing the factors. Define the operator

S:=(T−λnI)(T−λn−1I)⋯(T−λ1I).S := (T-\lambda_n I)(T-\lambda_{n-1}I)\cdots(T-\lambda_1 I).

Since all the factors T−λiIT - \lambda_i I are polynomials in TT, they commute with each other; the order of composition can be rearranged freely, and in particular

S=pT(T)S = p_T(T)

because ∏i(t−λi)\prod_i (t-\lambda_i) expanded is exactly pT(t)p_T(t), and evaluating a product of commuting linear factors at TT gives the corresponding product of operators (T−λiI)(T-\lambda_i I), in any order, by distributivity of composition over the (commutative) polynomial ring F[T]\mathbb{F}[T] generated by TT. We show S=0S = 0 by showing S(vk)=0S(v_k) = 0 for every basis vector vkv_k, k=1,…,nk=1,\ldots,n; since (v1,…,vn)(v_1,\ldots,v_n) is a basis, this gives S=0S = 0 on all of VV. Fix kk. Apply the factors of SS to vkv_k in the order (T−λ1I)(T-\lambda_1 I) first, then (T−λ2I)(T - \lambda_2 I), etc. (valid since all factors commute):

(T−λ1I)vk∈Wmin⁡(k,1)if k=1, else (T−λ1I)vk∈Wk trivially.(T-\lambda_1 I) v_k \in W_{\min(k,1)} \quad\text{if } k=1,\text{ else } (T-\lambda_1I)v_k \in W_k \text{ trivially}.

More precisely, we argue by induction on the number of factors applied. Let u0=vk∈Wku_0 = v_k \in W_k. By (∗)(\ast), applying (T−λkI)(T - \lambda_k I) to any vector of WkW_k lands in Wk−1W_{k-1}. We apply the factors in the order (T−λkI),(T−λk−1I),…,(T−λ1I)(T-\lambda_k I), (T-\lambda_{k-1}I), \ldots, (T-\lambda_1 I) (a valid reordering of the commuting product SS, together with the remaining unused factors (T−λk+1I),…(T-\lambda_{k+1}I),\ldots which we insert afterward and which map VV to VV harmlessly — see below):

  • u1:=(T−λkI)u0∈Wk−1u_1 := (T - \lambda_k I) u_0 \in W_{k-1}, using (∗)(\ast) with u0∈Wku_0 \in W_k.
  • Since Wk−1⊆Wk−1W_{k-1} \subseteq W_{k-1} is invariant, and (∗)(\ast) applied at level k−1k-1 says (T−λk−1I)(Wk−1)⊆Wk−2(T-\lambda_{k-1}I)(W_{k-1}) \subseteq W_{k-2}, we get u2:=(T−λk−1I)u1∈Wk−2u_2 := (T-\lambda_{k-1}I)u_1 \in W_{k-2}.
  • Inductively, after applying (T−λk−jI)(T-\lambda_{k-j}I) for j=0,1,…,k−1j = 0,1,\ldots,k-1 in decreasing order, we obtain uk∈W0={0}u_k \in W_0 = \{0\}.

So the composite (T−λ1I)(T−λ2I)⋯(T−λkI)(T-\lambda_1I)(T-\lambda_2I)\cdots(T-\lambda_kI) already sends vkv_k to 00. The full operator SS is this composite multiplied by the remaining commuting factors (T−λk+1I),…,(T−λnI)(T-\lambda_{k+1}I), \ldots, (T-\lambda_nI), applied in any order since all factors commute; applying a linear operator to the zero vector gives zero, so S(vk)=0S(v_k) = 0. Since kk was arbitrary and (v1,…,vn)(v_1,\ldots,v_n) spans VV, we conclude S=0S = 0, i.e. pT(T)=0p_T(T) = 0.

∎
ProofProof of the general theorem, from the triangular case

Technique: reduction to the triangularizable case via field extension, using <a class="wiki-link" href="/wiki/math-linalg-triangularization" data-track="wiki_article.body.wiki_link">Triangularization of Operators</a>. Case 1: F\mathbb{F} is algebraically closed (e.g. F=C\mathbb{F} = \mathbb{C}). By the theorem on Triangularization of Operators, since pT(t)p_T(t) splits completely into linear factors over F\mathbb{F} (as F\mathbb{F} is algebraically closed), TT has an upper-triangular matrix representation with respect to some basis of VV. By the Lemma just proved, pT(T)=0p_T(T) = 0. Case 2: general F\mathbb{F}. Let AA be the matrix of TT in some fixed basis of VV; AA is an n×nn\times n matrix over F\mathbb{F}. Let F‾\overline{\mathbb{F}} be an algebraic closure of F\mathbb{F} (every field embeds in an algebraically closed field; this is a standard fact from field theory, used here only as scaffolding, not circularly invoking anything about TT). View AA as a matrix over F‾\overline{\mathbb{F}}, defining an operator T′T' on F‾n\overline{\mathbb{F}}^n by matrix multiplication by AA. The characteristic polynomial of AA computed over F\mathbb{F}, namely pT(t)=det⁡(tI−A)p_T(t) = \det(tI-A), is the same polynomial as the characteristic polynomial of T′T' computed over F‾\overline{\mathbb{F}}: the determinant is a universal polynomial expression (the Leibniz expansion) in the entries of tI−AtI - A, and these entries do not change when we merely regard the matrix as having entries in the larger field F‾\overline{\mathbb{F}}. Hence pT′(t)=pT(t)p_{T'}(t) = p_T(t) as elements of F[t]⊆F‾[t]\mathbb{F}[t] \subseteq \overline{\mathbb{F}}[t]. By Case 1 (applied to T′T' on F‾n\overline{\mathbb{F}}^n, since F‾\overline{\mathbb{F}} is algebraically closed), pT′(T′)=0p_{T'}(T') = 0, i.e. pT(A)=0p_T(A) = 0 as a matrix over F‾\overline{\mathbb{F}}. But pT(A)p_T(A) is computed from AA and the coefficients ci∈Fc_i \in \mathbb{F} using only field operations that stay inside F\mathbb{F} (matrix addition and scalar multiplication by elements of F\mathbb{F}, applied to the matrix AA which has entries in F\mathbb{F}); so pT(A)p_T(A), as computed over F\mathbb{F}, is literally the same matrix as pT(A)p_T(A) computed over F‾\overline{\mathbb{F}} — it is an F\mathbb{F}-matrix that happens to also be regarded as an F‾\overline{\mathbb{F}}-matrix, and we've shown that matrix is 00. Hence pT(A)=0p_T(A) = 0 over F\mathbb{F} as well, i.e. pT(T)=0p_T(T) = 0. This completes the proof for arbitrary fields F\mathbb{F}. ■\blacksquare

∎
CorollaryMinimal polynomial divides characteristic polynomial

Let T:V→VT: V \to V be a linear operator on a finite-dimensional vector space over F\mathbb{F}, with minimal polynomial mT(t)m_T(t) and characteristic polynomial pT(t)p_T(t). Then mT(t)∣pT(t)m_T(t) \mid p_T(t) in F[t]\mathbb{F}[t].

Proof

By definition, the Minimal Polynomial mTm_T is the monic polynomial of least degree such that mT(T)=0m_T(T) = 0, and every polynomial qq with q(T)=0q(T) = 0 is a multiple of mTm_T — this divisibility property is itself a standard consequence of polynomial division: write q(t)=mT(t)Q(t)+R(t)q(t) = m_T(t)Q(t) + R(t) with deg⁡R<deg⁡mT\deg R < \deg m_T (division algorithm in F[t]\mathbb{F}[t]); then R(T)=q(T)−mT(T)Q(T)=0−0=0R(T) = q(T) - m_T(T)Q(T) = 0 - 0 = 0, and minimality of deg⁡mT\deg m_T forces R=0R = 0. By the Cayley–Hamilton Theorem, pT(T)=0p_T(T) = 0. Applying the divisibility property above with q=pTq = p_T gives mT∣pTm_T \mid p_T. ■\blacksquare

∎

Worked examples

Example 1 (a genuinely asymmetric 3×33\times 3 matrix). Let

A=(21003−1101).A = \begin{pmatrix} 2 & 1 & 0 \\ 0 & 3 & -1 \\ 1 & 0 & 1 \end{pmatrix}.

Step 1: characteristic polynomial. Compute det⁡(tI−A)\det(tI - A):

tI−A=(t−2−100t−31−10t−1).tI - A = \begin{pmatrix} t-2 & -1 & 0 \\ 0 & t-3 & 1 \\ -1 & 0 & t-1 \end{pmatrix}.

Expand along the first row:

det⁡(tI−A)=(t−2)det⁡(t−310t−1)−(−1)det⁡(01−1t−1).\det(tI-A) = (t-2)\det\begin{pmatrix}t-3 & 1\\0 & t-1\end{pmatrix} - (-1)\det\begin{pmatrix}0&1\\-1&t-1\end{pmatrix}.

The first minor is (t−3)(t−1)−0=(t−3)(t−1)(t-3)(t-1) - 0 = (t-3)(t-1). The second minor is 0⋅(t−1)−1⋅(−1)=10\cdot(t-1) - 1\cdot(-1) = 1. So

det⁡(tI−A)=(t−2)(t−3)(t−1)+1⋅1=(t−2)(t−3)(t−1)+1.\det(tI-A) = (t-2)(t-3)(t-1) + 1\cdot 1 = (t-2)(t-3)(t-1) + 1.

Expand (t−2)(t−3)(t−1)(t-2)(t-3)(t-1): first (t−2)(t−3)=t2−5t+6(t-2)(t-3) = t^2 -5t+6, then (t2−5t+6)(t−1)=t3−5t2+6t−t2+5t−6=t3−6t2+11t−6(t^2-5t+6)(t-1) = t^3 -5t^2+6t -t^2+5t-6 = t^3 -6t^2+11t-6. So

pA(t)=t3−6t2+11t−6+1=t3−6t2+11t−5.p_A(t) = t^3 - 6t^2 + 11t - 6 + 1 = t^3 - 6t^2 + 11t - 5.

Step 2: verify Cayley–Hamilton numerically. We must check

A3−6A2+11A−5I=0.A^3 - 6A^2 + 11A - 5I = 0.

Compute A2A^2:

A2=A⋅A=(21003−1101)(21003−1101).A^2 = A\cdot A = \begin{pmatrix} 2&1&0\\0&3&-1\\1&0&1\end{pmatrix}\begin{pmatrix} 2&1&0\\0&3&-1\\1&0&1\end{pmatrix}.

Row 1: (2⋅2+1⋅0+0⋅1,  2⋅1+1⋅3+0⋅0,  2⋅0+1⋅(−1)+0⋅1)=(4,5,−1)(2\cdot2+1\cdot0+0\cdot1,\; 2\cdot1+1\cdot3+0\cdot0,\; 2\cdot0+1\cdot(-1)+0\cdot1) = (4, 5, -1). Row 2: (0⋅2+3⋅0+(−1)⋅1,  0⋅1+3⋅3+(−1)⋅0,  0⋅0+3⋅(−1)+(−1)⋅1)=(−1,9,−4)(0\cdot2+3\cdot0+(-1)\cdot1,\; 0\cdot1+3\cdot3+(-1)\cdot0,\; 0\cdot0+3\cdot(-1)+(-1)\cdot1) = (-1, 9, -4). Row 3: (1⋅2+0⋅0+1⋅1,  1⋅1+0⋅3+1⋅0,  1⋅0+0⋅(−1)+1⋅1)=(3,1,1)(1\cdot2+0\cdot0+1\cdot1,\; 1\cdot1+0\cdot3+1\cdot0,\; 1\cdot0+0\cdot(-1)+1\cdot1) = (3, 1, 1).

A2=(45−1−19−4311).A^2 = \begin{pmatrix}4 & 5 & -1\\ -1 & 9 & -4 \\ 3 & 1 & 1\end{pmatrix}.

Compute A3=A2⋅AA^3 = A^2 \cdot A: Row 1: (4⋅2+5⋅0+(−1)⋅1,  4⋅1+5⋅3+(−1)⋅0,  4⋅0+5⋅(−1)+(−1)⋅1)=(7,19,−6)(4\cdot2+5\cdot0+(-1)\cdot1,\; 4\cdot1+5\cdot3+(-1)\cdot0,\; 4\cdot0+5\cdot(-1)+(-1)\cdot1) = (7, 19, -6). Row 2: (−1⋅2+9⋅0+(−4)⋅1,  −1⋅1+9⋅3+(−4)⋅0,  −1⋅0+9⋅(−1)+(−4)⋅1)=(−6,26,−13)(-1\cdot2+9\cdot0+(-4)\cdot1,\; -1\cdot1+9\cdot3+(-4)\cdot0,\; -1\cdot0+9\cdot(-1)+(-4)\cdot1) = (-6, 26, -13). Row 3: (3⋅2+1⋅0+1⋅1,  3⋅1+1⋅3+1⋅0,  3⋅0+1⋅(−1)+1⋅1)=(7,6,0)(3\cdot2+1\cdot0+1\cdot1,\; 3\cdot1+1\cdot3+1\cdot0,\; 3\cdot0+1\cdot(-1)+1\cdot1) = (7, 6, 0).

A3=(719−6−626−13760).A^3 = \begin{pmatrix}7 & 19 & -6 \\ -6 & 26 & -13 \\ 7 & 6 & 0\end{pmatrix}.

Now compute A3−6A2+11A−5IA^3 - 6A^2 + 11A - 5I entrywise. Entry (1,1)(1,1): 7−6(4)+11(2)−5=7−24+22−5=07 - 6(4) + 11(2) - 5 = 7 - 24 + 22 - 5 = 0. ✓ Entry (1,2)(1,2): 19−6(5)+11(1)−0=19−30+11=019 - 6(5) + 11(1) - 0 = 19 - 30 + 11 = 0. ✓ Entry (1,3)(1,3): −6−6(−1)+11(0)−0=−6+6+0=0-6 - 6(-1) + 11(0) - 0 = -6+6+0 = 0. ✓ Entry (2,1)(2,1): −6−6(−1)+11(0)−0=−6+6+0=0-6 - 6(-1) + 11(0) - 0 = -6+6+0=0. ✓ Entry (2,2)(2,2): 26−6(9)+11(3)−5=26−54+33−5=026 - 6(9) + 11(3) - 5 = 26 - 54 + 33 - 5 = 0. ✓ Entry (2,3)(2,3): −13−6(−4)+11(−1)−0=−13+24−11=0-13 - 6(-4) + 11(-1) - 0 = -13+24-11 = 0. ✓ Entry (3,1)(3,1): 7−6(3)+11(1)−0=7−18+11=07 - 6(3) + 11(1) - 0 = 7-18+11=0. ✓ Entry (3,2)(3,2): 6−6(1)+11(0)−0=6−6=06 - 6(1) + 11(0) - 0 = 6-6=0. ✓ Entry (3,3)(3,3): 0−6(1)+11(1)−5=0−6+11−5=00 - 6(1) + 11(1) - 5 = 0-6+11-5=0. ✓ Every entry vanishes: A3−6A2+11A−5I=0A^3 - 6A^2 + 11A - 5I = 0, confirming Cayley–Hamilton for this genuinely non-symmetric matrix with distinct off-diagonal structure.

Example 2 (using Cayley–Hamilton to compute A−1A^{-1} and a high power efficiently). Take the same AA as above, with pA(t)=t3−6t2+11t−5p_A(t) = t^3 - 6t^2+11t-5. Cayley–Hamilton gives

A3−6A2+11A−5I=0  ⟹  A(A2−6A+11I)=5I  ⟹  A−1=15(A2−6A+11I).A^3 - 6A^2 + 11A - 5I = 0 \implies A(A^2 - 6A + 11I) = 5I \implies A^{-1} = \frac{1}{5}(A^2 - 6A + 11I).

Compute A2−6A+11IA^2 - 6A + 11I using A2A^2 found above:

A2−6A+11I=(45−1−19−4311)−6(21003−1101)+11(100010001).A^2 - 6A + 11I = \begin{pmatrix}4&5&-1\\-1&9&-4\\3&1&1\end{pmatrix} - 6\begin{pmatrix}2&1&0\\0&3&-1\\1&0&1\end{pmatrix} + 11\begin{pmatrix}1&0&0\\0&1&0\\0&0&1\end{pmatrix}.

Entry (1,1)(1,1): 4−12+11=34 - 12 + 11 = 3. Entry (1,2)(1,2): 5−6+0=−15 - 6 + 0 = -1. Entry (1,3)(1,3): −1−0+0=−1-1 - 0 + 0 = -1. Entry (2,1)(2,1): −1−0+0=−1-1 - 0 + 0 = -1. Entry (2,2)(2,2): 9−18+11=29 - 18 + 11 = 2. Entry (2,3)(2,3): −4−(−6)+0=2-4 - (-6) + 0 = 2. Entry (3,1)(3,1): 3−6+0=−33 - 6 + 0 = -3. Entry (3,2)(3,2): 1−0+0=11 - 0 + 0 = 1. Entry (3,3)(3,3): 1−6+11=61 - 6 + 11 = 6.

A−1=15(3−1−1−122−316).A^{-1} = \frac{1}{5}\begin{pmatrix}3 & -1 & -1\\ -1 & 2 & 2 \\ -3 & 1 & 6\end{pmatrix}.

Check: det⁡A\det A should equal pA(0)⋅(−1)?p_A(0)\cdot(-1)^{?}; recall for a monic pA(t)=t3+⋯+c0p_A(t)=t^3+\cdots+c_0, we have pA(0)=c0=det⁡(0⋅I−A)=det⁡(−A)=(−1)3det⁡A=−det⁡Ap_A(0) = c_0 = \det(0\cdot I - A) = \det(-A) = (-1)^3\det A = -\det A. Here c0=−5c_0 = -5, so det⁡A=5\det A = 5, consistent with dividing by 55 above and matching a nonzero determinant (so AA is indeed invertible, justifying this computation). We can quickly verify one entry of AA−1=IAA^{-1}=I: row 1 of AA times column 1 of A−1A^{-1} (before dividing by 5): 2⋅3+1⋅(−1)+0⋅(−3)=6−1=52\cdot3 + 1\cdot(-1)+0\cdot(-3) = 6-1=5, and 5/5=15/5=1. ✓ Row 1 times column 2: 2(−1)+1(2)+0(1)=−2+2=02(-1)+1(2)+0(1) = -2+2=0, and 0/5=00/5=0. ✓ This matches the identity matrix's first row, confirming the inverse. This illustrates the practical power of the theorem: it expresses A−1A^{-1} (and, iterating the same recursion An=6An−1−11An−2+5An−3A^n = 6A^{n-1}-11A^{n-2}+5A^{n-3}, arbitrarily high powers AnA^n) purely in terms of I,A,A2I, A, A^2 — a huge computational shortcut compared to repeated matrix multiplication or Gaussian elimination from scratch.

Counterexamplewhy triangularizability over the field cannot simply be dropped from the proof strategy without the extension trick

The theorem's conclusion holds over every field — that is Case 2 above. But it is instructive to see why the triangularization-based proof genuinely breaks down over a non-algebraically-closed field if one refuses to extend scalars, and why the naive fix "just triangularize AA over F\mathbb{F}" fails. Let F=R\mathbb{F} = \mathbb{R} and consider

A=(0−110),A = \begin{pmatrix} 0 & -1 \\ 1 & 0\end{pmatrix},

representing rotation by 90°90°. Its characteristic polynomial is

pA(t)=det⁡(t1−1t)=t2+1,p_A(t) = \det\begin{pmatrix} t & 1 \\ -1 & t \end{pmatrix} = t^2 + 1,

which has no real roots. Consequently there is no basis of R2\mathbb{R}^2 in which AA becomes upper triangular with real diagonal entries — a real triangularization would force the diagonal entries to be eigenvalues of AA in R\mathbb{R}, and AA has none (a rotation by 90°90° fixes no real line). So the Lemma proved above literally cannot be applied directly to AA over R\mathbb{R}: the hypothesis "TT has an upper-triangular matrix representation over F\mathbb{F}" fails. This is exactly why the general proof of Cayley–Hamilton passes to the algebraic closure R‾=C\overline{\mathbb{R}} = \mathbb{C}: over C\mathbb{C}, AA is triangularizable (indeed diagonalizable, with eigenvalues ±i\pm i), the Lemma applies there, and we transport the conclusion back down to R\mathbb{R} because the identity pA(A)=0p_A(A) = 0 is a system of polynomial equations in the entries of AA with coefficients in F\mathbb{F}, so its truth over the larger field F‾\overline{\mathbb{F}} implies its truth over F\mathbb{F}. Concretely, one still checks pA(A)=A2+I=0p_A(A) = A^2 + I = 0 holds over R\mathbb{R}:

A2=(0−110)(0−110)=(−100−1)=−I,A^2 = \begin{pmatrix}0&-1\\1&0\end{pmatrix}\begin{pmatrix}0&-1\\1&0\end{pmatrix} = \begin{pmatrix}-1 & 0\\0&-1\end{pmatrix} = -I,

so A2+I=0A^2 + I = 0 — the theorem's conclusion is true — but the route to proving it required the field-extension step, since the direct real-triangularization hypothesis of the Lemma is unavailable. This shows precisely which hypothesis (triangularizability over the field at hand) is doing the work in the Lemma, and why the full theorem's proof must route around it via F‾\overline{\mathbb{F}}.

Scope, edge cases & common traps

SituationWhat happens
F\mathbb{F} algebraically closed (e.g. C\mathbb{C})Direct triangularization applies; Lemma gives the result immediately.
F\mathbb{F} not algebraically closed (e.g. R,Q,Fp\mathbb{R}, \mathbb{Q}, \mathbb{F}_p)Theorem still true, proved via extension to F‾\overline{\mathbb{F}} (or via the universal adjugate-matrix identity, an alternative proof not covered in detail here).
AA diagonalizablepA(A)=0p_A(A) = 0 still requires the full argument; diagonalizability is a stronger condition than Cayley–Hamilton and is not needed for it.
AA nilpotentpA(t)=tnp_A(t) = t^n, and Cayley–Hamilton says An=0A^n = 0 — consistent with (but weaker than) the definition of nilpotency, which may give Ak=0A^k=0 for some k<nk<n already.
Substituting t=At=A directly into det⁡(tI−A)\det(tI-A)Invalid. det⁡(tI−A)\det(tI-A) is a scalar polynomial; det⁡(AI−A)=det⁡(0)=0\det(AI-A)=\det(0)=0 is a true but different, vacuous statement, not equal to pA(A)p_A(A).
Infinite-dimensional VVTheorem does not directly apply; "characteristic polynomial" is not generally defined, and the finite-dimensionality hypothesis is essential.

The mathematician behind it

Origins · 1 minArthur Cayley and how this was discovered
AC
Arthur Cayley
1821–1895 · British pure mathematician, pioneer of matrix theory and invariant theory

Arthur Cayley was one of the founders of the modern theory of matrices, publishing the first systematic treatment of matrix algebra as an independent object of study (rather than merely bookkeeping for linear substitutions) in his 1858 Memoir on the Theory of Matrices. He verified the theorem now named for him and William Rowan Hamilton explicitly for 2×22\times 2 and 3×33\times 3 matrices, remarking that he had "not thought it necessary to undertake the labour of a formal proof" for general nn — a proof supplied rigorously only later. Cayley worked prolifically across algebra, geometry, and invariant theory, producing over 900 papers, and his matrix-theoretic viewpoint — treating an array of numbers as a single algebraic entity obeying its own arithmetic — reshaped how mathematicians conceived of linear transformations.

History
- 1843 — William Rowan Hamilton discovers quaternions and, in the course of studying linear vector functions, effectively anticipates special cases of the theorem in the context of quaternionic algebra.
- 1858 — Arthur Cayley states the theorem for general square matrices in his Memoir on the Theory of Matrices, verifying it explicitly for 2×22\times 2 and 3×33\times 3 cases.
- 1878 — Ferdinand Georg Frobenius gives the first fully general proof, for matrices over an arbitrary field, using the theory of elementary divisors and invariant factors.
- 1897–1900s — The theorem becomes a standard tool in the emerging structure theory of modules over F[t]\mathbb{F}[t], feeding directly into rational canonical form and Jordan form.
- 20th century — The theorem is generalized to matrices over commutative rings (not just fields), via the determinant trick with the adjugate matrix, extending its reach to module theory and algebraic geometry.
Is the "substitute t=At=A" shortcut ever rigorously fixable, or is it just wrong?

It cannot be fixed as literally stated, because it compares two different objects. The polynomial det⁡(tI−A)\det(tI-A) is computed by expanding a determinant whose entries are polynomials in the scalar tt; evaluating this scalar polynomial at t=At=A is not defined by the determinant formula at all, since determinants are only defined for matrices with entries in a commutative ring, and "AI−AAI - A" as a matrix of operators over the noncommutative-in-general setting of matrix-valued entries does not literally fit the determinant formula in the same way. What is true and rigorous is the completely different statement: expand det⁡(tI−A)=∑citi\det(tI-A) = \sum c_i t^i to get honest scalar coefficients ci∈Fc_i \in \mathbb{F}, and then separately ask whether ∑ciAi=0\sum c_i A^i = 0. That equality is the real content of Cayley–Hamilton and needs its own proof.

Does Cayley–Hamilton say that pTp_T is the smallest polynomial killing TT?

No — that is a common overreach. Cayley–Hamilton only guarantees pT(T)=0p_T(T)=0; it says nothing about minimality. The polynomial of least degree annihilating TT is by definition the minimal polynomial mTm_T, and Cayley–Hamilton's true consequence is the one-directional divisibility mT∣pTm_T \mid p_T, not equality. For example, the identity matrix InI_n has characteristic polynomial (t−1)n(t-1)^n but minimal polynomial simply t−1t-1, since I−I=0I - I = 0 already. Equality mT=pTm_T = p_T holds precisely when TT is "cyclic" (has a cyclic vector), a strictly stronger condition tied to the rational canonical form having a single companion block.

Why does the proof need triangularization rather than diagonalization?

Not every operator is diagonalizable, but by the theorem on Triangularization of Operators, every operator is triangularizable as soon as its characteristic polynomial splits into linear factors over the field — a strictly weaker requirement than diagonalizability. Working with the more general triangular form lets the proof apply uniformly to all operators (over an algebraically closed field), including defective ones like nontrivial Jordan blocks, without needing to first separately handle the diagonalizable and non-diagonalizable cases.

Does Cayley–Hamilton hold for matrices over rings that are not fields, like Z\mathbb{Z}?

Yes, with an appropriately adapted proof. The version for commutative rings is usually proved using the adjugate (classical adjoint) matrix identity adj⁡(A)⋅A=det⁡(A)I\operatorname{adj}(A)\cdot A = \det(A) I applied to tI−AtI - A over the polynomial ring R[t]R[t], comparing coefficients after expanding adj⁡(tI−A)\operatorname{adj}(tI-A) as a polynomial in tt with matrix coefficients. This ring-theoretic version, sometimes attributed to the determinant trick used in commutative algebra, is the form used to prove results like the Nakayama lemma, and it does not rely on triangularization at all, since triangularization can fail badly over rings that are not fields.

Can Cayley–Hamilton be used to compute matrix powers efficiently?

Yes, this is one of its most practical uses. If pA(t)=tn+cn−1tn−1+⋯+c0p_A(t) = t^n + c_{n-1}t^{n-1}+\cdots+c_0, then An=−(cn−1An−1+⋯+c0I)A^n = -(c_{n-1}A^{n-1}+\cdots+c_0I), giving a linear recurrence expressing AnA^n (and, inductively, every higher power) in terms of I,A,…,An−1I, A, \ldots, A^{n-1}. This turns the problem of computing AkA^k for large kk into solving a linear recurrence with characteristic polynomial pA(t)p_A(t), which can be done in closed form using the eigenvalues of AA, avoiding k−1k-1 successive matrix multiplications.

Does the theorem depend on choice of basis?

No. The characteristic polynomial pT(t)=det⁡(tI−T)p_T(t) = \det(tI-T) is basis-independent: if AA and B=PAP−1B = PAP^{-1} are similar matrices representing the same operator TT in different bases, then det⁡(tI−B)=det⁡(P(tI−A)P−1)=det⁡(tI−A)\det(tI-B) = \det(P(tI-A)P^{-1}) = \det(tI-A), using multiplicativity of the determinant. Consequently pTp_T is an invariant of the operator TT itself, not of any particular matrix representation, and the statement pT(T)=0p_T(T)=0 is a basis-free statement about the operator.

Before this

Where this leads