Let $A$ be a semistable real matrix (*i.e.* the real parts of all the eigenvalues of $A$ are nonnegative). Let $P$ be a positive definite matrix. 


**Is it always true that $\operatorname{trace}{A^{T}P+PA} \leq 0$?**


P.S.
In fact, slightly more is known about $A$: that $A+A^{T}$ is negative semidefinite.



Is the trace of a Lyapunov transform of a semistable matrix always nonpositive?
Here is a counterexample. Notice that $\mathrm{Tr}(A^T P)=\mathrm{Tr}(PA)$, so it suffices to calculate $\mathrm{Tr}(PA)$. Suppose $n=2$ and $A$ triangular:
$$P=\begin{pmatrix} x & y \\ y & z \end{pmatrix},\qquad A=\begin{pmatrix} a & b \\ 0 & c \end{pmatrix},$$
where $x,z,xz-y^2$ positive, and $a,c\le0$. We have $\mathrm{Tr}(PA)=ax+by+cz$. Suppose that $y\ne0$. Then you may chose $b$ so that $\mathrm{Tr}(PA)>0$.


