# Proof/Counterexample: Any two 6x6 matrices are similar of they have the same rank and same minimal polynomial

I am asked to prove or provide a counterexample for this claim:

Any two $$6\times6$$ matrices are similar of they have the same rank and same minimal polynomial.

I know two matrices are similar if they have the same Jordan form. I have a hunch that they are similar always in this case and no counterexample would exist but I don't know how to prove it.

Are $$A=\begin{pmatrix}1&1&0&0&0&0\\ 0&1&0&0&0&0\\ 0&0&1&0&0&0\\ 0&0&0&1&0&0\\ 0&0&0&0&1&0\\ 0&0&0&0&0&1 \end{pmatrix}$$ and $$B=\begin{pmatrix}1&1&0&0&0&0\\ 0&1&0&0&0&0\\ 0&0&1&1&0&0\\ 0&0&0&1&0&0\\ 0&0&0&0&1&0\\ 0&0&0&0&0&1 \end{pmatrix}$$ similar? Both have rank $$6$$ and minimal polynomial $$X^2-2X+1$$. (This works already with $$4\times 4$$ matrices)