# Linear Algebra - check my solution, product of symmetric positive-definite matrices

We are given $A,B \in Mat_n(\mathbb R)$ are symmetric positive-definite matrices such that $AB=BA$

Show that $AB$ is positive-definite

What I did:

First I showed that $AB$ is symmetric, this is easily shown from $(AB)^t=B^tA^t=BA=AB$

Now I'm trying to think, why are the eigenvalues of $AB$ all positive? Just because the eigenvalues of $A$ and $B$ are positive does not imply that $AB$'s eigenvalues are.

However, from sylvester's criterion, we know that all the leading principal minors of $A$ and $B$ have a positive determinant, and since the determinant of the product is the product of the determinants, we can infer that every leading principal minor of $AB$ is positive. Proof:

$det(AB_{ii})=det(A_{ii})det(B_{ii}) \geq 0$ since $\forall i, det(A_{ii}),det(B_{ii}) \geq 0$

So $AB$ is a symmetric matrix where every leading principal minor has a positive determinant, and so $AB$ is indeed positive-definite.

This is kind of a roundabout way of solving it, is there a way of actually showing the eigenvalues of $AB$ are positive? Did my solution even make sense?

• How did you get that they are symmetric am I missing something? Edit: Just re-read the title ;-) – Ben Feb 4 '14 at 15:04
• Ah yeah I forgot to write that, thanks for mentioning, $A$ and $B$ are symmetric. – Oria Gruber Feb 4 '14 at 15:04

$AB=BA$ is a interesting condition. Let $v$ be an eigenvector of $A$ such that $Av=\lambda v$. Then $A(Bv)=B(Av)=B(\lambda v)=\lambda(Bv)$. This implies that the eigenvector space $V_{\lambda}$ of $A$ is invariant space of $B$. Now we can find all eigenvalues of $B$ on $V_{\lambda}$. Take the basis of $V_{\lambda}'s$ for both $A$ and $B$, you will find what you need.

• Since $A$ and $B$ are diagonlizable and $AB=BA$, there is a basis that diagonlizes both of them, so there is a $P$ such that $A=PD_AP^{-1}$ and $B=PD_BP^{-1}$, and so $AB=PD_AD_BP^{-1}$, and $D_AD_B$ is a diagonal matrix with only positive values on the diagonal, and so $AB$ is positive definite. – Oria Gruber Feb 4 '14 at 15:33
• Yes, you are right. The above explaination is just to show how to diagonalize $A, B$ at the same time. – Wei Zhou Feb 4 '14 at 15:37

It is not true that $\det(AB)_{ii}=\det A_{ii}\det B_{ii}$ as the following example shows $A=B=\begin{pmatrix}2&1\\1&1\end{pmatrix}$, so $AB=\begin{pmatrix}5&3\\3&2\end{pmatrix}$ and $\det(AB)_{11}=5\neq 2\cdot2=\det(A_{11})\det(B_{11})$

So your argument has a gap.

Try to use the Spectral Theorem.

• Yeah that's true...Damnit. – Oria Gruber Feb 4 '14 at 15:23

More generally, if $A,B$ are any real $n\times n$ matrices s.t. $AB=BA$ and $A,B$ have only positive eigenvalues, then $A+B$ and $AB$ have positive eigenvalues.

Proof: The $2$ conditions imply that $A,B$ are simultaneously triangularizable over $\mathbb{R}$. Then we may assume that they are upper-triangular with positive diagonals and we are done.