The structure theorem for finitely generated modules over a principal ideal domain applies because every Euclidean domain is a principal ideal domain. It says that a finitely generated -module is isomorphic to
where the nonzero nonunits are unique up to multiplication by units. They are the invariant factors.
For , multiplication by is the linear map . Since is finite-dimensional over , is a finitely generated torsion module over the polynomial ring , so it has no free summand. Choosing each invariant factor to be monic gives
The basis of each cyclic summand makes multiplication by a companion matrix. Concatenating these bases therefore puts in rational canonical form.
On , a polynomial annihilates multiplication by exactly when it is divisible by . It follows that the minimal polynomial and characteristic polynomial are
The second identity follows blockwise from the characteristic polynomial of a companion matrix. Since every divides , the product annihilates every cyclic summand. Thus , which is the Cayley-Hamilton theorem.
For the displayed matrix, the given generators of are the columns of
Elementary row and column operations over give the Smith normal form
Consequently the nonunit invariant factors are
and, as a check,