Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If $X$ and $W$ are real, square, symmetric, positive semidefinite matrices of the same dimension, does $XW + WX$ have to be positive semidefinite?

This is not homework.

share|cite|improve this question
The above comment is to an earlier version of the question and no longer applies. – Stefan Smith Oct 28 '12 at 17:06
up vote 7 down vote accepted

To answer the second part of your question, the matrix $XW+WX$ need not be positive semidefinite. Let $$X = \left(\begin{array}{rr} 4 & 2 \\ 2 & 1 \end{array} \right).$$ Let $$W = \left(\begin{array}{rr} 4 & -2 \\ -2 & 1 \end{array} \right).$$ Let $$v = \left(\begin{array}{r}0\\1\end{array}\right). $$

Then $$v^T XW v + v^T W X v = \big( \ 2 \ 1 \ \big) \left(\begin{array}{rc}-2 \\1\end{array}\right) + \big(\,-\!2 \ 1 \ \big) \left(\begin{array}{c} 2 \\1\end{array}\right) = -6 < 0. $$

share|cite|improve this answer
Prof. Shor: I am honored that you took the time to answer my humble question. – Stefan Smith Oct 28 '12 at 14:40
@navigetor23 : My question was $tr(XW) \geq 0$, and I also wondered if $XW + WX$ had to be positive semidefinite. I discovered the answer to my first question online after I posted. You posted a better reason why $tr(XW) \geq 0$, but someone else proved that $XW + WX$ need not be positive semidefinite and I accepted their answer. Unfortunately I can only accept one answer. – Stefan Smith Oct 28 '12 at 16:54
@navigetor23 : I should have split it up into two questions. I didn't because I was expecting $XW + WX$ to be positive semidefinite. – Stefan Smith Oct 28 '12 at 17:02
@navigetor23 : I edited my question so it asked if $XW + WX$ had to be positive semidefinite. I will re-ask why $XW$ has to have nonnegative trace and accept your answer if you give the same answer as before. – Stefan Smith Oct 28 '12 at 17:08

If $A, B$ are real, pos, and symmetric, then $A=A^{1/2}A^{1/2}$ and the trace of $AB$ is the trace of $A^{1/2}A^{1/2}B$ which is the the trace of $A^{1/2}BA^{1/2}$ which is a positive semidefinite matrix. Thus trace of $AB$ is nonnegative.

share|cite|improve this answer
How do you know $A^\frac{1}{2} A^\frac{1}{2}B$ and $A^\frac{1}{2} B A^\frac{1}{2}$ have the same trace, unless $A^\frac{1}{2}B$ is symmetric? – Stefan Smith Oct 28 '12 at 15:07
The cyclic property of trace: $\mathrm{Tr} ABC$ = $\mathrm{Tr} BCA$. – Peter Shor Oct 28 '12 at 15:09
Thanks again, Prof. Shor. – Stefan Smith Oct 28 '12 at 15:12

$$XW \sim ZX\underbrace{Z^{-1}Z}_IWZ^{-1} = DZWZ^{-1}$$

Since $X$ is symmetric, square, and positive semi-definite, $D$ is diagonal for some $Z$ and has non-negative elements.

$ZWZ^{-1} \sim W$ has positive trace (trace is invariant to similarity and $W$ is positive square and semi-definite). There can be no negative values in the diagonal for $W$ and the following shows why.

Let $\mathbf{e}_i$ be the unit vector for the index $i$ that is the same index as the supposed negative diagonal value in $W$ (or any similarity to $W$). Then $\mathbf{e}_i^\top W \mathbf{e}_i = W_{ii} < 0$ which contradicts that $W$ is positive semidefinite.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.