TITLE: If $A,B$ have eigenvalues $\pm1$, what can I say about the eigenvalues of $AB,BA$?
QUESTION [38 upvotes]: If $n\times n$ matrix $A$ has eigenvalues $1,-1$ and $n\times n$ matrix $B$ also has eigenvalues $1,-1$, can I then say something about eigenvalues of $AB$ and $BA$?

REPLY [51 votes]: If you are talking about the relationship between the eigenvalues of $AB$ and $BA$, there is a nice and well-known result, first discovered by J. J. Sylvester: $AB$ and $BA$ have identical spectra. (More generally, for any possibly rectangular matrices $A$ and $B$ with appropriate sizes, $AB$ and $BA$ share the same multi-set of nonzero eigenvalues.)
However, if you are talking about the relationship between the eigenvalues of $A,B$ and $AB$, there is only one thing that one can say:

the product of the eigenvalues of $AB$ is equal to the product of all eigenvalues in $A$ and $B$; this is because $\det(AB)=\det(A)\det(B)$.

Nothing further can be said without additional information. To illustrate, suppose $n=2$ and the spectra of both $A$ and $B$ are $\{1,-1\}$. The determinantal constraint in the bullet point above dictates that the spectrum of $AB$ must be $\{\lambda,\frac1{\lambda}\}$ for some nonzero $\lambda$. Now, is $\{\lambda,\frac1{\lambda}\}$ really a possible spectrum of $AB$ for every $\lambda\ne0$? The answer is yes. Let $2t=\lambda+\frac1{\lambda}$ and
$$
A=\pmatrix{1&0\\ 0&-1},\ B=\pmatrix{t&1\\ 1-t^2&-t},
\ AB=\pmatrix{t&1\\ t^2-1&t}.
$$
You may verify that $\operatorname{trace}(B)=0,\,\det(B)=-1,\,\operatorname{trace}(AB)=2t,\,\det(AB)=1$ and hence the characteristic polynomials of $B$ and $AB$ are respectively $x^2-1$ and $x^2-2tx+1=(x-\lambda)(x-\frac1{\lambda})$. Hence the spectrum of $B$ is indeed $\{1,-1\}$ and the spectrum of $AB$ is $\{\lambda,\frac1{\lambda}\}$. In other words, apart from the determinantal constraint mentioned in the bullet point above, the eigenvalues of $AB$ can be pretty much anything.