Show AB and BA have the same eigenvalues [duplicate]

If $A$ and $B$ are $n$ by $n$ matrices show that $AB$ and $BA$ have the same eigenvalues. I see why this is true if both are nonsingular. But does it still hold if they are not invertible?

Thanks!


Solution 1:

Fix $\lambda$. As you mentioned, if $B$ is invertible, it is easy to show that

$$\det(\lambda I-AB)=\det(\lambda I-BA) \,.$$

Now, look at the Polynomial

$$P(x)=\det[\lambda I-A(B-xI)]-\det[\lambda I-(B-xI)A] \,.$$

What is $P(x)$ when $B-xI$ is invertible? And don't forget to explain why $P$ is a polynomial.