Nilpotent matrices with same minimal polynomial and nullity

Solution 1:

Since the matrices are nilpotent, all eigenvalues are zero, so we only need to consider the size of the Jordan blocks. The possible sizes correspond to partitions of $n=6$. Since the matrices have the same minimal polynomials, they must have the same largest Jordan block. Can you see what the nullity assumption requires of their Jordan decompositions? Together, these requirements should be enough to show that their Jordan blocks are the same, so they are similar.

With the extra bit of freedom offered by matrices of size $7$, there are counterexamples. If you understand how to prove the case for matrices of size $6$, a counterexample should come fairly easily.