# Prove that $p_{AB}(\lambda) = p_{BA}(\lambda)$ [duplicate]

Characteristic polynomial of square matrix $$A \in \mathbb{R}^{n \times n}$$ is defined like this $$p_{A}(\lambda) = \det(\lambda I - A)$$. I have to prove the following:

$$p_{AB}(\lambda) = p_{BA}(\lambda)$$

I know that it's easy to prove if just one of $$A$$ or $$B$$ is non-singular by using $$AB = A^{-1}(AB)A$$ and $$p_{PAP^{-1}}(\lambda) = p_{A}$$.

But I struggle to prove it for the case of both matrices being singular. I am trying to compare coefficients of $$\lambda^i$$ from both sides. And I see that it's true for $$\lambda^n$$, $$\lambda^0$$ and $$\lambda^{n-1}$$ since the coefficients for them are $$1$$, $$(-1)^n \det(AB)$$ or $$(-1)^n \det(BA)$$ which is the same and $$-trAB$$ or $$-trBA$$ which is also the same.

But for any $$\lambda^i$$ the formula of coefficient is $$(-1)^{n-k} (\sum _{i_1 where $$R_{i_1,i_2,...,i_k}$$ is $$AB$$ or $$BA$$ with crossed $$i_1,...,i_k$$ rows and columns.

I'd like to add that I am just at the beginning of studying linear algebra so I'am not aware of fields, ranks or any concept past determinants.

• I see it from this perspective: If $\lambda\neq 0$ is an eigenvalue of $AB$, then $B$ maps the generalized eigenspace of $AB$ corresponding to $\lambda$ bijectively to that of $BA$. Hence, the sizes of the algebraic eigenspaces of $AB$ and $BA$ are the same for any eigenvalue $\lambda\neq 0$. As they all (including that for zero) should add up to $n$, that statement also holds for $\lambda = 0$. – amsmath Sep 1 '19 at 20:40
• Look here. There are much more in Related field in the link above. – A.Γ. Sep 1 '19 at 20:48
• @amsmath, I don't get the answer here either, not aware of the "density" concept – Назар Петровский Sep 1 '19 at 20:51
• @A.Γ. Thank you. The answers there contain really nice arguments. – amsmath Sep 1 '19 at 20:51
• @A.Γ., I see now thanks – Назар Петровский Sep 1 '19 at 20:56