# Does a positive semidefinite matrix always have a non-negative trace?

A simple question:

If $A$ is a positive semidefinite matrix ($A\succeq 0)$, does it imply that $\mbox{Tr}(A)\geq 0$, where the $\mbox{Tr}(\cdot)$ denotes the trace.

If not, any counter-example? Thanks.

• Suppose a matrix has a negative diagonal element. Can you see that the matrix cannot be positive semidefinite? – Daniel Fischer Sep 11 '14 at 19:03
• I know most likely this statement is wrong, but I just could not figure out an counter-example. – MIMIGA Sep 11 '14 at 19:06
• @MIMIGA the statement is correct: if $A \succeq 0$, then $\mathrm{Tr}(A) \geq 0$. – Omnomnomnom Sep 11 '14 at 19:12
• @Omnomnomnom Is the converse true? This is, if $\mbox{Tr}(A)\geq 0$, then $A\succeq 0$. – Diego Fonseca Aug 31 '16 at 15:19
• @DiegoFonseca No. Consider $$A = \pmatrix{2&0\\0&-1}$$ – Omnomnomnom Aug 31 '16 at 16:11

Suppose that $A = [a_{ij}]_{i,j=1}^n$ is such that $a_{ii} < 0$ for some $i$. Let $e_i$ be the $i$th standard basis vector; that is, $$e_i = (\overbrace{0,\cdots,0}^{i-1},1,0,\dots,0)$$ then $e_i^T Ae_i = a_{ii} < 0$, which means that $A$ is not positive semidefinite.
So, if $A$ is positive semidefinite, then all diagonal elements are non-negative, which means that the trace is non-negative.