I want to prove that
$$\det \left( x I_m - A B \right) = x^{m-n} \det \left( x I_n - B A \right)$$
where $A \in \mathbb{F}^{m \times n}$ and $B \in \mathbb{F}^{n\times m}$.
It is easy to show that $0$ has algebraic multiplicity of at least $m-n$ for $AB$, but how can I show that the other eigenvalues of $AB$ are actually eigenvalues of $BA$ ? I know that the sum of eigenvalues of $AB$ and $BA$ are the same, because $\operatorname{trace}(AB)=\operatorname{trace}(BA)$, but ...
I appreciate any help, thanks ! ${{{}}}$
Let $r=\operatorname{rank}(A)$
From a well-known theorem, derive that there exists $P,Q$ invertible $m\times m$ and $n \times n$ matrices such that $$A=P\begin{bmatrix}I_r& 0\\ 0 &0\end{bmatrix}Q $$
where $I_r$ denotes the $r\times r$ identity matrix.
By changes of basis, $$B=Q^{-1}\begin{bmatrix}E& F\\ G &H\end{bmatrix}P^{-1}$$
For some submatrices $E,F,G,H$.
Note that $AB=P\begin{bmatrix}E& F\\ 0&0\end{bmatrix}P^{-1}$ and $BA=Q^{-1}\begin{bmatrix}E& 0\\ G&0\end{bmatrix}Q$.
Hence $\chi_{AB}=\det(E-XI_r)(-X)^{m-r}$ and $\chi_{BA}=\det(E-XI_r)(-X)^{n-r}$
Hence $\chi_{BA}=(-X)^{n-m}\chi_{AB}$.