Construct (representatives of) the similarity classes of matrices over having characteristic polynomial .
First, note that factors over as .
Recall that the characteristic polynomial of a matrix is the product of its invariant factors, that the minimal polynomial is the divisibility-largest invariant factor, and that the characteristic polynomial divides a power of the minimal polynomial (that is, since is a UFD, each factor of the characteristic polynomial appears in the factorization of the minimal polynomial).
If is a matrix having characteristic polynomial , then the minimal polynomial of is one of the following.
In each case, the remaining invariant factors are determined. The possible lists of invariant factors are thus as follows.
The corresponding matrices are thus as follows.
Every matrix over with characteristic polynomial is similar to exactly one matrix in this list.