prove that A is similar to B $A,B$ are $9 \times 9$ matrix , $A,B$ nilpotent matrix
1) The nilpotent index of $A$ and $B$ is the same
2) $\mathrm{rank}(A)=\mathrm{rank}(B)$
3) $\mathrm{rank}(A^2)=\mathrm{rank}(B^2)$
I need to prove that $A$ is similar to $B$
well I know that if $\mathrm{rank}(A)=\mathrm{rank}(B)$ then $A$ and $B$ are congruent.
I also know that if $A,B$ are nilpotent with index $9$ then their characteristic polynomial is the same and equal to $x^9$.  
I don't see how the fact that $\mathrm{rank}(A^2)=\mathrm{rank}(B^2)$ helps me
Thanks in advance
 A: Here are some thoughts toward a solution. Your basic nilpotent matrix sends an $n$  dimensional space onto an $n-1$ dimensional subspace, which in turn is sent to an $n-2$ dimensional space etc. In general a nilpotent transform will be a sum of such spaces of different dimensions. Lets just call one of these spaces a block. Now we know the sum of the dimensions of the blocks, it is $9$. After an application of $A$ the dimension goes down by the number of blocks, so $9-\text{rank}(A)$ is the number of blocks. 
Note that here the one dimensional blocks dissappear. After a second application of $A$ the dimension goes down by the number of remaining blocks so that the number of one dimensional blocks is $(9- \text{rank}(A))-(\text{rank}(A)-\text{rank}(A^2))$.
We also know that the index, I am guessing this is least $n$ such that $A^n=0$ this is the size of the largest block.
Thus we know: $A$ and $B$ have the same number of blocks and the size of the largest are equal, the sum of the sizes is $9$ and they both have the same number of one dimensional blocks. 
Now how to finish ? A case analysis is possible due to the small size, $9$, and surely the statement is false in larger dimensions, so maybe this is what is intended, unless someone has a better idea.
