The Cayley-Hamilton Theorem and Minimal Polynomials
The Cayley–Hamilton theorem states that every square matrix satisfies its own characteristic equation: if p(λ) = det(λI − A), then p(A) = O; the minimal polynomial is the monic polynomial of least degree that annihilates A, and it divides every other annihilating polynomial. In brief: for A = [[1, 2], [3, 4]], p(λ) = λ2 − 5λ − 2, and indeed A2 − 5A − 2I = O. Rearranging gives the inverse A−1 = (A − 5I)/2 = [[−2, 1], [3/2, −1/2]] without row reduction.
The theorem lets you reduce high powers of a matrix to low-degree polynomials in the matrix and gives a formula for the inverse. The minimal polynomial refines the characteristic polynomial and decides diagonalizability. This guide states both results, shows the computations, gives a proof sketch and relates the minimal polynomial to the structure of the matrix, with worked examples and a table.
What does the Cayley–Hamilton theorem say?
Let A be an n × n matrix and p(λ) = det(λI − A) = λn + cn−1λn−1 + … + c0. Then An + cn−1An−1 + … + c0I = O. The constant term is c0 = (−1)n det A and cn−1 = −tr A. For a 2 × 2 matrix: A2 − (tr A)A + (det A)I = O.
Example 1: a verification
A = [[1, 2], [3, 4]]: tr A = 5, det A = −2, so p(λ) = λ2 − 5λ − 2. A2 = [[7, 10], [15, 22]], 5A = [[5, 10], [15, 20]], 2I = [[2, 0], [0, 2]]. Then A2 − 5A − 2I = [[7 − 5 − 2, 10 − 10], [15 − 15, 22 − 20 − 2]] = O ✓.
How do you use it for powers and inverses?
From p(A) = O one can express An through lower powers, so any power of A is a combination of I, A, …, An−1. If det A ≠ 0 (c0 ≠ 0), solving for I gives the inverse as a polynomial in A.
Example 2: the inverse
From A2 − 5A − 2I = O: A(A − 5I) = 2I, so A−1 = (A − 5I)/2 = (1/2) [[−4, 2], [3, −1]] = [[−2, 1], [3/2, −1/2]]. Check: [[1, 2], [3, 4]] · [[−2, 1], [3/2, −1/2]] = [[−2 + 3, 1 − 1], [−6 + 6, 3 − 2]] = I ✓.
Example 3: a high power
A2 = 5A + 2I, so A3 = A · A2 = 5A2 + 2A = 5(5A + 2I) + 2A = 27A + 10I = [[37, 54], [81, 118]]. Direct check: A · A2 = [[1, 2], [3, 4]] · [[7, 10], [15, 22]] = [[7 + 30, 10 + 44], [21 + 60, 30 + 88]] = [[37, 54], [81, 118]] ✓.
Example 4: a 3 × 3 matrix
For B = [[2, 1, 0], [0, 2, 0], [0, 0, 3]], p(λ) = (λ − 2)2(λ − 3) = λ3 − 7λ2 + 16λ − 12, so B3 = 7B2 − 16B + 12I. Hence B−1 = (B2 − 7B + 16I)/12.
Why is it true?
For a diagonalizable matrix the proof is short: if A = PDP−1 then p(A) = P p(D) P−1, and p(D) is diagonal with the entries p(λi) = 0. The general case can be obtained by approximating A by diagonalizable matrices (over ℂ), since p(A) depends continuously on A. A direct proof uses the adjugate: (λI − A) adj(λI − A) = p(λ)I, a polynomial identity in λ with matrix coefficients, which remains valid when A is substituted for λ because A commutes with itself, and the left side vanishes then. A naive “substitute A for λ in det(λI − A)” is not a valid proof, because the determinant of a matrix of matrices is not the same as the matrix polynomial.
What is the minimal polynomial?
A polynomial q with q(A) = O is said to annihilate A. The minimal polynomial m(λ) is the monic annihilating polynomial of the smallest degree. It is unique, divides every annihilating polynomial (in particular the characteristic polynomial), and has the same roots as p(λ), though possibly with smaller multiplicities.
Example 5: three matrices with the same characteristic polynomial
Let p(λ) = (λ − 2)2 for 2 × 2 matrices. For A = 2I, the minimal polynomial is λ − 2 (since A − 2I = O). For N = [[2, 1], [0, 2]], N − 2I = [[0, 1], [0, 0]] ≠ O, but (N − 2I)2 = O, so m(λ) = (λ − 2)2. The same characteristic polynomial, different minimal polynomials, and so the two matrices are not similar.
Example 6: a 3 × 3 matrix
For B of Example 4, B − 2I = [[0, 1, 0], [0, 0, 0], [0, 0, 1]] and B − 3I = [[−1, 1, 0], [0, −1, 0], [0, 0, 0]]. The product (B − 2I)(B − 3I) has the first row (0, −1, 0) (the first row of B − 2I is (0, 1, 0), which picks the second row of B − 3I with the coefficient 1, namely (0, −1, 0)), so it is not zero. Hence m(λ) = (λ − 2)2(λ − 3), equal to p(λ).
Example 7: nilpotent and idempotent matrices
For N = [[0, 1], [0, 0]], m(λ) = λ2. For a projection P with P2 = P, the polynomial λ2 − λ annihilates P, so the minimal polynomial is λ(λ − 1), or one of its factors if P = O or I.
How does it decide diagonalizability?
A matrix is diagonalizable over ℂ exactly when its minimal polynomial has no repeated roots (it is a product of distinct linear factors). In Example 5, the minimal polynomial of 2I is λ − 2 (diagonalizable), and that of N is (λ − 2)2 (not diagonalizable). More generally, the size of the largest Jordan block of an eigenvalue equals its multiplicity in the minimal polynomial.
Table of examples
| Matrix | Characteristic polynomial | Minimal polynomial | Diagonalizable? |
|---|---|---|---|
| [[1, 2], [3, 4]] | λ2 − 5λ − 2 | λ2 − 5λ − 2 | yes |
| 2I2 | (λ − 2)2 | λ − 2 | yes |
| [[2, 1], [0, 2]] | (λ − 2)2 | (λ − 2)2 | no |
| diag(1, 1, 2) | (λ − 1)2(λ − 2) | (λ − 1)(λ − 2) | yes |
| [[2, 1, 0], [0, 2, 0], [0, 0, 3]] | (λ − 2)2(λ − 3) | (λ − 2)2(λ − 3) | no |
| [[0, 1], [0, 0]] | λ2 | λ2 | no |
Who proved the theorem?
Arthur Cayley stated the theorem in 1858 in his memoir on matrices and verified it for 2 × 2 matrices (and stated that he had checked 3 × 3); William Rowan Hamilton had proved a special case for his quaternions in 1853. The first proof for matrices of any size is attributed to Ferdinand Georg Frobenius in 1878. The notion of the minimal polynomial developed in the work on canonical forms of matrices in the same period.
Which mistakes are common?
Forgetting the identity matrix
The constant term c0 is multiplied by I when A is substituted: p(A) = A2 − 5A − 2I, not “− 2”.
Substituting into the determinant
One cannot prove p(A) = O by writing det(A − AI) = det O = 0. The expression A − AI is not a meaningful matrix determinant of the required kind.
Assuming the minimal polynomial equals the characteristic one
They are equal for matrices with a single Jordan block per eigenvalue, but in general the minimal polynomial is a proper divisor.
Taking the inverse when the constant term is zero
The formula for A−1 requires c0 ≠ 0, equivalent to det A ≠ 0.