<s>[INST] Classify, up to similarity, real matrices of dimension $6\times6$ with minimal polynomial $(t-1)^2(t+1)(t-2)$ Classify, up to similarity, real matrices of dimension $6\times6$ with minimal polynomial $(t-1)^2(t+1)(t-2)$
My attempt:
If the minimal polynomial is $(t-1)^2(t+1)(t-2)$ then we only have the following invariant factors:
$(t-1)^2(t+1)(t-2)=t^4-3t^3+t^2+3t-2, (t-1)^2=t^2-2t+1$
So, every matrix of dimension $6\times6$  with minimal polynomial $(t-1)^2(t+1)(t-2)$ is similar to
$$A=\begin{bmatrix}
0 & 0 & 0 & 2 & 0 & 0 \\
1 & 0 & 0 & -3 & 0 & 0 \\
0 & 1 & 0 & -1 & 0 & 0 \\
0 & 0 & 1 & 3 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & -1 \\
0 & 0 & 0 & 0 & 1 & 2 \\
\end{bmatrix}$$.
Is this reasoning correct?
Thanks in advance.
 [/INST] It will be simpler to consider $3 \times 3$ block matrices.
In the spirit of the answer of Masacroso here, here is "prototypical case" helping (so I think) to understand what is going on is as follows:
$$M=\begin{bmatrix}
B & 0 & 0\\
0 & B & 0 \\
0 & 0 & D 
\end{bmatrix} \ \text{where} \ B:=\begin{bmatrix}
\color{red}{1} & 1\\
0 & \color{red}{1}
\end{bmatrix}, \ D:=\begin{bmatrix}
\color{red}{-1} & 0\\
0 & \color{red}{2}
\end{bmatrix}$$
(eigenvalues have been written in red in order to spot their placement ; please note in particular the typical Jordan block $B$).
Let us now consider decomposition :
$$M=\underbrace{\begin{bmatrix}
B & 0 & 0\\
0 & B & 0 \\
0 & 0 & 0 
\end{bmatrix}}_P+\underbrace{\begin{bmatrix}
0 & 0 & 0\\
0 & 0 & 0 \\
0 & 0 & D 
\end{bmatrix}}_Q$$
We have, separately, $(P-I_6)^2=0$ (but not  $(P-I_6)^1=0$) and $(Q+I_6)*(Q-2*I_6)=0$.
Therefore:
$$(M-I_6)^2*(M+I_6)*(M-2*I_6)=0$$
giving the expression of the minimal polynomial.
</s>