# Trace of product of positive matrices

Let $A$, $B$ symmetric matrices over $\mathbb{R}$ with the same dimension. If $A$ has only positive eigenvalues and $B$ has only nonnegative eigenvalues, is $\text{trace}(AB)\ge 0?$

If yes, prove it. If no, counterexample it.

Yes. In fact all eigenvalues of $A B$ are nonnegative. This is because $A^{1/2} B A^{1/2}$ is positive semidefinite, where $A^{1/2}$ is the positive definite square root of $A$, and $A B = A^{1/2} (A^{1/2} B)$ and $(A^{1/2} B) A^{1/2}$ have the same eigenvalues (the products of two matrices in either order always have the same nonzero eigenvalues).
• If $B$ is positive semidefinite, then so is $S^T B S$ for any real matrix $S$, since $x^T S^T B S x = (S x)^T B Sx \ge 0$ for any vector $x$. – Robert Israel Jul 18 '17 at 19:49