Similarity of products $AB$ and $BA$ of square matrices Given:$ A_{n\times n} , B_{n\times n} .$
Is it necessary true that there is similarity between $AB$ and $BA$?
I'm not quite sure how to check it is true for every non-singular M matrix. $M^{-1}ABM = BA$
Anyone have any ideas what am I missing to understand in similarity? If it's not necessary true then give a counter example.
 A: While @Surb has given a counter-example, we do have the following result when $A$ or $B$ are singular (or even not square matrices):
Suppose that $AB$ and $BA$ are both square matrices and $\lambda$ is a non-zero eigenvalue of $AB$.  Then $\lambda$ is an eigenvalue of $BA$.
Proof: Suppose $ABv=\lambda v$.  Then $BA(Bv)=B(ABv)=B(\lambda v)=\lambda(Bv)$.  Since $ABv\neq 0$, we have $Bv\neq 0$, and so $Bv$ is an $Bv$ is an eigenvector of $BA$.
In fact, more can be said: up to a factor of $t^k$ (which is necessary to correct degree issues when $A$ and $B$ are not square), $AB$ and $BA$ will have the same characteristic polynomials.  And, since $B(AB-\lambda)^k=(BA-\lambda)^kB$, we have a matchup not just of eigenvalues, but of approximate eigenvalues as well, and so the only obstruction to $AB$ and $BA$ being similar lies in their generalized zero-eigenspaces.
So again, while @Surb has showed that the matrices need not be similar, the problems that can occur are of a very limited nature.
A: Let $A = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}, B = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}$, then $AB = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}$ and $BA = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}$.
It is clear that $MBAM^{-1} = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix} \neq AB$ for every invertible matrix $M$.
