Take a square matrix. Compute its characteristic polynomial — the polynomial whose roots are the eigenvalues, obtained by expanding . Now do something that looks almost absurd: substitute the matrix itself in place of the variable . Where the polynomial used to be a polynomial in a number, it becomes a polynomial in a matrix; each power of becomes a matrix power, each constant term becomes a constant times the identity matrix.
The astonishing claim, made by Arthur Cayley in 1858 and proved in full generality by Ferdinand Frobenius two decades later, is that the result of this substitution is always zero. Every square matrix, of every size, with entries from any field, satisfies its own characteristic polynomial:
This is the Cayley–Hamilton theorem. It is a strange, clean identity with deep structural consequences. It is one of those facts that looks like a miracle on the surface and turns out to be inevitable once enough of the theory of linear transformations is in place. This article is about what it says, why it works, and what it is good for.
The statement, with in detail
For a matrix
the characteristic polynomial is
The two coefficients are recognisable invariants: is the trace of , and is the determinant of . Cayley–Hamilton says
where the final is the identity matrix. Verify this directly on a concrete example. Take
Its trace is , its determinant is , so its characteristic polynomial is . Now compute:
Subtract and add:
The zero matrix, on the nose. Visually:
The same calculation, mutatis mutandis, would have worked for any matrix, and the analogous calculation works for any square matrix of any size — though for a matrix the polynomial would have degree and the verification by hand would be tedious.
Why it works: a glimpse
The cleanest way to see why the theorem is true is to first imagine the case where is diagonalisable, meaning there is an invertible matrix with for some diagonal matrix . The diagonal entries of are the eigenvalues of . The characteristic polynomial factors as
and when this polynomial is evaluated at the diagonal matrix , each factor has a zero in the -th diagonal position. The product of diagonal matrices, each with at least one zero on the diagonal in a different position, is the zero matrix. So , and the identity follows.
For non-diagonalisable matrices the same idea works once you replace diagonal form with Jordan canonical form, which essentially does the same job up to small upper-triangular perturbations. The full general proof handles either Jordan form directly or uses a more elegant identity involving the adjugate matrix, which sidesteps the eigenvalue picture and applies even over fields where Jordan form is not available. In every approach the underlying reason is the same: the characteristic polynomial vanishes on the eigenvalues of , and an eigenvalue-based decomposition is enough to make this vanishing global on itself.
Computing high powers cheaply
The theorem has an immediate computational payoff. Suppose you need for a matrix. Brute force would require nearly a thousand matrix multiplications. Cayley–Hamilton lets you do better. Since , every power of — including — can be written as for some scalars and . You only need to find those two scalars.
The recursion is straightforward. Let . Then multiplying both sides by and using the rule gives
A simple two-term recurrence. To get you only need to evolve the two numbers and for a thousand steps — and using fast exponentiation that drops to about steps. A computation that would have looked like matrix products is reduced to pairs of multiplications by Cayley–Hamilton.
The same principle generalises: for an matrix, every power can be expressed as a polynomial of degree less than in . The infinite series of matrix powers collapses into a finite-dimensional space, and computations that would otherwise grow without bound are tamed by linear algebra alone.
Inverses without elimination
A second use of the theorem is computing inverses. If
then Cayley–Hamilton says . Rearranging, where . So when — which means the matrix is invertible — the inverse is
A formula for the inverse as a polynomial in . For the matrix above with :
This is exactly what the standard inverse formula gives. For larger matrices the polynomial expression usually involves more arithmetic than Gaussian elimination, but it has the theoretical virtue of expressing as an algebraic function of alone — a fact that is essential in some abstract settings, particularly when matrices have entries from a commutative ring rather than a field.
What it really tells us
The deep content of Cayley–Hamilton is that the characteristic polynomial annihilates the matrix. Among all the polynomials a matrix satisfies, there is a smallest one, called the minimal polynomial, which always divides the characteristic polynomial. Whether the two are equal, and how their factorisation patterns compare, encodes essentially the entire fine structure of how a linear transformation acts on its underlying vector space — including whether it can be diagonalised, what its Jordan blocks look like, and how it splits the space into invariant subspaces.
The whole industry of normal forms, spectral decompositions, and structure theorems in linear algebra rests on this one identity. A theorem that looks at first like a curious algebraic coincidence — substituting a matrix into a polynomial that was built out of the matrix and getting zero — turns out to be the foundation stone on which the structure of linear operators is built. Eighteen-fifty-eight was a good year for matrices. & 2 \end{pmatrix}.$$
This is exactly what the standard inverse formula gives. For larger matrices the polynomial expression usually involves more arithmetic than Gaussian elimination, but it has the theoretical virtue of expressing as an algebraic function of alone — a fact that is essential in some abstract settings, particularly when matrices have entries from a commutative ring rather than a field.
What it really tells us
The deep content of Cayley–Hamilton is that the characteristic polynomial annihilates the matrix. Among all the polynomials a matrix satisfies, there is a smallest one, called the minimal polynomial, which always divides the characteristic polynomial. Whether the two are equal, and how their factorisation patterns compare, encodes essentially the entire fine structure of how a linear transformation acts on its underlying vector space — including whether it can be diagonalised, what its Jordan blocks look like, and how it splits the space into invariant subspaces.
The whole industry of normal forms, spectral decompositions, and structure theorems in linear algebra rests on this one identity. A theorem that looks at first like a curious algebraic coincidence — substituting a matrix into a polynomial that was built out of the matrix and getting zero — turns out to be the foundation stone on which the structure of linear operators is built. Eighteen-fifty-eight was a good year for matrices.
Frequently asked
Who proved Cayley–Hamilton first?
Arthur Cayley announced the result in his 1858 'Memoir on the Theory of Matrices', but he only verified it explicitly for 2×2 and 3×3 cases and acknowledged he had not proved it in general. William Rowan Hamilton had earlier proved the analogous statement for quaternions, which is a special case. The full general proof for arbitrary square matrices is due to Ferdinand Frobenius in 1878. The theorem retained both names because both men contributed important ideas and the credit dispute, unlike some others in 19th-century mathematics, was settled amicably.
Why is the theorem surprising?
Because the characteristic polynomial is derived from the matrix using scalar operations — taking a determinant, evaluating at a scalar variable λ — and there is no a priori reason that substituting the matrix back in should produce zero. For small matrices you can verify it by direct multiplication, but the calculation gives no hint of why the answer comes out to be the zero matrix. The standard proofs require either Jordan canonical form or a clever adjugate identity, neither of which is obvious in advance.
What is the theorem used for?
Three big things. First, computing high powers of a matrix: Cayley–Hamilton lets you express A^n for any n as a polynomial in A of degree less than n, which collapses an n-by-n matrix to at most n stored powers. Second, computing the inverse of an invertible matrix without Gaussian elimination — the inverse can be written as a polynomial in A. Third, theoretical results about minimal polynomials, diagonalisability, and the structure of linear transformations, all of which build on Cayley–Hamilton as a foundation.
Does the theorem hold for non-square matrices?
It does not even make sense for non-square matrices, since the characteristic polynomial is only defined when the determinant det(λI − A) is. A non-square matrix has no determinant, no eigenvalues, no characteristic polynomial, and so nothing to substitute the matrix into. Cayley–Hamilton is intrinsically a statement about square matrices, which is why it sits at the heart of the theory of linear operators on finite-dimensional vector spaces.