# Sum of eigenvalues of a symmetric matrix

Problem to calculate the sum of eigenvalues of a matrix:

$$\begin{pmatrix} 1 & 1 & 3 \\ 1 & 5 & 1 \\ 3 & 1 & 1 \\ \end{pmatrix}$$

I can calculate the eigenvalues by using the characteristic equation and then add them up. However, the given hint for this problem was that the sum of eigenvalues is the sum of diagonal elements, making this a $10$ sec problem.

So I am wondering if all symmetric matrices have this property (sum of eigenvalues of a symmetric matrix is the sum of its diagonal elements)?

But I couldn't find such property mentioned online or in the book.

I tried with a few symmetric matrices on wolframalpha and it seems to be true.

Please help to clarify this doubt.

## 3 Answers

The sum of the eigenvalues is just the sum of the roots of the characteristic polynomial, hence it is encoded in a coefficient of such polynomial by Viete's theorem. Such coefficient is just the sum of the diagonal entries of the matrix, hence the sum of the eigenvalues equals the sum of the diagonal entries for any matrix.

• In a way it depends on whether the underlying field (or ring!) of scalars is an algebraically closed field. For example the matrix $$\begin{pmatrix} 1 & 1 \\ -1 & 1 \\ \end{pmatrix}$$ has a trace of $2$, clearly, but taken as a matrix over $\mathbb{R}$ it has no real eigenvalues. So in a sense its trace is not the sum of its eigenvalues. However, if we take it as a matrix over e.g. $\mathbb{C}$, it has eigenvalues, and their sum is "correct". Note: Any real symmetric matrix has only real eigenvalues. – Jeppe Stig Nielsen Nov 18 '14 at 15:22
• Yes, I was just assuming that we were dealing with real matrices and complex eigenvalues. – Jack D'Aurizio Nov 18 '14 at 15:23

The characteristic polynomial of a $n \times n$ matrix $A$ is $p(t)=\det(tI-A)=(t-\lambda_1)...(t-\lambda_n)$, where $\lambda_1,..,\lambda_n$ are the eigenvalues of $A$. You can see that $p(t)= t^n - (\lambda_1+...+\lambda_n)t^{n-1}+...$

On the other hand, write the expansion of the determinant and see that the only place where you can find the term $t^{n-1}$ is in the expansion of $(t-a_{11})...(t-a_{nn})$ and you can see that the coefficient of $t^{n-1}$ is $-(a_{11}+...+a_{nn})$.

By the Spectral Theorem we can write a symmetric matrix $A$ as $UDU^*$ where $D$ is a diagonal matrix with the eigenvalues of $A$ as its entries and $U$ an orthonormal matrix containing the eigenvectors of $A$.

The trace is invariant under orthonormal transformations so $trace(A) = trace(UDU^*) = trace(D)$ is the sum of the eigenvalues.