# Is $AB$ a covariance matrix?

Suppose we have two covariance matrices $A$ and $B$. They satisfy the condition $AB=BA$. Is $AB$ a covariance matrix?

We can easily check that $(AB)'=B'A'=BA$, then $AB$ is symmetric. But I have no idea how to check it is positive semi-definite. I can't come up with an example showing it isn't a covariance matrix, either.

Any help would be appreciated.

Since $AB=BA$, then $A$ and $B$ can be simultaneously diagonalized by some matrix $U$. Hence it follows \begin{align} AB = UD_1U^{-1}UD_2U^{-1} = UD_1D_2U^{-1}. \end{align} Thus, the eigenvalues of $AB$ are product of eigenvalues of $A$ and $B$. Thus, it follows $AB$ is also positive semi-definite since the eigenvalues are nonnegative.
• $AB=(U_A \Lambda_A U_A^{-1}) (U_B \Lambda_B U_B^{-1}) = (U_B \Lambda_B U_B^{-1}) (U_A \Lambda_A U_A^{-1}) = BA$, I can't figure out what is the $U$ as mentioned in the answer, thanks again! – Pandaaaaaaa Sep 25 '16 at 2:29