Suppose $A,B$ are two $n\times n$ complex matrices such that $A,B$ both are singular matrix and also rank $AB$ = rank $BA$. Then is it true that $AB$ and $BA$ will have the same minimal polynomial?
I have tried to find counterexample. But I am not getting.