Trace inequality for real matrices Is there any general result characterizing real matrices $A$ such that
$$[\mathrm{tr}(A)]^2\leq n\mathrm{tr}(A^2)?$$
I can see that the inequality holds if: 


*

*all eigenvalues of $A$ are real (by the Cauchy-Schwarz inequality) or

*$A$ is a nonnegative matrix. To see this write
$$n\mathrm{tr}(A^2)=n\sum_{i=1}^{n}(A_{ii})^{2}+n\sum_{i,j=1,i\neq j}^{n}A_{ij}A_{ji},$$ and note that, by the sum of squares inequality,
$$n\sum_{i=1}^{n}(A_{ii})^{2}\geq\left(
\sum_{i=1}^{n}A_{ii}\right)^{2}=\left[\mathrm{tr}(A)\right]^{2}.$$ If $A$ is nonnegative
$$n\sum_{i,j=1,i\neq j}^{n}A_{ij}A_{ji}\geq 0,$$ and therefore the inequality holds. 
But what about matrices not satisfying 1. or 2.? Are there more general conditions (or other specific ones) under which the inequality above holds?

The inequality is not true in general for a real diagonalizable $n\times n$ matrix $A=SDS^{-1}$ with complex eigenvalues, where $D$ is the diagonal matrix containing the eigenvalues of $A$; that is $D_{i,i}=e_{i}$, $i=1...n$.
The inequality:
$[\mathrm{tr}(A)]^2\leq n\mathrm{tr}(A^2)$
implies:
$[\mathrm{tr}(SDS^{-1})]^2\leq n\mathrm{tr}(SDS^{-1}SDS^{-1})$
and by the cyclic property of the trace:
$[\mathrm{tr}(D)]^2\leq n\mathrm{tr}(D^2)$,
because $D$ is diagonal this is equivalent to:
$\left(\sum_{i=1}^n e_{i}\right)^2\leq n\left(\sum_{i=1}^n e_{i}^2\right)$.
As $A$ and $A^2$ are real their traces are real and thus:
$\mathrm{tr}(D)=\sum_{i=1}^n e_{i}=\sum_{i=1}^n \Re(e_{i})$
$\mathrm{tr}(D^2)=\sum_{i=1}^n e_{i}^2=\sum_{i=1}^n \Re(e_{i}^2)=\sum_{i=1}^n \left(\Re(e_i)^2-\Im(e_i)^2\right)$
where we used:
$(\Re(e_i)+i\Im(e_i))^2=\Re(e_i)^2-\Im(e_i)^2+i2\Re(e_i)\Im(e_i)$.
The inequality then becomes:
$\left(\sum_{i=1}^n \Re(e_{i})\right)^2\leq n\sum_{i=1}^n \Re(e_i)^2-n\sum_{i=1}^n \Im(e_i)^2$
and as:
$0\leq\left(\sum_{i=1}^n \Re(e_{i})\right)^2$
the inequality fails to hold if (..but not iff):
$\sum_{i=1}^n \Re(e_i)^2< \sum_{i=1}^n \Im(e_i)^2$.
To demonstrate failure, assume the real diagonalizable matrix $A$ has complex eigenvalues such that:
$0< \sum_{i=1}^n \Im(e_i)^2$
then the real diagonalizable matrix: 
$B=A-S^{-1}\Re(D)S$
has pure imaginary eigenvalues because:
$SBS^{-1}=SAS^{-1}-\Re(D)=D-\Re(D)=i\Im(D)$.
For an example of a matrix built in such a way take:
$A=\left( \begin{array}{cc}
1 & 2  \\
-3 & 4 \\
 \end{array} \right)$,
from which we get:
$B=\left( \begin{array}{cc}
-3/2 & 2  \\
-3 & 3/2 \\
 \end{array} \right)$, $e_{i}=\pm i/2\sqrt{15}$
$B^2=\left( \begin{array}{cc}
-15/4 & 0  \\
0 & -15/4 \\
 \end{array} \right)$,
$[\mathrm{tr}(B)]^2=0$,
$2\mathrm{tr}(B^2)=-15$,
and thus we do not have:
$[\mathrm{tr}(B)]^2\leq n\mathrm{tr}(B^2)$.
