## Construct representatives of the similarity classes of matrices having a given dimension and characteristic polynomial

Construct (representatives of) the similarity classes of $6 \times 6$ matrices over $\mathbb{C}$ having characteristic polynomial $c(x) = (x^4-1)(x^2-1)$.

First, note that $c(x)$ factors over $\mathbb{C}$ as $c(x) = (x+1)^2(x-1)^2(x+i)(x-i)$.

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 $\mathbb{C}[x]$ is a UFD, each factor of the characteristic polynomial appears in the factorization of the minimal polynomial).

If $A$ is a matrix having characteristic polynomial $c(x)$, then the minimal polynomial of $A$ is one of the following.

1. $(x+i)(x-i)(x+1)(x-1)$
2. $(x+i)(x-i)(x+1)^2(x-1)$
3. $(x+i)(x-i)(x+1)(x-1)^2$
4. $(x+i)(x-i)(x+1)^2(x-1)^2$

In each case, the remaining invariant factors are determined. The possible lists of invariant factors are thus as follows.

1. $(x+1)(x-1)$, $(x+i)(x-i)(x+1)(x-1)$
2. $x-1$, $(x+i)(x-i)(x+1)^2(x-1)$
3. $x+1$, $(x+i)(x-i)(x+1)(x-1)^2$
4. $(x+i)(x-i)(x+1)^2(x-1)^2$

The corresponding matrices are thus as follows.

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

Every $6 \times 6$ matrix over $\mathbb{C}$ with characteristic polynomial $c(x)$ is similar to exactly one matrix in this list.