TITLE: Do the non-zero eigenvalues of AB and BA have the same algebraic multiplicity (for AB and BA not square)?
QUESTION [11 upvotes]: 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?

REPLY [10 votes]: 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}.$$