Sum of squared eigenvalues of $A$ equals $\operatorname{tr}(A^2)$? Is the following always true:
$$\sum_i \lambda_i^2 = \operatorname{tr}(A^2)$$
where $\lambda_i$ are the eigenvalues of $A$. If it's not true in general, then under what conditions is it true? Is it always true if $A$ is square and positive semidefinite?
Please provide a proof or reference. Thanks!
 A: Yes, this always holds when $A$ is square (which it must be to have eigenvalues). One can use Jordan Normal Form or a density argument, the key idea in both proofs being that
$$ \operatorname{tr}(M) = \operatorname{tr}(UMU^{-1}) $$
for any invertible matrix $U$.


*

*JNF proof: Actually, all we need is that any square matrix $A$ is similar to an upper-triangular matrix $B$, $A=UBU^{-1}$. The multiset of eigenvalues is preserved under similarity and the eigenvalues of an upper triangular matrix are the diagonal elements, so the diagonal elements of $B$ are the eigenvalues of $A$, repeated according to multiplicity. The square of an upper-triangular matrix is again upper-triangular, and direct calculation shows that the diagonal elements of the square are the squares of the diagonal elements, so 
$$ \operatorname{tr}(A^2) = \operatorname{tr}(UBU^{-1}UBU^{-1}) = \operatorname{tr}(B^2) = \sum_i \lambda_i^2 $$
as required.

*Density proof: The function $f:A \mapsto \operatorname{tr}(A^2)$ is continuous on the vector space of matrices (this space is finite-dimensional, so any norm induces the same topology) so if we can prove something about $f$ on a dense subset of the set of matrices, we can extend it to the whole space by continuity. Matrices with distinct eigenvalues are dense (not a proof, but this is plausible since matrices with two eigenvalues the same have fewer parameters to play with, so one might expect them to form a submanifold of lower dimension), and diagonalisable, and for such matrices $A=UDU^{-1}$, $D$ diagonal, one obviously has
$$ \operatorname{tr}(A^2) = \operatorname{tr}(UDU^{-1}UDU^{-1}) = \operatorname{tr}(D^2) = \sum_i \lambda_i^2. $$
A: Suppose that $A \in \mathbb{C}^{n \times n}$ and is diagonalizable. 
$$ A = V \Lambda V^{*}$$
the characteristic polynomial is given by 
$$ p(t) = det(A -tI) = (-1)^{n}(t^{n}-(trA)t^{n-1}+ \cdots + (-1)^{n} det(A))  $$
also, we have
$$p(t) = (-1)^{n} (t-\lambda_{1})\cdots (t - \lambda_{n}) $$
where $ \lambda_{j}$ are the eigenvalues of $A$ then 
$$tr(A) = \lambda_{1} + \cdots + \lambda_{n} = \sum_{i=1}^{n} \lambda_{i} $$
now from above
$$A = V \Lambda V^{*}  $$
$$A^{k} = V \Lambda^{k} V^{*} \implies tr(A^{k}) = \sum_{i=1}^{n} \lambda_{i}^{k} $$
A: $A$ is Hermitian, hence diagonalizable, so write $A = UDU^{-1}$, where $U$ is unitary, and where $D$ is the diagonal matrix consisting of the eigenvalue of $A$.  The claim follows.
A: tr $A^2 $ = tr $AA$ = tr $UDU^{-1}UDU^{-1} $ = tr $UD^2 U^{-1}$ = tr $U^{-1}UD^2 =$ tr $ D^2$ = $\sum \lambda_i^2$
A: If $\lambda $ is an eigenvalue of $n\times n$ matrix $A$, then  $\lambda^2 $ is an eigenvalue of $A^2$
On the other hand trace of $A^2$  is the sum of its eigenvalues. 
Thus $$\sum_i \lambda_i^2 = \text{tr}(A^2)$$  is true for every square matrix. 
