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?

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.
