While trying to prove the Cayley-Hamilton theorem, I came up with the following proof:

If $A$ is a diagonalizable matrix, so $A=SDS^{-1}$ with $D$ diagonal, then, letting $$P(\lambda)=\det(A-\lambda I)=\sum_{i=0}^n c_i\lambda^i,$$

$$``P(A)" = \sum_{i=0}^n c_i A^i = S\left(\sum_{i=0}^n c_i D^i \right)S^{-1},$$

which is clearly the zero matrix as, if $D$ contains $\lambda_1,\cdots,\lambda_n$ on its diagonal, $D^i$ contains $\lambda_1^i,\cdots,\lambda_n^i$, and each of the eigenvalues satisfy the characteristic polynomial. So, the Cayley-Hamilton theorem is true for diagonalizable matrices. Specifically, it is true for all matrices with $n$ distinct eigenvalues, or equivalently all matrices whose characteristic polynomials have no repeated roots.

However, the coefficients of the characteristic polynomial are polynomials in the elements $a_1,\cdots,a_{n^2}$ of the matrix $A$. Also, there is a polynomial expression of the coefficients of a polynomial that is $0$ iff the polynomial has a repeated root (the resultant). So, there exists some polynomial $Q$ such that either the matrix $A$ satisfies its characteristic polynomial or

$$Q(a_1,\cdots,a_{n^2}) = 0.$$

However, a matrix inputted into its characteristic polynomial is itself a matrix whose elements are polynomial functions $R_1,\cdots,R_{n^2}$ of the elements of the matrix. Thus, for each $1\leq i\leq n^2$ and any values $a_1,\cdots,a_{n^2}$, we have either that

$$Q(a_1,\cdots,a_{n^2}) = 0\ \mathrm{or}\ R_i(a_1,\cdots,a_{n^2}) = 0.$$

Thus, for all $(a_1,\cdots,a_{n^2}) \in \mathbb{R}^{n^2}$, and each $1\leq i\leq n^2$, we have

$$Q(a_1,\cdots,a_{n^2})\cdot R_i(a_1,\cdots,a_{n^2}) = 0.$$

However, a polynomial (here $QR_i$) that equals zero everywhere must be the zero polynomial, and if a product of two polynomials is the zero polynomial, one of the two must be the zero polynomial.

It's clearly not $Q$, since there exist matrices with distinct eigenvalues. So, each $R_i$ must be identically $0$, and the Cayley-Hamilton theorem is proven.

However, this only works in infinite fields. In finite fields, the two statements:

  1. If a polynomial is $0$ everywhere, it is the zero polynomial.

  2. If two polynomials multiply to make the zero polynomial, one of them must be the zero polynomial.

are not both true (I'm sure the first one isn't; I'm not sure about the second). Is there a way to rigorize the notion that "It's an algebraic statement that's true in, say, $\mathbb{R}$, so it must be true in any field," or is there some other way to extend this proof to finite fields? Or does this proof just only work (or make sense) in infinite fields?

  • 4
    $\begingroup$ Your proof already depends in some sense on assuming the field is algebraically closed, since that's why the discriminant being nonzero implies that the polynomial has the correct number of (distinct) roots in the field. Algebraically closed fields are infinite. However this still proves it for finite fields because you can extend scalars to the algebraic closure, where this proof works, and that naturally proves it for the finite field. $\endgroup$
    – jgon
    Commented Dec 29, 2017 at 18:26
  • 1
    $\begingroup$ Also the second statement is still true. If $R$ is a domain, $R[x]$ is a domain. $\endgroup$
    – jgon
    Commented Dec 29, 2017 at 18:30
  • 2
    $\begingroup$ I think your second statement is true in finite fields as well, because polynomials with coefficients in a field form an integral domain, meaning there are no zero divisors. $\endgroup$
    – Ducky
    Commented Dec 29, 2017 at 18:37
  • $\begingroup$ @jgon Thanks! This might be a naive question, but is statement 1 true in all algebraically closed fields? $\endgroup$ Commented Dec 29, 2017 at 18:37
  • 1
    $\begingroup$ Yes. It's true as you said in any infinite field, and all algebraically closed fields are infinite. $\endgroup$
    – jgon
    Commented Dec 29, 2017 at 18:39

1 Answer 1


You can apply the following powerful idea: think of Cayley-Hamilton as a statement about the "universal matrix," the one whose entries are indeterminates $x_{ij}$ living in a polynomial ring $\mathbb{Z}[x_{ij}]$. The statement is that $P(X) = 0$ where $P$ is a polynomial whose coefficients are polynomials in the $x_{ij}$, so this statement itself is, for $n \times n$ matrices, a collection of $n^2$ polynomial identities in $n^2$ variables over $\mathbb{Z}$, or equivalently a collection of $n^2$ polynomials that you would like to vanish. Now:

Claim: Let $f(y_1, \dots y_k)$ be a polynomial in any number of variables over $\mathbb{Z}$. The following are equivalent:

  1. $f$ is identically zero (in the sense that all of its coefficients are zero).
  2. $f(y_1, \dots y_k) = 0$ for $y_i$ every element of every commutative ring.
  3. $f(y_1, \dots y_k) = 0$ for $y_i$ every element of a fixed infinite field $K$ of characteristic zero.

Proof. The implications $1 \Rightarrow 2 \Rightarrow 3$ are immediate from the definitions, so it remains to prove $3 \Rightarrow 1$. This can be done by induction on $k$: for $k = 1$ this reduces to the observation that a nonzero polynomial has finitely many roots, and the inductive step proceeds by fixing some of the variables and varying the others. We can also appeal to the combinatorial Nullstellensatz. $\Box$

Now we can prove Cayley-Hamilton over every commutative ring by proving it over any infinite field of characteristic zero (note that we crucially needed to use the fact that the polynomials involved have integer coefficients to get this freedom). In particular we can work over an algebraically closed field, where the proof can be organized as follows:

  1. As you already observed, Cayley-Hamilton is easy to prove for diagonalizable matrices.
  2. Now your second observation, in geometric terms, says that the diagonalizable matrices are Zariski dense in all matrices, meaning any polynomial vanishing on the diagonalizable matrices must vanish identically. This is a consequence of the fact that matrices with distinct eigenvalues are Zariski open, because their complement is matrices such that the discriminant of the characteristic polynomial (which is a polynomial) vanishes, and in any irreducible variety (meaning the ring of polynomial functions is an integral domain - you use this property crucially) Zariski opens are Zariski dense (this is essentially what you prove).

Lots of other results about matrices can be proven this way. For example:

Exercise: Let $A, B$ be $n \times n$ matrices. Then $AB$ and $BA$ have the same characteristic polynomial.

(I tried to spoiler tag this but the syntax I found didn't work. Anyone know what's going on with that?)

Proof. The statement that $\det(tI - AB) = \det(tI - BA)$ is a collection of $n$ polynomial identities in $2n^2$ variables $a_{ij}, b_{ij}$ (the coefficients of the "universal pair of matrices"), or equivalently a single polynomial identity in $2n^2 + 1$ variables, so as above to prove this statement over every commutative ring it suffices to prove it over a fixed infinite field. The statement is clearly true if, say, $A$ is invertible, since then $AB$ and $BA$ are conjugate, and now we use the fact that invertible matrices are Zariski open (defined by the nonvanishing of the determinant), hence Zariski dense, in all matrices. (It's also possible to avoid use of the Zariski topology by working over $\mathbb{R}$ or $\mathbb{C}$ with the Euclidean topology and showing that invertible matrices are dense in the usual sense here.)

Here is a cleaner algebraic reformulation of the proof, working just over the universal ring $\mathbb{Z}[a_{ij}, b_{ij}]$. Observe that

$$\det(A) \det(tI - BA) = \det(tA - ABA) = \det(tI - AB) \det(A)$$

and now use the fact that $\mathbb{Z}[a_{ij}, b_{ij}]$ is an integral domain (so, geometrically, its spectrum is an irreducible affine scheme), so we can cancel $\det(A)$ from both sides, despite the fact that it is not true that the the determinant of a matrix always vanishes. $\Box$

  • $\begingroup$ Thanks for the answer! I'll look into Zariski topologies more; they seem really interesting. $\endgroup$ Commented Dec 29, 2017 at 22:10
  • 1
    $\begingroup$ In (3), should you require that $K$ has characteristic zero, to exclude the case where all the coefficients of $f$ are divisible by $p$ and $K$ has characteristic $p$? $\endgroup$ Commented Dec 30, 2017 at 1:13
  • $\begingroup$ @Daniel: oops, yes, you're right. $\endgroup$ Commented Dec 30, 2017 at 2:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .