TITLE: Eigenvalues of product of two hermitian matrices
QUESTION [9 upvotes]: I know that if $A$ and $B$ are hermitian matrices, then it doesn't follow that the eigenvalues of $AB$ are real, because of the following counter-example: $A=\begin{bmatrix}
0 &1 \\ 
 1& 0
\end{bmatrix}$ and $B=\begin{bmatrix}
1 & 0\\ 
 0& -1
\end{bmatrix}$
On the other hand, I came across the following problem, which says that if $A$ is hermitian and positive definite, and $B$ is hermitian, then $AB$ has real eigenvalues. Why if we add the property "positive definite" to $A$, the eigenvalues of $AB$ become real? The proof I read in the book says: Let $\lambda $ be an eigenvalue of the hermitian matrix $AB$ with non zero eigenvector $x$. Then: $$\left \langle BABx,x \right \rangle=\left \langle ABx,Bx \right \rangle=\left \langle \lambda x,Bx \right \rangle=\lambda \left \langle x,Bx \right \rangle$$
Since $$ \left \langle BABx,x \right \rangle$$ and $$\left \langle x,Bx \right \rangle,$$ then $\lambda$ is real. However, I can't see where in the proof the fact that $A$ is positive definite is used. Can anyone explain, please?

REPLY [2 votes]: Let $A$ be positive definite and $B$ be Hermitian. If $x$ is an eigenvector of $AB$ with eigenvalue $\lambda$, then
$$\langle ABx,Bx \rangle = \lambda \langle x,Bx \rangle $$
But if we denote $v = Bx$ we can see that since $A$ is positive definite, either $v=0$ and $ABx = Av = 0$ meaning $\lambda = 0$, or
$$\langle ABx,Bx \rangle = \langle Av,v \rangle > 0 \text{ and real}$$
This tells us two things:
$$\lambda \neq 0 \text{ , } \langle x,Bx \rangle \neq 0 $$
and if $\langle x,Bx \rangle$ is real then $\lambda$ is real. But since B is Hermitian, $\langle x,Bx \rangle$ is real! This can be seen by decomposing x into the eigenbasis $\{v_n\}$ of B:
$$x= \sum_n{c_nv_n}$$
$$\langle x,Bx \rangle = \sum_n{|c_n|^2\lambda_nv_n}$$
which is real since each component is real. Thus every eigenvalue $\lambda$ of $AB$ is real.