# Cayley–Hamilton theorem

In linear algebra, the Cayley–Hamilton theorem (named after the mathematicians Arthur Cayley and William Rowan Hamilton) states that every square matrix over a commutative ring (such as the real or complex field) satisfies its own characteristic equation.

If A is a given n×n matrix and In  is the n×n identity matrix, then the characteristic polynomial of A is defined as[7]

${\displaystyle p(\lambda )=\det(\lambda I_{n}-A)~,}$

where det is the determinant operation and λ is a variable for a scalar element of the base ring. Since the entries of the matrix ${\displaystyle (\lambda I_{n}-A)}$ are (linear or constant) polynomials in λ, the determinant is also an n-th order monic polynomial in λ. The Cayley–Hamilton theorem states that if one defines an analogous matrix equation, p(A), consisting of the replacement of the scalar eigenvalues λ with the matrix A, then this polynomial in the matrix A results in the zero matrix,

${\displaystyle p(A)=0.}$

The powers of A, obtained by substitution from powers of λ, are defined by repeated matrix multiplication; the constant term of p(λ) gives a multiple of the power A0, which is defined as the identity matrix. The theorem allows An to be expressed as a linear combination of the lower matrix powers of A. When the ring is a field, the Cayley–Hamilton theorem is equivalent to the statement that the minimal polynomial of a square matrix divides its characteristic polynomial.

The theorem was first proved in 1853[8] in terms of inverses of linear functions of quaternions, a non-commutative ring, by Hamilton.[4][5][6] This corresponds to the special case of certain 4 × 4 real or 2 × 2 complex matrices. The theorem holds for general quaternionic matrices.[9][nb 1] Cayley in 1858 stated it for 3 × 3 and smaller matrices, but only published a proof for the 2 × 2 case.[2] The general case was first proved by Frobenius in 1878.[10]

## Examples

### 1×1 matrices

For a 1×1 matrix A = (a1,1), the characteristic polynomial is given by p(λ) = λ  a, and so p(A) = (a)  a1,1 = 0 is obvious.

### 2×2 matrices

As a concrete example, let

${\displaystyle A={\begin{pmatrix}1&2\\3&4\end{pmatrix}}.}$

Its characteristic polynomial is given by

${\displaystyle p(\lambda )=\det(\lambda I_{2}-A)=\det {\begin{pmatrix}\lambda -1&-2\\-3&\lambda -4\end{pmatrix}}=(\lambda -1)(\lambda -4)-(-2)(-3)=\lambda ^{2}-5\lambda -2.}$

The Cayley–Hamilton theorem claims that, if we define

${\displaystyle p(X)=X^{2}-5X-2I_{2},}$

then

${\displaystyle p(A)=A^{2}-5A-2I_{2}={\begin{pmatrix}0&0\\0&0\\\end{pmatrix}}.}$

We can verify by computation that indeed,

${\displaystyle A^{2}-5A-2I_{2}={\begin{pmatrix}7&10\\15&22\\\end{pmatrix}}-{\begin{pmatrix}5&10\\15&20\\\end{pmatrix}}-{\begin{pmatrix}2&0\\0&2\\\end{pmatrix}}={\begin{pmatrix}0&0\\0&0\\\end{pmatrix}}.}$

For a generic 2×2 matrix,

${\displaystyle A={\begin{pmatrix}a&b\\c&d\\\end{pmatrix}},}$

the characteristic polynomial is given by p(λ) = λ2  (a + d)λ + (ad  bc), so the Cayley–Hamilton theorem states that

${\displaystyle p(A)=A^{2}-(a+d)A+(ad-bc)I_{2}={\begin{pmatrix}0&0\\0&0\\\end{pmatrix}};}$

which is indeed always the case, evident by working out the entries of A2.

## Applications

### Determinant and inverse matrix

For a general n×n invertible matrix A, i.e., one with nonzero determinant, A−1 can thus be written as an (n  1)-th order polynomial expression in A: As indicated, the Cayley–Hamilton theorem amounts to the identity

${\displaystyle p(A)=A^{n}+c_{n-1}A^{n-1}+\cdots +c_{1}A+(-1)^{n}\det(A)I_{n}=O.}$

The coefficients ci are given by the elementary symmetric polynomials of the eigenvalues of A. Using Newton identities, the elementary symmetric polynomials can in turn be expressed in terms of power sum symmetric polynomials of the eigenvalues:

${\displaystyle s_{k}=\sum _{i=1}^{n}\lambda _{i}^{k}=\operatorname {tr} (A^{k}),}$

where tr (Ak) is the trace of the matrix Ak. Thus, we can express ci in terms of the trace of powers of A.

In general, the formula for the coefficients ci is given in terms of complete exponential Bell polynomials as [nb 2]

${\displaystyle c_{n-k}={\frac {(-1)^{k}}{k!}}B_{k}(s_{1},-1!s_{2},2!s_{3},\ldots ,(-1)^{k-1}(k-1)!s_{k}).}$

In particular, the determinant of A corresponds to c0. Thus, the determinant can be written as a trace identity

${\displaystyle \det(A)={\frac {1}{n!}}B_{n}(s_{1},-1!s_{2},2!s_{3},\ldots ,(-1)^{n-1}(n-1)!s_{n}).}$

Likewise, the characteristic polynomial can be written as

${\displaystyle -(-1)^{n}\det(A)I_{n}=A(A^{n-1}+c_{n-1}A^{n-2}+\cdots +c_{1}I_{n}),}$

and, by multiplying both sides by A−1 (note −(−1)n = (−1)n−1), one is led to an expression for the inverse of A as a trace identity,

{\displaystyle {\begin{aligned}A^{-1}&={\frac {(-1)^{n-1}}{\det A}}(A^{n-1}+c_{n-1}A^{n-2}+\cdots +c_{1}I_{n}),\\[5pt]&={\frac {1}{\det A}}\sum _{k=0}^{n-1}(-1)^{n+k-1}{\frac {A^{n-k-1}}{k!}}B_{k}(s_{1},-1!s_{2},2!s_{3},\ldots ,(-1)^{k-1}(k-1)!s_{k}).\end{aligned}}}

For instance, the first few Bell polynomials are B0 = 1, B1(x1) = x1, B2(x1, x2) = x2
1
+ x2
, and B3(x1, x2, x3) = x3
1
+ 3 x1x2 + x3
.

Using these to specify the coefficients ci of the characteristic polynomial of a 2×2 matrix yields

{\displaystyle {\begin{aligned}c_{2}=B_{0}=1,\\[4pt]c_{1}={\frac {-1}{1!}}B_{1}(s_{1})=-s_{1}=-\operatorname {tr} (A),\\[4pt]c_{0}={\frac {1}{2!}}B_{2}(s_{1},-1!s_{2})={\frac {1}{2}}(s_{1}^{2}-s_{2})={\frac {1}{2}}((\operatorname {tr} (A))^{2}-\operatorname {tr} (A^{2})).\end{aligned}}}

The coefficient c0 gives the determinant of the 2×2 matrix, c1 minus its trace, while its inverse is given by

${\displaystyle A^{-1}={\frac {-1}{\det A}}(A+c_{1}I_{2})={\frac {-2(A-\operatorname {tr} (A)I_{2})}{(\operatorname {tr} (A))^{2}-\operatorname {tr} (A^{2})}}.}$

It is apparent from the general formula for cn-k, expressed in terms of Bell polynomials, that the expressions

${\displaystyle -\operatorname {tr} (A)\quad {\text{and}}\quad {\tfrac {1}{2}}(\operatorname {tr} (A)^{2}-\operatorname {tr} (A^{2}))}$

always give the coefficients cn−1 of λn−1 and cn−2 of λn−2 in the characteristic polynomial of any n×n matrix, respectively. So, for a 3×3 matrix A, the statement of the Cayley–Hamilton theorem can also be written as

${\displaystyle A^{3}-(\operatorname {tr} A)A^{2}+{\frac {1}{2}}\left((\operatorname {tr} A)^{2}-\operatorname {tr} (A^{2})\right)A-\det(A)I_{3}=O,}$

where the right-hand side designates a 3×3 matrix with all entries reduced to zero. Likewise, this determinant in the n = 3 case, is now

{\displaystyle {\begin{aligned}\det(A)&={\frac {1}{3!}}B_{3}(s_{1},-1!s_{2},2!s_{3})={\frac {1}{6}}(s_{1}^{3}+3s_{1}(-s_{2})+2s_{3})\\[5pt]&={\tfrac {1}{6}}\left((\operatorname {tr} A)^{3}-3\operatorname {tr} (A^{2})(\operatorname {tr} A)+2\operatorname {tr} (A^{3})\right).\end{aligned}}}

This expression gives the negative of coefficient cn−3 of λn−3 in the general case, as seen below.

Similarly, one can write for a 4×4 matrix A,

${\displaystyle A^{4}-(\operatorname {tr} A)A^{3}+{\tfrac {1}{2}}{\bigl (}(\operatorname {tr} A)^{2}-\operatorname {tr} (A^{2}){\bigr )}A^{2}-{\tfrac {1}{6}}{\bigl (}(\operatorname {tr} A)^{3}-3\operatorname {tr} (A^{2})(\operatorname {tr} A)+2\operatorname {tr} (A^{3}){\bigr )}A+\det(A)I_{4}=O,}$

where, now, the determinant is cn−4,

${\displaystyle {\tfrac {1}{24}}\left((\operatorname {tr} A)^{4}-6\operatorname {tr} (A^{2})(\operatorname {tr} A)^{2}+3(\operatorname {tr} (A^{2}))^{2}+8\operatorname {tr} (A^{3})\operatorname {tr} (A)-6\operatorname {tr} (A^{4})\right),}$

and so on for larger matrices. The increasingly complex expressions for the coefficients ck is deducible from Newton's identities or the Faddeev–LeVerrier algorithm.

Another method for obtaining these coefficients ck for a general n×n matrix, provided no root be zero, relies on the following alternative expression for the determinant,

${\displaystyle p(\lambda )=\det(\lambda I_{n}-A)=\lambda ^{n}\exp(\operatorname {tr} (\log(I_{n}-A/\lambda ))).}$

Hence, by virtue of the Mercator series,

${\displaystyle p(\lambda )=\lambda ^{n}\exp \left(-\operatorname {tr} \sum _{m=1}^{\infty }{({A \over \lambda })^{m} \over m}\right),}$

where the exponential only needs be expanded to order λn, since p(λ) is of order n, the net negative powers of λ automatically vanishing by the C–H theorem. (Again, this requires a ring containing the rational numbers.) The coefficients of λ can be directly written in terms of complete Bell polynomials by comparing this expression with the generating function of the Bell polynomial.

Differentiation of this expression with respect to λ allows determination of the generic coefficients of the characteristic polynomial for general n, as determinants of m×m matrices,[nb 3]

${\displaystyle c_{n-m}={\frac {(-1)^{m}}{m!}}{\begin{vmatrix}\operatorname {tr} A&m-1&0&\cdots \\\operatorname {tr} A^{2}&\operatorname {tr} A&m-2&\cdots \\\vdots &\vdots &&&\vdots \\\operatorname {tr} A^{m-1}&\operatorname {tr} A^{m-2}&\cdots &\cdots &1\\\operatorname {tr} A^{m}&\operatorname {tr} A^{m-1}&\cdots &\cdots &\operatorname {tr} A\end{vmatrix}}~.}$

### n-th Power of matrix

The Cayley–Hamilton theorem always provides a relationship between the powers of A (though not always the simplest one), which allows one to simplify expressions involving such powers, and evaluate them without having to compute the power An or any higher powers of A.

As an example, for ${\displaystyle A={\begin{pmatrix}1&2\\3&4\end{pmatrix}}}$ the theorem gives

${\displaystyle A^{2}=5A+2I_{2}\,.}$

Then, to calculate A4, observe

${\displaystyle A^{3}=(5A+2I_{2})A=5A^{2}+2A=5(5A+2I_{2})+2A=27A+10I_{2},}$
${\displaystyle A^{4}=A^{3}A=(27A+10I_{2})A=27A^{2}+10A=27(5A+2I_{2})+10A=145A+54I_{2}\,.}$

Likewise,

${\displaystyle A^{-1}={\frac {A-5I_{2}}{2}}~.}$

Notice that we have been able to write the matrix power as the sum of two terms. In fact, matrix power of any order k can be written as a matrix polynomial of degree at most n - 1, where n is the size of a square matrix. This is an instance where Cayley–Hamilton theorem can be used to express a matrix function, which we will discuss below systematically.

### Matrix functions

Given an analytic function

${\displaystyle f(x)=\sum _{k=0}^{\infty }a_{k}x^{k}}$

and the characteristic polynomial p(x) of degree n of an n × n matrix A, the function can be expressed using long division as

${\displaystyle f(x)=q(x)p(x)+r(x),}$

where q(x) is some quotient polynomial and r(x) is a remainder polynomial such that 0 ≤ deg r(x) < n. By the Cayley–Hamilton theorem, replacing x by the matrix A gives p(A) = 0, so one has

${\displaystyle f(A)=r(A).}$

Thus, the analytic function of matrix A can be expressed as a matrix polynomial of degree less than n.

Let the remainder polynomial be

${\displaystyle r(x)=c_{0}+c_{1}x+\cdots +c_{n-1}x^{n-1}.}$

Since p(λ) = 0, evaluating the function f(x) at the n eigenvalues of A, yields

${\displaystyle f(\lambda _{i})=r(\lambda _{i})=c_{0}+c_{1}\lambda _{i}+\cdots +c_{n-1}\lambda _{i}^{n-1},\qquad \mathrm {for} \qquad i=1,2,...,n.}$

This amounts to a system of n linear equations, which can be solved to determine the coefficients ci. Thus, one has

${\displaystyle f(A)=\sum _{k=0}^{n-1}c_{k}A^{k}.}$

When the eigenvalues are repeated, that is λi = λj for some i ≠ j, two or more equations are identical; and hence the linear equations cannot be solved uniquely. For such cases, for an eigenvalue λ with multiplicity m, the first m – 1 derivative of p(x) vanishes at the eigenvalues. Thus, there are the extra m – 1 linearly independent solutions

${\displaystyle {\frac {\mathrm {d} ^{k}f(x)}{\mathrm {d} x^{k}}}{\Big |}_{x=\lambda }={\frac {\mathrm {d} ^{k}r(x)}{\mathrm {d} x^{k}}}{\Big |}_{x=\lambda }\qquad {\text{for}}\qquad k=1,2,\ldots ,m-1,}$

which, when combined with others, yield the required n equations to solve for ci.

Finding a polynomial that passes through the points (λi, f (λi)) is essentially an interpolation problem, and can be solved using Lagrange or Newton interpolation techniques, leading to Sylvester's formula.

For example, suppose the task is to find the polynomial representation of

${\displaystyle f(A)=e^{At}\qquad \mathrm {where} \qquad A={\begin{pmatrix}1&2\\0&3\end{pmatrix}}.}$

The characteristic polynomial is p(x) = (x − 1)(x − 3) = x2 − 4x + 3, and the eigenvalues are λ = 1, 3. Let r(x) = c0 + c1x. Evaluating f(λ) = r(λ) at the eigenvalues, one obtains two linear equations et = c0 + c1 and e3t = c0 + 3c1. Solving the equations yields c0 = (3ete3t)/2 and c1 = (e3tet)/2. Thus, it follows that

${\displaystyle e^{At}=c_{0}I_{2}+c_{1}A={\begin{pmatrix}c_{0}+c_{1}&2c_{1}\\0&c_{0}+3c_{1}\end{pmatrix}}={\begin{pmatrix}e^{t}&e^{3t}-e^{t}\\0&e^{3t}\end{pmatrix}}.}$

If, instead, the function were f(A) = sin At, then the coefficients would have been c0 = (3 sin t − sin 3t)/2 and c1 = (sin 3t - sin t)/2; hence

${\displaystyle \sin(At)=c_{0}I_{2}+c_{1}A={\begin{pmatrix}\sin t&\sin 3t-\sin t\\0&\sin 3t\end{pmatrix}}.}$

As a further example, when considering

${\displaystyle f(A)=e^{At}\qquad \mathrm {where} \qquad A={\begin{pmatrix}0&1\\-1&0\end{pmatrix}},}$

then the characteristic polynomial is p(x) = x2 + 1, and the eigenvalues are λ = ±i. As before, evaluating the function at the eigenvalues gives us the linear equations eit = c0 + i c1 and eit = c0ic1; the solution of which gives, c0 = (eit + eit)/2 = cos t and c1 = (eiteit)/2i = sin t. Thus, for this case,

${\displaystyle e^{At}=(\cos t)I_{2}+(\sin t)A={\begin{pmatrix}\cos t&\sin t\\-\sin t&\cos t\end{pmatrix}},}$

which is a rotation matrix.

Standard examples of such usage is the exponential map from the Lie algebra of a matrix Lie group into the group. It is given by a matrix exponential,

${\displaystyle \exp :{\mathfrak {g}}\rightarrow G;\qquad tX\mapsto e^{tX}=\sum _{n=0}^{\infty }{\frac {t^{n}X^{n}}{n!}}=I+tX+{\frac {t^{2}X^{2}}{2}}+\cdots ,t\in \mathbb {R} ,X\in {\mathfrak {g}}.}$

Such expressions have long been known for SU(2),

${\displaystyle e^{i(\theta /2)({\hat {n}}\cdot \sigma )}=I_{2}\cos \theta /2+i({\hat {n}}\cdot \sigma )\sin \theta /2,}$

where the σ are the Pauli matrices and for SO(3),

${\displaystyle e^{i\theta ({\hat {n}}\cdot \mathbf {J} )}=I_{3}+i({\hat {n}}\cdot \mathbf {J} )\sin \theta +({\hat {n}}\cdot \mathbf {J} )^{2}(\cos \theta -1),}$

which is Rodrigues' rotation formula. For the notation, see rotation group SO(3)#A note on Lie algebra.

More recently, expressions have appeared for other groups, like the Lorentz group SO(3, 1),[11] O(4, 2)[12] and SU(2, 2),[13] as well as GL(n, R).[14] The group O(4, 2) is the conformal group of spacetime, SU(2, 2) its simply connected cover (to be precise, the simply connected cover of the connected component SO+(4, 2) of O(4, 2)). The expressions obtained apply to the standard representation of these groups. They require knowledge of (some of) the eigenvalues of the matrix to exponentiate. For SU(2) (and hence for SO(3)), closed expressions have recently been obtained for all irreducible representations, i.e. of any spin.[15]

### Algebraic number theory

The Cayley–Hamilton theorem is an effective tool for computing the minimal polynomial of algebraic integers. For example, given a finite extension ${\displaystyle \mathbb {Q} [\alpha _{1},\ldots ,\alpha _{k}]}$ of ${\displaystyle \mathbb {Q} }$ and an algebraic integer ${\displaystyle \alpha \in \mathbb {Q} [\alpha _{1},\ldots ,\alpha _{k}]}$ which is a non-zero linear combination of the ${\displaystyle \alpha _{1}^{n_{1}}\cdots \alpha _{k}^{n_{k}}}$ we can compute the minimal polynomial of ${\displaystyle \alpha }$ by finding a matrix representing the ${\displaystyle \mathbb {Q} }$-linear transformation

${\displaystyle \cdot \alpha :\mathbb {Q} [\alpha _{1},\ldots ,\alpha _{k}]\to \mathbb {Q} [\alpha _{1},\ldots ,\alpha _{k}]}$

If we call this transformation matrix ${\displaystyle A}$, then we can find the minimal polynomial by applying the Cayley–Hamilton theorem to ${\displaystyle A}$.[16]

## Proving the theorem in general

The Cayley–Hamilton theorem is an immediate consequence of the existence of the Jordan normal form for matrices over algebraically closed fields. In this section direct proofs are presented.

As the examples above show, obtaining the statement of the Cayley–Hamilton theorem for an n×n matrix

${\displaystyle A=(a_{ij})_{i,j=1}^{n}}$

requires two steps: first the coefficients ci of the characteristic polynomial are determined by development as a polynomial in t of the determinant

{\displaystyle {\begin{aligned}p(t)&=\det(tI_{n}-A)={\begin{vmatrix}t-a_{1,1}&-a_{1,2}&\cdots &-a_{1,n}\\-a_{2,1}&t-a_{2,2}&\cdots &-a_{2,n}\\\vdots &\vdots &\ddots &\vdots \\-a_{n,1}&-a_{n,2}&\cdots &t-a_{n,n}\end{vmatrix}}\\[5pt]&=t^{n}+c_{n-1}t^{n-1}+\cdots +c_{1}t+c_{0},\end{aligned}}}

and then these coefficients are used in a linear combination of powers of A that is equated to the n×n null matrix:

${\displaystyle A^{n}+c_{n-1}A^{n-1}+\cdots +c_{1}A+c_{0}I_{n}={\begin{pmatrix}0&\cdots &0\\\vdots &\ddots &\vdots \\0&\cdots &0\end{pmatrix}}.}$

The left hand side can be worked out to an n×n matrix whose entries are (enormous) polynomial expressions in the set of entries ai,j of A, so the Cayley–Hamilton theorem states that each of these n2 expressions are equal to 0. For any fixed value of n these identities can be obtained by tedious but completely straightforward algebraic manipulations. None of these computations can show however why the Cayley–Hamilton theorem should be valid for matrices of all possible sizes n, so a uniform proof for all n is needed.

### Preliminaries

If a vector v of size n happens to be an eigenvector of A with eigenvalue λ, in other words if Av = λv, then

{\displaystyle {\begin{aligned}p(A)\cdot v&=A^{n}\cdot v+c_{n-1}A^{n-1}\cdot v+\cdots +c_{1}A\cdot v+c_{0}I_{n}\cdot v\\[6pt]&=\lambda ^{n}v+c_{n-1}\lambda ^{n-1}v+\cdots +c_{1}\lambda v+c_{0}v=p(\lambda )v,\end{aligned}}}

which is the null vector since p(λ) = 0 (the eigenvalues of A are precisely the roots of p(t)). This holds for all possible eigenvalues λ, so the two matrices equated by the theorem certainly give the same (null) result when applied to any eigenvector. Now if A admits a basis of eigenvectors, in other words if A is diagonalizable, then the Cayley–Hamilton theorem must hold for A, since two matrices that give the same values when applied to each element of a basis must be equal.

${\displaystyle A=XDX^{-1},\quad D=\operatorname {diag} (\lambda _{i}),\quad i=1,2,...,n}$
${\displaystyle p_{A}(\lambda )=|\lambda I-A|=}$ product of eigenvalues of ${\displaystyle \lambda I-A=\prod _{i=1}^{n}(\lambda -\lambda _{i})\equiv \sum _{k=0}^{n}c_{k}\lambda ^{k}}$
${\displaystyle p_{A}(A)=\sum c_{k}A^{k}=Xp_{A}(D)X^{-1}=XCX^{-1}}$
${\displaystyle C_{ii}=\sum _{k=0}^{n}c_{k}\lambda _{i}^{k}=\prod _{j=1}^{n}(\lambda _{i}-\lambda _{j})=0,\qquad C_{i,j\neq i}=0}$
${\displaystyle \therefore p_{A}(A)=XCX^{-1}=O.}$

Consider now the function ${\displaystyle e\colon M_{n}\to M_{n}}$ which maps ${\displaystyle n\times n}$ matrices to ${\displaystyle n\times n}$ matrices given by the formula ${\displaystyle e(A)=p_{A}(A)}$, i.e. which takes a matrix ${\displaystyle A}$ and plugs it into its own characteristic polynomial. Not all matrices are diagonalizable, but for matrices with complex coefficients many of them are: the set of ${\displaystyle D}$ diagonalizable complex square matrices of a given size is dense in the set of all such square matrices[17] (for a matrix to be diagonalizable it suffices for instance that its characteristic polynomial not have any multiple roots). Now viewed as a function ${\displaystyle e\colon \mathbb {C} ^{n^{2}}\to \mathbb {C} ^{n^{2}}}$(since matrices have ${\displaystyle n^{2}}$entries) we see that this function is continuous. This is true because the entries of the image of a matrix are given by polynomials in the entries of the matrix. Since

${\displaystyle e(D)=\left\{{\begin{pmatrix}0&\cdots &0\\\vdots &\ddots &\vdots \\0&\cdots &0\end{pmatrix}}\right\}}$

and since the set ${\displaystyle D}$ is dense, by continuity this function must map the entire set of ${\displaystyle n\times n}$matrices to the zero matrix. Therefore, the Cayley–Hamilton theorem is true for complex numbers, and must therefore also hold for ${\displaystyle \mathbb {Q} }$- or ${\displaystyle \mathbb {R} }$-valued matrices.

While this provides a valid proof, the argument is not very satisfactory, since the identities represented by the theorem do not in any way depend on the nature of the matrix (diagonalizable or not), nor on the kind of entries allowed (for matrices with real entries the diagonalizable ones do not form a dense set, and it seems strange one would have to consider complex matrices to see that the Cayley–Hamilton theorem holds for them). We shall therefore now consider only arguments that prove the theorem directly for any matrix using algebraic manipulations only; these also have the benefit of working for matrices with entries in any commutative ring.

There is a great variety of such proofs of the Cayley–Hamilton theorem, of which several will be given here. They vary in the amount of abstract algebraic notions required to understand the proof. The simplest proofs use just those notions needed to formulate the theorem (matrices, polynomials with numeric entries, determinants), but involve technical computations that render somewhat mysterious the fact that they lead precisely to the correct conclusion. It is possible to avoid such details, but at the price of involving more subtle algebraic notions: polynomials with coefficients in a non-commutative ring, or matrices with unusual kinds of entries.

#### Adjugate matrices

All proofs below use the notion of the adjugate matrix adj(M) of an n×n matrix M, the transpose of its cofactor matrix.

This is a matrix whose coefficients are given by polynomial expressions in the coefficients of M (in fact, by certain (n  1)×(n  1) determinants), in such a way that the following fundamental relations hold,

${\displaystyle \operatorname {adj} (M)\cdot M=\det(M)I_{n}=M\cdot \operatorname {adj} (M)~.}$

These relations are a direct consequence of the basic properties of determinants: evaluation of the (i,j) entry of the matrix product on the left gives the expansion by column j of the determinant of the matrix obtained from M by replacing column i by a copy of column j, which is det(M) if i = j and zero otherwise; the matrix product on the right is similar, but for expansions by rows.

Being a consequence of just algebraic expression manipulation, these relations are valid for matrices with entries in any commutative ring (commutativity must be assumed for determinants to be defined in the first place). This is important to note here, because these relations will be applied below for matrices with non-numeric entries such as polynomials.

### A direct algebraic proof

This proof uses just the kind of objects needed to formulate the Cayley–Hamilton theorem: matrices with polynomials as entries. The matrix t InA whose determinant is the characteristic polynomial of A is such a matrix, and since polynomials form a commutative ring, it has an adjugate

${\displaystyle B=\operatorname {adj} (tI_{n}-A).}$

Then, according to the right-hand fundamental relation of the adjugate, one has

${\displaystyle (tI_{n}-A)B=\det(tI_{n}-A)I_{n}=p(t)I_{n}~.}$

Since B is also a matrix with polynomials in t as entries, one can, for each i , collect the coefficients of ti in each entry to form a matrix B i of numbers, such that one has

${\displaystyle B=\sum _{i=0}^{n-1}t^{i}B_{i}~.}$

(The way the entries of B are defined makes clear that no powers higher than tn−1 occur). While this looks like a polynomial with matrices as coefficients, we shall not consider such a notion; it is just a way to write a matrix with polynomial entries as a linear combination of n constant matrices, and the coefficient t i has been written to the left of the matrix to stress this point of view.

Now, one can expand the matrix product in our equation by bilinearity

{\displaystyle {\begin{aligned}p(t)I_{n}&=(tI_{n}-A)B\\&=(tI_{n}-A)\sum _{i=0}^{n-1}t^{i}B_{i}\\&=\sum _{i=0}^{n-1}tI_{n}\cdot t^{i}B_{i}-\sum _{i=0}^{n-1}A\cdot t^{i}B_{i}\\&=\sum _{i=0}^{n-1}t^{i+1}B_{i}-\sum _{i=0}^{n-1}t^{i}AB_{i}\\&=t^{n}B_{n-1}+\sum _{i=1}^{n-1}t^{i}(B_{i-1}-AB_{i})-AB_{0}~.\end{aligned}}}

Writing

${\displaystyle p(t)I_{n}=t^{n}I_{n}+t^{n-1}c_{n-1}I_{n}+\cdots +tc_{1}I_{n}+c_{0}I_{n}~,}$

one obtains an equality of two matrices with polynomial entries, written as linear combinations of constant matrices with powers of t as coefficients.

Such an equality can hold only if in any matrix position the entry that is multiplied by a given power ti is the same on both sides; it follows that the constant matrices with coefficient ti in both expressions must be equal. Writing these equations then for i from n down to 0, one finds

${\displaystyle B_{n-1}=I_{n},\qquad B_{i-1}-AB_{i}=c_{i}I_{n}\quad {\text{for }}1\leq i\leq n-1,\qquad -AB_{0}=c_{0}I_{n}~.}$

Finally, multiply the equation of the coefficients of ti from the left by Ai, and sum up:

${\textstyle A^{n}B_{n-1}+\sum \limits _{i=1}^{n-1}\left(A^{i}B_{i-1}-A^{i+1}B_{i}\right)-AB_{0}=A^{n}+c_{n-1}A^{n-1}+\cdots +c_{1}A+c_{0}I_{n}~.}$

The left-hand sides form a telescoping sum and cancel completely; the right-hand sides add up to ${\displaystyle p(A)}$:

${\displaystyle 0=p(A)~.}$

This completes the proof.

### A proof using polynomials with matrix coefficients

This proof is similar to the first one, but tries to give meaning to the notion of polynomial with matrix coefficients that was suggested by the expressions occurring in that proof. This requires considerable care, since it is somewhat unusual to consider polynomials with coefficients in a non-commutative ring, and not all reasoning that is valid for commutative polynomials can be applied in this setting.

Notably, while arithmetic of polynomials over a commutative ring models the arithmetic of polynomial functions, this is not the case over a non-commutative ring (in fact there is no obvious notion of polynomial function in this case that is closed under multiplication). So when considering polynomials in t with matrix coefficients, the variable t must not be thought of as an "unknown", but as a formal symbol that is to be manipulated according to given rules; in particular one cannot just set t to a specific value.

${\displaystyle (f+g)(x)=\sum _{i}\left(f_{i}+g_{i}\right)x^{i}=\sum _{i}{f_{i}x^{i}}+\sum _{i}{g_{i}x^{i}}=f(x)+g(x).}$

Let ${\displaystyle M(n,R)}$ be the ring of ${\displaystyle n\times n}$ matrices with entries in some ring R (such as the real or complex numbers) that has A as an element. Matrices with as coefficients polynomials in t, such as ${\displaystyle tI_{n}-A}$ or its adjugate B in the first proof, are elements of ${\displaystyle M(n,R[t])}$.

By collecting like powers of t, such matrices can be written as "polynomials" in t with constant matrices as coefficients; write ${\displaystyle M(n,R)[t]}$ for the set of such polynomials. Since this set is in bijection with ${\displaystyle M(n,R[t])}$, one defines arithmetic operations on it correspondingly, in particular multiplication is given by

${\displaystyle \left(\sum _{i}M_{i}t^{i}\right)\left(\sum _{j}N_{j}t^{j}\right)=\sum _{i,j}(M_{i}N_{j})t^{i+j},}$

respecting the order of the coefficient matrices from the two operands; obviously this gives a non-commutative multiplication.

Thus, the identity

${\displaystyle (tI_{n}-A)B=p(t)I_{n}.}$

from the first proof can be viewed as one involving a multiplication of elements in ${\displaystyle M(n,R)[t]}$ .

At this point, it is tempting to simply set t equal to the matrix A , which makes the first factor on the left equal to the null matrix, and the right hand side equal to p(A); however, this is not an allowed operation when coefficients do not commute. It is possible to define a "right-evaluation map" evA : M[t] → M, which replaces each ti by the matrix power Ai of A , where one stipulates that the power is always to be multiplied on the right to the corresponding coefficient.

But this map is not a ring homomorphism: the right-evaluation of a product differs in general from the product of the right-evaluations. This is so because multiplication of polynomials with matrix coefficients does not model multiplication of expressions containing unknowns: a product ${\displaystyle Mt^{i}Nt^{j}=(M\cdot N)t^{i+j}}$ is defined assuming that t commutes with N, but this may fail if t is replaced by the matrix A.

One can work around this difficulty in the particular situation at hand, since the above right-evaluation map does become a ring homomorphism if the matrix A is in the center of the ring of coefficients, so that it commutes with all the coefficients of the polynomials (the argument proving this is straightforward, exactly because commuting t with coefficients is now justified after evaluation).

Now, A is not always in the center of M, but we may replace M with a smaller ring provided it contains all the coefficients of the polynomials in question: ${\displaystyle I_{n}}$, A, and the coefficients ${\displaystyle B_{i}}$ of the polynomial B. The obvious choice for such a subring is the centralizer Z of A, the subring of all matrices that commute with A; by definition A is in the center of Z.

This centralizer obviously contains ${\displaystyle I_{n}}$, and A, but one has to show that it contains the matrices ${\displaystyle B_{i}}$. To do this, one combines the two fundamental relations for adjugates, writing out the adjugate B as a polynomial:

{\displaystyle {\begin{aligned}\left(\sum _{i=0}^{m}B_{i}t^{i}\right)(tI_{n}-A)&=(tI_{n}-A)\sum _{i=0}^{m}B_{i}t^{i}\\\sum _{i=0}^{m}B_{i}t^{i+1}-\sum _{i=0}^{m}B_{i}At^{i}&=\sum _{i=0}^{m}B_{i}t^{i+1}-\sum _{i=0}^{m}AB_{i}t^{i}\\\sum _{i=0}^{m}B_{i}At^{i}&=\sum _{i=0}^{m}AB_{i}t^{i}.\end{aligned}}}

Equating the coefficients shows that for each i, we have A Bi = Bi A as desired. Having found the proper setting in which evA is indeed a homomorphism of rings, one can complete the proof as suggested above:

{\displaystyle {\begin{aligned}\operatorname {ev} _{A}{\bigl (}p(t)I_{n}{\bigr )}&=\operatorname {ev} _{A}((tI_{n}-A)B)\\[5pt]p(A)&=\operatorname {ev} _{A}(tI_{n}-A)\cdot \operatorname {ev} _{A}(B)\\[5pt]p(A)&=(AI_{n}-A)\cdot \operatorname {ev} _{A}(B)=O\cdot \operatorname {ev} _{A}(B)=O.\end{aligned}}}

This completes the proof.

### A synthesis of the first two proofs

In the first proof, one was able to determine the coefficients Bi of B based on the right-hand fundamental relation for the adjugate only. In fact the first n equations derived can be interpreted as determining the quotient B of the Euclidean division of the polynomial p(t)In on the left by the monic polynomial IntA, while the final equation expresses the fact that the remainder is zero. This division is performed in the ring of polynomials with matrix coefficients. Indeed, even over a non-commutative ring, Euclidean division by a monic polynomial P is defined, and always produces a unique quotient and remainder with the same degree condition as in the commutative case, provided it is specified at which side one wishes P to be a factor (here that is to the left).

To see that quotient and remainder are unique (which is the important part of the statement here), it suffices to write ${\displaystyle PQ+r=PQ'+r'}$ as ${\displaystyle P(Q-Q')=r'-r}$ and observe that since P is monic, P(Q−Q') cannot have a degree less than that of P, unless Q=Q' .

But the dividend p(t)In and divisor IntA used here both lie in the subring (R[A])[t], where R[A] is the subring of the matrix ring M(n, R) generated by A: the R-linear span of all powers of A. Therefore, the Euclidean division can in fact be performed within that commutative polynomial ring, and of course it then gives the same quotient B and remainder 0 as in the larger ring; in particular this shows that B in fact lies in (R[A])[t].

But, in this commutative setting, it is valid to set t to A in the equation

${\displaystyle p(t)I_{n}=(tI_{n}-A)B;}$

in other words, to apply the evaluation map

${\displaystyle \operatorname {ev} _{A}:(R[A])[t]\to R[A]}$

which is a ring homomorphism, giving

${\displaystyle p(A)=0\cdot \operatorname {ev} _{A}(B)=0}$

just like in the second proof, as desired.

In addition to proving the theorem, the above argument tells us that the coefficients Bi of B are polynomials in A, while from the second proof we only knew that they lie in the centralizer Z of A; in general Z is a larger subring than R[A], and not necessarily commutative. In particular the constant term B0= adj(−A) lies in R[A]. Since A is an arbitrary square matrix, this proves that adj(A) can always be expressed as a polynomial in A (with coefficients that depend on A).

In fact, the equations found in the first proof allow successively expressing ${\displaystyle B_{n-1},\ldots ,B_{1},B_{0}}$ as polynomials in A, which leads to the identity

${\displaystyle \operatorname {adj} (-A)=\sum _{i=1}^{n}c_{i}A^{i-1},}$

valid for all n×n matrices, where

${\displaystyle p(t)=t^{n}+c_{n-1}t^{n-1}+\cdots +c_{1}t+c_{0}}$

is the characteristic polynomial of A.

Note that this identity also implies the statement of the Cayley–Hamilton theorem: one may move adj(−A) to the right hand side, multiply the resulting equation (on the left or on the right) by A, and use the fact that

${\displaystyle -A\cdot \operatorname {adj} (-A)=\operatorname {adj} (-A)\cdot (-A)=\det(-A)I_{n}=c_{0}I_{n}.}$

### A proof using matrices of endomorphisms

As was mentioned above, the matrix p(A) in statement of the theorem is obtained by first evaluating the determinant and then substituting the matrix A for t; doing that substitution into the matrix ${\displaystyle tI_{n}-A}$ before evaluating the determinant is not meaningful. Nevertheless, it is possible to give an interpretation where p(A) is obtained directly as the value of a certain determinant, but this requires a more complicated setting, one of matrices over a ring in which one can interpret both the entries ${\displaystyle A_{i,j}}$ of A, and all of A itself. One could take for this the ring M(n, R) of n×n matrices over R, where the entry ${\displaystyle A_{i,j}}$ is realised as ${\displaystyle A_{i,j}I_{n}}$, and A as itself. But considering matrices with matrices as entries might cause confusion with block matrices, which is not intended, as that gives the wrong notion of determinant (recall that the determinant of a matrix is defined as a sum of products of its entries, and in the case of a block matrix this is generally not the same as the corresponding sum of products of its blocks!). It is clearer to distinguish A from the endomorphism φ of an n-dimensional vector space V (or free R-module if R is not a field) defined by it in a basis ${\displaystyle e_{1},\ldots ,e_{n}}$, and to take matrices over the ring End(V) of all such endomorphisms. Then φ ∈ End(V) is a possible matrix entry, while A designates the element of M(n, End(V)) whose i,j entry is endomorphism of scalar multiplication by ${\displaystyle A_{i,j}}$; similarly ${\displaystyle I_{n}}$ will be interpreted as element of M(n, End(V)). However, since End(V) is not a commutative ring, no determinant is defined on M(n, End(V)); this can only be done for matrices over a commutative subring of End(V). Now the entries of the matrix ${\displaystyle \varphi I_{n}-A}$ all lie in the subring R[φ] generated by the identity and φ, which is commutative. Then a determinant map M(n, R[φ]) → R[φ] is defined, and ${\displaystyle \det(\varphi I_{n}-A)}$ evaluates to the value p(φ) of the characteristic polynomial of A at φ (this holds independently of the relation between A and φ); the Cayley–Hamilton theorem states that p(φ) is the null endomorphism.

In this form, the following proof can be obtained from that of (Atiyah & MacDonald 1969,Prop. 2.4) (which in fact is the more general statement related to the Nakayama lemma; one takes for the ideal in that proposition the whole ring R). The fact that A is the matrix of φ in the basis e1, ..., en means that

${\displaystyle \varphi (e_{i})=\sum _{j=1}^{n}A_{j,i}e_{j}\quad {\text{for }}i=1,\ldots ,n.}$

One can interpret these as n components of one equation in Vn, whose members can be written using the matrix-vector product M(n, End(V)) × VnVn that is defined as usual, but with individual entries ψ ∈ End(V) and v in V being "multiplied" by forming ${\displaystyle \psi (v)}$; this gives:

${\displaystyle \varphi I_{n}\cdot E=A^{\operatorname {tr} }\cdot E,}$

where ${\displaystyle E\in V^{n}}$ is the element whose component i is ei (in other words it is the basis e1, ..., en of V written as a column of vectors). Writing this equation as

${\displaystyle (\varphi I_{n}-A^{\operatorname {tr} })\cdot E=0\in V^{n}}$

one recognizes the transpose of the matrix ${\displaystyle \varphi I_{n}-A}$ considered above, and its determinant (as element of M(n, R[φ])) is also p(φ). To derive from this equation that p(φ) = 0 ∈ End(V), one left-multiplies by the adjugate matrix of ${\displaystyle \varphi I_{n}-A^{\operatorname {tr} }}$, which is defined in the matrix ring M(n, R[φ]), giving

{\displaystyle {\begin{aligned}0&=\operatorname {adj} (\varphi I_{n}-A^{\operatorname {tr} })\cdot ((\varphi I_{n}-A^{\operatorname {tr} })\cdot E)\\&=(\operatorname {adj} (\varphi I_{n}-A^{\operatorname {tr} })\cdot (\varphi I_{n}-A^{\operatorname {tr} }))\cdot E\\&=(\det(\varphi I_{n}-A^{\operatorname {tr} })I_{n})\cdot E\\&=(p(\varphi )I_{n})\cdot E;\end{aligned}}}

the associativity of matrix-matrix and matrix-vector multiplication used in the first step is a purely formal property of those operations, independent of the nature of the entries. Now component i of this equation says that p(φ)(ei) = 0 ∈ V; thus p(φ) vanishes on all ei, and since these elements generate V it follows that p(φ) = 0 ∈ End(V), completing the proof.

One additional fact that follows from this proof is that the matrix A whose characteristic polynomial is taken need not be identical to the value φ substituted into that polynomial; it suffices that φ be an endomorphism of V satisfying the initial equations

${\displaystyle \varphi (e_{i})=\sum _{j}A_{j,i}e_{j}}$

for some sequence of elements e1,...,en that generate V (which space might have smaller dimension than n, or in case the ring R is not a field it might not be a free module at all).

### A bogus "proof": p(A) = det(AIn−A) = det(A−A) = 0

One persistent elementary but incorrect argument[18] for the theorem is to "simply" take the definition

${\displaystyle p(\lambda )=\det(\lambda I_{n}-A)}$

and substitute A for λ, obtaining

${\displaystyle p(A)=\det(AI_{n}-A)=\det(A-A)=0~.}$

There are many ways to see why this argument is wrong. First, in Cayley–Hamilton theorem, p(A) is an n×n matrix. However, the right hand side of the above equation is the value of a determinant, which is a scalar. So they cannot be equated unless n = 1 (i.e. A is just a scalar). Second, in the expression ${\displaystyle \det(\lambda I_{n}-A)}$, the variable λ actually occurs at the diagonal entries of the matrix ${\displaystyle \lambda I_{n}-A}$. To illustrate, consider the characteristic polynomial in the previous example again:

${\displaystyle \det {\begin{pmatrix}\lambda -1&-2\\-3&\lambda -4\end{pmatrix}}.}$

If one substitutes the entire matrix A for λ in those positions, one obtains

${\displaystyle \det {\begin{pmatrix}{\begin{pmatrix}1&2\\3&4\end{pmatrix}}-1&-2\\-3&{\begin{pmatrix}1&2\\3&4\end{pmatrix}}-4\end{pmatrix}},}$

in which the "matrix" expression is simply not a valid one. Note, however, that if scalar multiples of identity matrices instead of scalars are subtracted in the above, i.e. if the substitution is performed as

${\displaystyle \det {\begin{pmatrix}{\begin{pmatrix}1&2\\3&4\end{pmatrix}}-I_{2}&-2I_{2}\\-3I_{2}&{\begin{pmatrix}1&2\\3&4\end{pmatrix}}-4I_{2}\end{pmatrix}},}$

then the determinant is indeed zero, but the expanded matrix in question does not evaluate to ${\displaystyle AI_{n}-A}$; nor can its determinant (a scalar) be compared to p(A) (a matrix). So the argument that ${\displaystyle p(A)=\det(AI_{n}-A)=0}$ still does not apply.

Actually, if such an argument holds, it should also hold when other multilinear forms instead of determinant is used. For instance, if we consider the permanent function and define ${\displaystyle q(\lambda )=\operatorname {perm} (\lambda I_{n}-A)}$, then by the same argument, we should be able to "prove" that q(A) = 0. But this statement is demonstrably wrong. In the 2-dimensional case, for instance, the permanent of a matrix is given by

${\displaystyle \operatorname {perm} {\begin{pmatrix}a&b\\c&d\end{pmatrix}}=ad+bc.}$

So, for the matrix A in the previous example,

{\displaystyle {\begin{aligned}q(\lambda )&=\operatorname {perm} (\lambda I_{2}-A)=\operatorname {perm} {\begin{pmatrix}\lambda -1&-2\\-3&\lambda -4\end{pmatrix}}\\[6pt]&=(\lambda -1)(\lambda -4)+(-2)(-3)=\lambda ^{2}-5\lambda +10.\end{aligned}}}

Yet one can verify that

${\displaystyle q(A)=A^{2}-5A+10I_{2}=12I_{2}\not =0.}$

One of the proofs for Cayley–Hamilton theorem above bears some similarity to the argument that ${\displaystyle p(A)=\det(AI_{n}-A)=0}$. By introducing a matrix with non-numeric coefficients, one can actually let A live inside a matrix entry, but then ${\displaystyle AI_{n}}$ is not equal to A, and the conclusion is reached differently.

## Proofs using methods of abstract algebra

Basic properties of Hasse–Schmidt derivations on the exterior algebra ${\displaystyle A=\bigwedge M}$ of some B-module M (supposed to be free and of finite rank) have been used by Gatto & Salehyan (2016, §4) to prove the Cayley–Hamilton theorem.

## Abstraction and generalizations

The above proofs show that the Cayley–Hamilton theorem holds for matrices with entries in any commutative ring R, and that p(φ) = 0 will hold whenever φ is an endomorphism of an R module generated by elements e1,...,en that satisfies

${\displaystyle \varphi (e_{j})=\sum a_{ij}e_{i},\qquad j=1,\ldots ,n.}$

This more general version of the theorem is the source of the celebrated Nakayama lemma in commutative algebra and algebraic geometry.

## Remarks

1. Due to the non-commutative nature of the multiplication operation for quaternions and related constructions, care needs to be taken with definitions, most notably in this context, for the determinant. The theorem holds as well for the slightly less well-behaved split-quaternions, see Alagös, Oral & Yüce (2012). The rings of quaternions and split-quaternions can both be represented by certain 2 × 2 complex matrices. (When restricted to unit norm, these are the groups SU(2) and SU(1, 1) respectively.) Therefore it is not surprising that the theorem holds.

There is no such matrix representation for the octonions, since the multiplication operation is not associative in this case. However, a modified Cayley–Hamilton theorem still holds for the octonions, see Tian (2000).
2. An explicit expression for these coefficients is
${\displaystyle c_{i}=\sum _{k_{1},k_{2},\ldots ,k_{n}}\prod _{l=1}^{n}{\frac {(-1)^{k_{l}+1}}{l^{k_{l}}k_{l}!}}\operatorname {tr} (A^{l})^{k_{l}},}$
where the sum is taken over the sets of all integer partitions kl ≥ 0 satisfying the equation
${\displaystyle \sum _{l=1}^{n}lk_{l}=n-i.}$
3. See, e.g., p. 54 of Brown 1994, which solves Jacobi's formula,
${\displaystyle \partial p(\lambda )/\partial \lambda =p(\lambda )\sum _{m=0}^{\infty }\lambda ^{-(m+1)}\operatorname {tr} A^{m}=p(\lambda )~\operatorname {tr} {\frac {I}{\lambda I-A}}\equiv \operatorname {tr} B~,}$
where B is the adjugate matrix of the next section. There also exists an equivalent, related recursive algorithm introduced by Urbain Le Verrier and Dmitry Konstantinovich Faddeev—the Faddeev–LeVerrier algorithm, which reads
{\displaystyle {\begin{aligned}M_{0}&\equiv O&c_{n}&=1\qquad &(k=0)\\[5pt]M_{k}&\equiv AM_{k-1}-{\frac {1}{k-1}}(\operatorname {tr} (AM_{k-1}))I\qquad \qquad &c_{n-k}&=-{\frac {1}{k}}\operatorname {tr} (AM_{k})\qquad &k=1,\ldots ,n~.\end{aligned}}}
(see, e.g., p 88 of Gantmacher 1960.) Observe A−1 = −Mn /c0 as the recursion terminates. See the algebraic proof in the following section, which relies on the modes of the adjugate, BkMnk .   Specifically, ${\displaystyle (\lambda I-A)B=Ip(\lambda )}$ and the above derivative of p when one traces it yields
${\displaystyle \lambda p'-np=\operatorname {tr} (AB)~,}$ (Hou 1998), and the above recursions, in turn.

## References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.