## Find the possible Jordan canonical forms of a matrix having a given characteristic polynomial

Find all possible Jordan canonical forms of matrices having characteristic polynomial $p(x) = (x-2)^3(x-3)^2$.

The characteristic polynomial of a matrix $A$ is the product of its elementary divisors. Distinct lists of elementary divisors correspond precisely to a choice, for each linear factor $x-\alpha$ of $p(x)$, of a partition of the exponent of $x-\alpha$ in the factorization of $p(x)$. The partitions of 3 are $3$, $2+1$, and $1+1+1$, and the partitions of 2 are $2$ and $1+1$. The possible lists of elementary divisors for $A$ are thus as follows.

1. $(x-2)^3$, $(x-3)^2$
2. $(x-2)^2$, $x-2$, $(x-3)^2$
3. $x-2$, $x-2$, $x-2$, $(x-3)^2$
4. $(x-2)^3$, $x-3$, $x-3$
5. $(x-2)^2$, $x-2$, $x-3$, $x-3$
6. $x-2$, $x-2$, $x-2$, $x-3$, $x-3$

The possible Jordan canonical forms are thus as follows.

1. $\begin{bmatrix} 2 & 1 & 0 & 0 & 0 \\ 0 & 2 & 1 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 3 & 1 \\ 0 & 0 & 0 & 0 & 3 \end{bmatrix}$
2. $\begin{bmatrix} 2 & 1 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 3 & 1 \\ 0 & 0 & 0 & 0 & 3 \end{bmatrix}$
3. $\begin{bmatrix} 2 & 0 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 3 & 1 \\ 0 & 0 & 0 & 0 & 3 \end{bmatrix}$
4. $\begin{bmatrix} 2 & 1 & 0 & 0 & 0 \\ 0 & 2 & 1 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 3 & 0 \\ 0 & 0 & 0 & 0 & 3 \end{bmatrix}$
5. $\begin{bmatrix} 2 & 1 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 3 & 0 \\ 0 & 0 & 0 & 0 & 3 \end{bmatrix}$
6. $\begin{bmatrix} 2 & 0 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 3 & 0 \\ 0 & 0 & 0 & 0 & 3 \end{bmatrix}$