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<i_2...<i_k} \det R_{i_1,i_2,...,i_k})$ 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.