# Is the product of matrices compatible with the signature?

Let $A$, $B$ square matrices over $\mathbb{R}$ with the same dimension. If $A$ is positive definite and $B$ is positive semidefinite, is $AB$ positive semidefinite? If yes, prove it. If no, counterexample it.

What if $A$ and $B$ are symmetric?

• I'm not sure if your question is well stated. Definition of positive (semi)definite matrix assumes symmetry, but the product of two symmetric matrices need not be symmetric. Jul 18, 2017 at 18:00
• Positive definite = eigenvalues are $>0$. Positive semidefinite = eigenvalues are $\ge 0$. No symmetry required. Jul 18, 2017 at 18:42
• @user459312 That is not what positive definite usually means, although there is a definition that allows for non-symmetric positive definite matrices. Jul 18, 2017 at 18:48
• @Przemek in some areas, a real matrix $A$ is called positive definite if and only if $A + A^T$ is positive definite (in the usual sense). Jul 18, 2017 at 18:49
• @Omnomnomnom in every area I encountered it, that was the definition. But no matter, I got the counterexample I wanted. Jul 18, 2017 at 18:53

If $$A$$ and $$B$$ commute, the result is positive semidefinite again. For the case in which they don't commute, there is a counterexpample.
Proof for the case $$AB = BA$$: Since $$A>0$$, there exists a unique symmetric matrix $$A^{1/2}>0$$ such that $$A^{1/2}A^{1/2} = A$$. We can write
$$\langle AB x,x\rangle = \langle BA x,x\rangle = \langle A^{-1/2}A^{1/2} B A^{1/2}A^{1/2}x,x\rangle = \langle A^{1/2} B A^{1/2}x,x\rangle = \langle B(A^{1/2}x), A^{1/2}x\rangle =\langle Bz,z\rangle \ge 0,$$ with $$z = A^{1/2}x$$.