TITLE: Purely complex eigenvalue of matrix product
QUESTION [7 upvotes]: Here is a question which arises from physics.
Let $A$, $B$ be two symmetric real-valued matrices. What conditions should the matrices meet to make $AB$ has a pure complex eigenvalue ($Im(\lambda) \neq 0$)?
Although I'm interested in complex eigenvalues it might be useful to see when $AB$ has real spectrum.
For instance, if $A$ is a positive form, then the spectrum of $AB$ is real-valued. Or if $[A,B] = 0$ then again spectrum of product is real. So there is no way to find a purely complex eigenvalue and we are done. What will happen if $A$ isn't positive definite? I'm searching for useful criteria that doesn't require positivity.
Or maybe there exist criteria which ensure that $AB$ must have a purely complex eigenvalue.
Has anybody heard about this? In what direction should I look?
UPD For instance, if matrices are 2x2, the criteria is the following:
$AB$ has only real eigenvalues $\Leftrightarrow$ $\exists$ a linear combination $\lambda A + \mu B^{-1}$ with real ${\lambda, \mu}$, s.t. it is positively defined

REPLY [5 votes]: Really a remark on Carlo's answer, but somewhat relevant to the OP as well: if you generate random matrices as random products (that is, pick some matrices $A_1, \dotsc, A_N,$ and look at long random products), then the eigenvalues of the products will be almost surely all real. Why? Because the top eigenvalue will a unique eigenvalue of its modulus (this is a proximality statement, which you can find in the reference), and then a similar argument but with your product acting on the second exterior power shows that the biggest sum of two eigenvalues is real, and so on. What is also interesting is that the Galois group of the characteristic polynomial of this long random product (let's assume that the $A_i$ have integer entries) is $S_d.$
Breuillard, Emmanuel; Gelander, Tsachik, A topological Tits alternative., Ann. Math. (2) 166, No. 2, 427-474 (2007). ZBL1149.20039.