# 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 numbers or the integers) satisfies its own characteristic equation.

The characteristic polynomial of an *n* × *n* matrix A is defined as , where det is the determinant operation, λ is a variable scalar element of the base ring, and *I _{n}* is the

*n*×

*n*identity matrix. Since each entry of the matrix is either constant or linear in λ, the determinant of is a degree-n monic polynomial in λ, so it can be written as

One use for the Cayley–Hamilton theorem is that it allows A^{n} to be expressed as a linear combination of the lower matrix powers of A:

A special case of the theorem was first proved by Hamilton in 1853 in terms of inverses of linear functions of quaternions. This corresponds to the special case of certain 4 × 4 real or 2 × 2 complex matrices. Cayley in 1858 stated the result for 3 × 3 and smaller matrices, but only published a proof for the 2 × 2 case. As for *n* × *n* matrices, Cayley stated “..., I have not thought it necessary to undertake the labor of a formal proof of the theorem in the general case of a matrix of any degree”. The general case was first proved by Ferdinand Frobenius in 1878.

## Examples

### 1 × 1 matrices

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

### 2 × 2 matrices

As a concrete example, let

The Cayley–Hamilton theorem claims that, if we *define*

For a generic 2 × 2 matrix,

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

*A*

^{2}.

**Proof**

## 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

The coefficients *c*_{i} 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:

*A*

^{k}) is the trace of the matrix A

^{k}. Thus, we can express

*c*

_{i}in terms of the trace of powers of A.

In general, the formula for the coefficients *c*_{i} is given in terms of complete exponential Bell polynomials as

In particular, the determinant of *A* equals (−1)^{n}*c*_{0}. Thus, the determinant can be written as the trace identity:

Likewise, the characteristic polynomial can be written as

*A*

^{−1}(note −(−1)

^{n}= (−1)

^{n−1}), one is led to an expression for the inverse of A as a trace identity,

Another method for obtaining these coefficients *c*_{k} for a general *n* × *n* matrix, provided no root be zero, relies on the following alternative expression for the determinant,

*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.) Differentiation of this expression with respect to λ allows one to express the coefficients of the characteristic polynomial for general n as determinants of

*m*×

*m*matrices,

- Examples

For instance, the first few Bell polynomials are *B*_{0} = 1, *B*_{1}(*x*_{1}) = *x*_{1}, *B*_{2}(*x*_{1}, *x*_{2}) = *x*^{2}_{1} + *x*_{2}, and *B*_{3}(*x*_{1}, *x*_{2}, *x*_{3}) = *x*^{3}_{1} + 3 *x*_{1}*x*_{2} + *x*_{3}.

Using these to specify the coefficients *c _{i}* of the characteristic polynomial of a 2 × 2 matrix yields

The coefficient *c*_{0} gives the determinant of the 2 × 2 matrix, *c*_{1} minus its trace, while its inverse is given by

It is apparent from the general formula for *c*_{n−k}, expressed in terms of Bell polynomials, that the expressions

always give the coefficients *c*_{n−1} of *λ*^{n−1} and *c*_{n−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

*n*= 3 case, is now

*c*

_{n−3}of

*λ*

^{n−3}in the general case, as seen below.

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

where, now, the determinant is *c*_{n−4},

and so on for larger matrices. The increasingly complex expressions for the coefficients *c*_{k} is deducible from Newton's identities or the Faddeev–LeVerrier algorithm.

*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 A^{n} or any higher powers of A.

As an example, for the theorem gives

Then, to calculate *A*^{4}, observe

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

*p*(

*x*) of degree

*n*of an

*n*×

*n*matrix A, the function can be expressed using long division as

*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

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

Let the remainder polynomial be

*p*(

*λ*) = 0, evaluating the function

*f*(

*x*) at the

*n*eigenvalues of

*A*yields

*n*linear equations, which can be solved to determine the coefficients

*c*. Thus, one has

_{i}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 derivatives of

*p*(

*x*) vanish at the eigenvalue. This leads to the extra

*m*– 1 linearly independent solutions

*n*equations to solve for

*c*.

_{i}Finding a polynomial that passes through the points (*λ _{i}*,

*f*(

*λ*)) is essentially an interpolation problem, and can be solved using Lagrange or Newton interpolation techniques, leading to Sylvester's formula.

_{i}For example, suppose the task is to find the polynomial representation of

The characteristic polynomial is *p*(*x*) = (*x* − 1)(*x* − 3) = *x*^{2} − 4*x* + 3, and the eigenvalues are *λ* = 1, 3. Let *r*(*x*) = *c*_{0} + *c*_{1}*x*. Evaluating *f*(*λ*) = *r*(*λ*) at the eigenvalues, one obtains two linear equations, *e*^{t} = *c*_{0} + *c*_{1} and *e*^{3t} = *c*_{0} + 3*c*_{1}.

Solving the equations yields *c*_{0} = (3*e*^{t} − *e*^{3t})/2 and *c*_{1} = (*e*^{3t} − *e*^{t})/2. Thus, it follows that

If, instead, the function were *f*(*A*) = sin *At*, then the coefficients would have been *c*_{0} = (3 sin *t* − sin 3*t*)/2 and *c*_{1} = (sin 3*t* − sin *t*)/2; hence

As a further example, when considering

*p*(

*x*) =

*x*

^{2}+ 1, and the eigenvalues are

*λ*= ±

*i*.

As before, evaluating the function at the eigenvalues gives us the linear equations *e ^{it} = c_{0} + i c_{1}* and

*e*

^{−it}=

*c*

_{0}−

*ic*

_{1}; the solution of which gives,

*c*

_{0}= (

*e*

^{it}+

*e*

^{−it})/2 = cos

*t*and

*c*

_{1}= (

*e*

^{it}−

*e*

^{−it})/2

*i*= sin

*t*. Thus, for this case,

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,

More recently, expressions have appeared for other groups, like the Lorentz group SO(3, 1), O(4, 2) and SU(2, 2), as well as GL(*n*, **R**). 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 been obtained for *all* irreducible representations, i.e. of any spin.

### 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 of and an algebraic integer which is a non-zero linear combination of the we can compute the minimal polynomial of by finding a matrix representing the -linear transformation

## Proofs

The Cayley–Hamilton theorem is an immediate consequence of the existence of the Jordan normal form for matrices over algebraically closed fields, see Jordan normal form § Cayley–Hamilton theorem. 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

*c*

_{i}of the characteristic polynomial are determined by development as a polynomial in

*t*of the determinant

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

The left-hand side can be worked out to an *n* × *n* matrix whose entries are (enormous) polynomial expressions in the set of entries *a*_{i,j} of *A*, so the Cayley–Hamilton theorem states that each of these *n*^{2} expressions equals 0. For any fixed value of *n*, these identities can be obtained by tedious but straightforward algebraic manipulations. None of these computations, however, can show 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* is an eigenvector of *A* with eigenvalue *λ*, in other words if *A*⋅*v* = *λv*, then

*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.

Consider now the function which maps *n* × *n* matrices to *n* × *n* matrices given by the formula , i.e. which takes a matrix 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 diagonalizable complex square matrices of a given size is dense in the set of all such square matrices (for a matrix to be diagonalizable it suffices for instance that its characteristic polynomial not have any multiple roots). Now viewed as a function (since matrices have 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

and since the set is dense, by continuity this function must map the entire set of *n* × *n* matrices to the zero matrix. Therefore, the Cayley–Hamilton theorem is true for complex numbers, and must therefore also hold for - or -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,

*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 I*_{n} − *A* whose determinant is the characteristic polynomial of A is such a matrix, and since polynomials form a commutative ring, it has an adjugate

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

*B*are defined makes clear that no powers higher than

*t*

^{n−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:

Writing

*t*as coefficients.

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

Finally, multiply the equation of the coefficients of *t*^{ i} from the left by *A*^{i}, and sum up:

The left-hand sides form a telescoping sum and cancel completely; the right-hand sides add up to :

### 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.

Let be the ring of *n* × *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 or its adjugate *B* in the first proof, are elements of .

By collecting like powers of t, such matrices can be written as "polynomials" in t with constant matrices as coefficients; write for the set of such polynomials. Since this set is in bijection with , one defines arithmetic operations on it correspondingly, in particular multiplication is given by

Thus, the identity

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 zero 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" ev_{A} : **M**[*t* ] → **M**, which replaces each *t*^{ i} by the matrix power *A*^{i} 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 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: , A, and the coefficients 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 , and A, but one has to show that it contains the matrices . To do this, one combines the two fundamental relations for adjugates, writing out the adjugate *B* as a polynomial:

Equating the coefficients shows that for each *i*, we have *AB*_{i} = *B*_{i }*A* as desired. Having found the proper setting in which ev_{A} is indeed a homomorphism of rings, one can complete the proof as suggested above:

### A synthesis of the first two proofs

In the first proof, one was able to determine the coefficients *B*_{i} 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*)*I _{n}* on the left by the monic polynomial

*I*−

_{n}t*A*, 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 as 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*)*I _{n}* and divisor

*I*−

_{n}t*A*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

in other words, to apply the evaluation map

which is a ring homomorphism, giving

just like in the second proof, as desired.

In addition to proving the theorem, the above argument tells us that the coefficients *B _{i}* 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

*B*

_{0}= 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 as polynomials in *A*, which leads to the identity

valid for all *n* × *n* matrices, where

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

### 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 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 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 is realised as , 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 , 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 ; similarly 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 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 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 *e*_{1}, ..., *e*_{n} means that

*n*components of one equation in

*V*

^{n}, whose members can be written using the matrix-vector product

*M*(

*n*, End(

*V*)) ×

*V*

^{n}→

*V*

^{n}that is defined as usual, but with individual entries

*ψ*∈ End(

*V*) and

*v*in

*V*being "multiplied" by forming ; this gives:

*i*is

*e*

_{i}(in other words it is the basis

*e*

_{1}, ...,

*e*

_{n}of

*V*written as a column of vectors). Writing this equation as

*M*(

*n*,

*R*[

*φ*])) is also

*p*(

*φ*). To derive from this equation that

*p*(

*φ*) = 0 ∈ End(

*V*), one left-multiplies by the adjugate matrix of , which is defined in the matrix ring

*M*(

*n*,

*R*[

*φ*]), giving

*i*of this equation says that

*p*(

*φ*)(

*e*) = 0 ∈

_{i}*V*; thus

*p*(

*φ*) vanishes on all

*e*

_{i}, 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

*some*sequence of elements

*e*

_{1}, ...,

*e*

_{n}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(*AI*_{n} − *A*) = det(*A* − *A*) = 0

One persistent elementary but *incorrect* argument for the theorem is to "simply" take the definition

There are many ways to see why this argument is wrong. First, in the 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 , the variable λ actually occurs at the diagonal entries of the matrix . To illustrate, consider the characteristic polynomial in the previous example again:

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

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

then the determinant is indeed zero, but the expanded matrix in question does not evaluate to ; nor can its determinant (a scalar) be compared to *p*(*A*) (a matrix). So the argument that 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 , 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

So, for the matrix A in the previous example,

Yet one can verify that

One of the proofs for Cayley–Hamilton theorem above bears some similarity to the argument that . By introducing a matrix with non-numeric coefficients, one can actually let A live inside a matrix entry, but then 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 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. See also Gatto & Scherbak (2015).

## 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 *e*_{1},...,*e*_{n} that satisfies

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

The Cayley-Hamilton theorem also holds for matrices over the quaternions, a noncommutative ring.

## See also

## Remarks

**^**See Sect. 2 of Krivoruchenko (2016). An explicit expression for the coefficients*c*_{i}is provided by Kondratyuk & Krivoruchenko (1992):where the sum is taken over the sets of all integer partitions*k*_{l}≥ 0 satisfying the equation**^**See, e.g., p. 54 of Brown 1994, which solves Jacobi's formula,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(see, e.g., Gantmacher 1960, p. 88.) Observe*A*^{−1}= −*M*_{n}/*c*_{0}as the recursion terminates. See the algebraic proof in the following section, which relies on the modes of the adjugate,*B*_{k}≡*M*_{n−k}. Specifically, and the above derivative of p when one traces it yields(Hou 1998), and the above recursions, in turn.**^**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).

## Notes

- ^
^{a}^{b}Crilly 1998 - ^
^{a}^{b}Hamilton 1864a - ^
^{a}^{b}Hamilton 1864b - ^
^{a}^{b}Hamilton 1862 **^**Atiyah & MacDonald 1969**^**Hamilton 1853, p. 562**^**Cayley 1858, pp. 17–37**^**Cayley 1889, pp. 475–496- ^
^{a}^{b}Frobenius 1878 **^**Zeni & Rodrigues 1992**^**Barut, Zeni & Laufer 1994a**^**Barut, Zeni & Laufer 1994b**^**Laufer 1997**^**Curtright, Fairlie & Zachos 2014**^**Stein, William.*Algebraic Number Theory, a Computational Approach*(PDF). p. 29.**^**Bhatia 1997, p. 7**^**Garrett 2007, p. 381**^**Zhang 1997