# 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!

• See this answer to see why they have the same characteristic polynomial. Algebraically. – Julien May 1 '13 at 15:17
• @julien Copy and paste it? – Git Gud May 1 '13 at 15:18
• @GitGud I've already copied/pasted this on the exact same question. I'm looking for the duplicate... – Julien May 1 '13 at 15:23
• Note that the answer on the marked duplicate needs some details. What is written works to show that $AB$ and $BA$ have the same nonzero eigenvalues (as $Bv\neq 0$ necessarily in this case). So you need to treat $0$ separately. But then clearly $AB$ is invertible iff $BA$ is invertible. By det, e.g. – Julien May 1 '13 at 15:39

## 1 Answer

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.