TITLE: Is the product of three positive semidefinite matrices positive semidefinite
QUESTION [7 upvotes]: Is the product of three positive semidefinite matrices positive semidefinite if the product is symmetry? If so, any proof or reference? Thanks
Paper - on weakly positive matrices, from Wigner 1963, states that the product of three positive definite matrices is positive definite iff the product is symmetric, but it doesn't extend the statement to the case of psd.

REPLY [8 votes]: The answer is YES. More precisely, we have:

Proposition: Let $A$,  $B$ and  $C$ be positive semidefinite Hermitian matrices of the same size. If $D:=ABC$ is Hermitian, then $D$ is also  positive semidefinite.

Proof: Since $A$,  $B$, $C$ and $D$ are Herimitian, 
$$D=ABC=CBA.$$
Firstly, suppose that $C$ is invertible, so there exists a unique positive definite Hermitian matrix $S$, such that $C=S^2$. Then  we know 
$$S^{-1}D S^{-1}=S^{-1}AS^{-1}\cdot SBS=SBS\cdot S^{-1}AS^{-1},$$
i.e. $D$ is congruent to the product of two commutable positive semidefinite matrices $S^{-1}AS^{-1}$ and $SBS$, which implies that $D$ is positive semidefinite. 
Secondly, suppose that ${\rm Ker}~A\cap {\rm Ker}~C=\{0\}$, i.e. given a column vector $v$, $Av=Cv=0$ iff $v=0$. Then for every $t>0$, $C_t:=C+tA$ is positive definite and $D_t:=ABC_t$ is Hermitian, so from the discussion in the last paragraph we know that $D_t$ is always positive semidefinite. Letting $t\to 0$, by continuity, $D$ is also positive semidefinite.
Finally, if ${\rm Ker}~A\cap {\rm Ker}~C\ne \{0\}$, we can complete the proof 
by induction on the size $n$ of the matrices. Let $U$ be a unitary matrix whose last column is in ${\rm Ker}~A\cap {\rm Ker}~C$. Then 
$$U^\dagger D U=U^\dagger A U\cdot U^\dagger B U\cdot U^\dagger C U=\begin{pmatrix}  \tilde{A} & 0\\ 0 & 0\end{pmatrix}\begin{pmatrix}  \tilde{B} & * \\ * & *\end{pmatrix}\begin{pmatrix}  \tilde{C} & 0\\ 0 & 0\end{pmatrix}=\begin{pmatrix}  \tilde{D} & 0\\ 0 & 0\end{pmatrix},$$
where $\tilde{A}$, $\tilde{B}$ and $\tilde{C}$ are positive semidefinite matrices of size $n-1$ and $\tilde{D}=\tilde{A}\tilde{B}\tilde{C}$ is Hermitian. Then $\tilde{D}$ is positive semidefinite by induction, so $D$ is also positive semidefinte.  $\qquad\square$