This post proves the Cayley-Hamilton for finite $R$-modules, and generalize it to Nakayama’s lemma.

It is written in the wikipedia page that Cayley-Hamilton actually holds in any commutative ring with unity $R$ as well. Here I will present a proof which should be the same as the one in wikipedia.

In the old proof, we considered the vector space $F^n$, and our argument used the concept of basis. We cannot copy our proof to the new case because the basis of modules does not behave that nicely. Anyway we can at least consider the matrix $A$ as a $R$-module homomorphism $\phi$ from $R^n$ to itself, i.e. we are trying to regard $R^n$ as a $R[\phi]$-module.

Second proof

By definition, we have that $\displaystyle \phi(e_i) = \sum_{k=1}^n a_{ki}e_k$, this means that

$\left(\begin{array}{cccc} \phi - a_{11} & -a_{12} & \cdots & -a_{1n} \\ -a_{21} & \phi - a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ -a_{n1} & -a_{n2} & \cdots & \phi - a_{nn} \end{array} \right) \left( \begin{array}{c} e_1 \\ e_2 \\ \vdots \\ e_n \end{array} \right) = \left( \begin{array}{c} 0 \\ 0 \\ \vdots \\ 0 \end{array} \right)$

Multiplying both sides by the classical adjoint of the square matrix on the left. This immediately implies that

$\left(\begin{array}{cccc} \mathrm{det}(\phi I - A) & 0 & \cdots & 0 \\ 0 & \mathrm{det}(\phi I - A) & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \mathrm{det}(\phi I - A) \end{array} \right) \left( \begin{array}{c} e_1 \\ e_2 \\ \vdots \\ e_n \end{array} \right) =\left( \begin{array}{c} 0 \\ 0 \\ \vdots \\ 0 \end{array} \right)$

i.e. $det(\phi I - A)$ is the zero endomorphism, which is precisely what we want.

Generalization

This proof can be easily adapted to the following theorem that can be found in Chapter 2 of Atiyah and MacDonald’s book.

Theorem 1 Let $R$ be a commutative ring with unity, $M$ be a finitely generated $R$ module, and $a \subset R$ be an ideal. Let $\phi : M \rightarrow M$ be a $R$-module homomorphism such that
$\phi ( M ) \subset aM$. Suppose that $M$ can be generated by $n$ elements. Then $\phi$ satisfies a monic polynomial of degree $n$ with coefficients, except the leading one, in $a$.

Applying the above theorem to the identity map, we get

Corollary 1 Let $R$ be a commutative ring with unity, $M$ be a finitely generated $R$ module, and $a \subset R$ be an ideal such that $aM = M$. Then there exists $x \in R$ such that $x \equiv 1 (\mathrm{mod}\, a)$ and $xM = 0$.

Recall that the Jacobson radical $\mathrm{Jac}\,R$ of a commutative ring $R$ is the intersection of all its maximal ideals. In particular, if $x \equiv 1 \left(\mathrm{mod} \, \mathrm{Jac}\,R \right)$ then $x$ must be a unit. We then obtain the following version of Nakayama’s lemma,

Corollary 2 (Nakayama’s lemma) Let $R$ be a commutative ring with unity, $M$ be a finitely generated $R$ module, and $a \subset R$ be an ideal contained in $\mathrm{Jac}\, R$ such that $aM = M$. Then $M = 0$.

Reference

Atiyah, M. F.; MacDonald, I. G. (1969), Introduction to Commutative Algebra