Do the non-zero eigenvalues of AB and BA have the same algebraic multiplicity (for AB and BA not square)? I know that if A and B are square nxn matrices, then AB and BA have the same characteristic polynomial and thus the same eigenvalues (and same algebraïc multiplicity). 
I'm wondering though if this can be generalized: if A is a nxm matrix and B a mxn matrix, then AB is a nxn matrix and BA a mxm matrix. 
So my question is: will the eigenvalues of AB and BA, that differ from zero, have the same algebraïc multiplicity? 
 A: Suppose $A$ has $d$ more rows than columns, and therefore that $B$ has $d$ more columns than rows. Add $d$ zero columns to $A$, and $d$ zero rows to $B$, to get square matrices $A',B'$. The product $A'B'$ is identical to $AB$, while $B'A'$ is obtained from $BA$ by adding $d$ zero rows and $d$ zero columns. Since $B'A'$ is block diagonal (actually block-triangular would have sufficed), the characterisitic polynomial of $B'A'$, which is equal to that of $A'B'$ by the result for square matrices, is $X^d$ times the characteristic polynomial of $BA$. Therefore what you guessed is indeed true: $$\chi_{BA}=X^d\chi_{AB}.$$
A: Here is another solution based on well known facts about calculating determinant of block matrices:

Suppose $A$ is an $n\times n$ matrix with the black decomposition
\begin{align}
A=\begin{pmatrix} A_{11} & A_{12}\\ A_{21} & A_{22} \end{pmatrix}
\end{align}
where $A_{ii}$ is a squared matrix of size $n_i\times n_i$, $i = 1,2$. 
If $\operatorname{det}(A_{11})\neq0$ then
\begin{align}
\operatorname{det}(A)=\operatorname{det}(A_{11})\cdot\operatorname{det}(A_{22}-A_{21}A^{-1}_{11}A_{12})\tag{0}\label{zero}
\end{align}
If $\operatorname{det}(A_{22})\neq0$ then
\begin{align}
\operatorname{det}(A)=\operatorname{det}(A_{22})\cdot\operatorname{det}(A_{11}-A_{12}A^{-1}_{22}A_{21})\tag{0'}\label{zerop}
\end{align}

Suppose $A$ and $B$ are matrices of size $k\times \ell$ and $\ell\times k$ respectively. Consider the matrix $L$ of size $n\times n$, where $n=k+\ell$, given by
\begin{align}
L:=\begin{pmatrix} I_k & A\\ B & I_\ell\end{pmatrix}
\end{align}
where $I_k$ and $I_\ell$ are the identity matrices of size $k$ and $\ell$ respectively. Then, by \eqref{zero} and \eqref{zerop}
$$\operatorname{det}(L)=\operatorname{det}(I_k - AB)=\operatorname{det}(I_\ell - BA)\tag{1}\label{one}$$
Let $p_{AB}$ and $p_{BA}$ denote the characteristic polynomials of squared matrices $AB$ and $BA$ respectively. Then,  by \eqref{one}, for any $t\neq0$
\begin{align}
p_{AB}(t)&=(-1)^k\operatorname{det}(tI_k - AB)=(-t)^k\operatorname{det}(I_k -\tfrac1tAB)\\
&=(-t)^k\operatorname{det}(I_\ell - \tfrac1t BA)=(-1)^k t^{k-\ell}\operatorname{det}(tI_\ell - BA)\\
&= (-t)^{k-\ell}p_{BA}(t)
\end{align}
From this identity, it follows that  or any $t_*\neq0$, $t_*$ is an eigenvalue of AB iff $t_*$ is an eigenvalue of $AB$, and moreover, the (algebraic) multiplicity of $t_*$ as an eigenvalue of $AB$ is the same as an eigenvalue of  $BA$.
