# Proof that the Trace of a Matrix is the sum of its Eigenvalues

I have looked extensively for a proof on the internet but all of them were too obscure. I would appreciate if someone could lay out a simple proof for this important result. Thank you.

• I think my solution is the easiest. Try this Since A=PDP^{-1}, then Tr(A)=Tr(PDP*{-1})=Tr(DPP^{-1})=Tr(D)=\sum \lambda_i. Here the property of trace is applied, and you can check it on wikipedia. By J. Y. – Hunter Jan 9 '17 at 4:33
• @Hunter But that assumes diagonalisability... – WavesWashSands Apr 16 '17 at 18:53
• This is actually general. @ WavesWashSands Every matrix has a Jordan canonical form – Jiapeng Zhang Apr 12 at 18:38

These answers require way too much machinery. By definition, the characteristic polynomial of an $n\times n$ matrix $A$ is given by $$p(t) = \det(A-tI) = (-1)^n \big(t^n - (\text{tr} A) \,t^{n-1} + \dots + (-1)^n \det A\big)\,.$$ On the other hand, $p(t) = (-1)^n(t-\lambda_1)\dots (t-\lambda_n)$, where the $\lambda_j$ are the eigenvalues of $A$. So, comparing coefficients, we have $\text{tr}A = \lambda_1 + \dots + \lambda_n$.

• The definition of the characteristic polynomial I learned is just only $\det{(A-tI)}$. Why the coefficient of the $t^{n-1}$ term is $-\text{tr }A$? – bfhaha Apr 8 '18 at 22:08
• @bfhaha The coefficient of $t^{n-1}$ must come from $(a_{11}-t)\cdots (a_{nn}-t)$, because if we expand $A-\lambda I$ along a row $i$, we see that any term involving an off-diagonal element $[A-t I]_{ij}$ eliminates $a_{ii}-t$ and $a_{jj}-t$, and hence any such term does not involve $t^{n-1}$. Therefore the coefficient of $t^{n-1}$ must come from the product of the diagonal elements, and so the coefficient is $(-1)^{n-1}(a_{11}+\cdots+a_{nn})$. – AnonymousIGuess Aug 14 '18 at 7:34

Let $A$ be a matrix. It has a Jordan Canonical Form, i.e. there is matrix $P$ such that $PAP^{-1}$ is in Jordan form. Among other things, Jordan form is upper triangular, hence it has its eigenvalues on its diagonal. It is therefore clear for a matrix in Jordan form that its trace equals the sum of its eigenvalues. All that remains is to prove that if $B,C$ are similar then they have the same eigenvalues.

• I would try to elaborate a bit. For every matrix $A$ there exists a non singular matrix $P$ such that $PAP^{-1} = J$ where $J$ has Jordan canonical form. Now using $tr(ABC) = tr(CAB) = tr(BCA)$ (which is true whenever the products are defined), we obtain $tr(A) = tr(P^{-1}JP) = tr(PP^{-1}J) = tr(J) = \sum_i \lambda_i$ where $\lambda_i$ are the eigenvalues of $A$. – them Aug 14 '16 at 10:08
• Very elegant :) Also such tool can be used to show that det(A) ofr any matrix A is the product of eigenvalues det(A). – bruziuz Jan 24 '18 at 13:32

I'll try to show it another way. We know that if we have a polynomial $x^n+b_{n-1} x^{n-1} + \dots +b_1 x+ b_0$, then $(-1)^{n-1} b_{n-1}$ is the sum of the roots of this polynomial. (So-called Vieta's formulas) In our case, the polynomial is $\det(tI-A)$ and we have $(-1)^{n-1} b_{n-1}=\lambda_1+\lambda_2+\dots+\lambda_n$.

$\def\S{\mathcal{S}_n}$ Let $\S$ denote all the permutations of the set $\{1,2,\dots,n\}$. Then by definition $$\det M = \sum_{\pi\in\S} m_{1,\pi(1)} m_{2,\pi(2)} \dots m_{n,\pi(n)} \operatorname{sgn}\pi,$$ where $\operatorname{sgn}\pi$ is either $+1$ or $-1$ and it is $+1$ for the identity permutation (we don't need to know more now).

Consider $M=tI-A$. To get the power $t^{n-1}$ for a permutation, we need this permutation to choose at least $n-1$ diagonal elements, i.e., to have $\pi(i)=i$ for at least $n-1$ values of $i$. However, once you know the value of a permuation on $n-1$ inputs, you know the last one as well. This means, that to get the coefficient of $t^{n-1}$, we need to consider only the identity permutation.

So far we got that $b_{n-1}$ is the coefficient of $t^{n-1}$ in $(t-a_{1,1})(t-a_{2,2})\dots(t-a_{n,n})$ (this is the term of the sum above corresponding to the identity permutation). Therefore $(-1)^{n-1}b_{n-1} = a_{1,1}+a_{2,2}+\dots+a_{n,n}=\operatorname{Tr}A$.

• @Ioannis Sorry, but there's no more elementary proof than the one I and Ted provided. And I don't think I'm able to divide it into more elementary steps than I did here. Therefore I think that you can't be helped. – yo' Oct 31 '13 at 0:05
• Btw, this is not more advanced than Ted's proof. This is exactly the same, just each of the steps is written out. – yo' Oct 31 '13 at 0:11
• There is a very simple proof for diagonalizable matrices that utlises the properties of the determinants and the traces. I am more interested in understanding your proofs though and that's what I have been striving to do. – JohnK Oct 31 '13 at 0:14

Trace is preserved under similarity and every matrix is similar to a Jordan block matrix. Since the Jordan block matrix has its eigenvalues on the diagonal, its trace is the sum (with multiplicity) of its eigenvalues.

Here is another proof. First of all, by definition, we have that the characteristic polynomial of the $n\times n$ matrix $A=[a_{ij}]$ is given by $P_A(x)=\det(xI_n-A)$. Let $P_A(x)=x^n-b_1x^{n-1}+b_2x^{n-2}-\dots$. By Viete's formula the sum of eigenvalues is $b_1$. We have to prove that $b_1=\hbox{trace}(A)$. Substituting $x$ with $\frac{1}{x}$ for every real non-zero $x$ we get $$\det\left(\frac{1}{x}\left(I_n-xA\right)\right)=\frac{1-b_1x+b_2x^{2}-\dots}{x^n},$$ or equivalently $$\det(I_n-xA)=1-b_1x+b_2x^2-\dots$$ for any non-zero real $x$. But then the left side and right side polynomials from the above equation coincide for all real $x$. A short explanation: if for two polynomials $f$ and $g$ we have $f(x)=g(x)$ for any non-zero $x$, then the polynomial $h(x):=f(x)-g(x)$ has an infinity of zeroes, thus being the identically zero polynomial; it follows that $f(x)=g(x)$ for all $x$. Let's denote now $$f(x):=\det(I_n-xA)$$ and $$g(x):=1-b_1x+b_2x^2-\dots.$$ We have seen that $f$ and $g$ are equal functions (polynomials). We then have $f'(x)=g'(x)$ for all $x$. Obviously, $g'(x)=-b_1+2b_2x-\dots$, therefore $g'(0)=-b_1$. On the other side, from $$f(x)=\left|\begin{array}{cccc} 1-a_{11}x&-a_{12}x&\dots&-a_{1n}x\\ -a_{21}x&1-a_{22}x&\dots&-a_{2n}x\\ \dots&\dots&\dots&\dots\\ -a_{n1}x&-a_{n2}x&\dots&1-a_{nn}x\end{array}\right|$$ by the rule of differentiating determinants we get $$f'(x)=\left|\begin{array}{cccc} -a_{11}&-a_{12}&\dots&-a_{1n}\\ -a_{21}x&1-a_{22}x&\dots&-a_{2n}x\\ \dots&\dots&\dots&\dots\\ -a_{n1}x&-a_{n2}x&\dots&1-a_{nn}x\end{array}\right|+\dots+\left|\begin{array}{cccc} 1-a_{11}x&-a_{12}x&\dots&-a_{1n}x\\ -a_{21}x&1-a_{22}x&\dots&-a_{2n}x\\ \dots&\dots&\dots&\dots\\ -a_{n1}&-a_{n2}&\dots&-a_{nn}\end{array}\right|.$$ It follows that $$f'(0)=\left|\begin{array}{cccc} -a_{11}&-a_{12}&\dots&-a_{1n}\\ 0&1&\dots&0\\ \dots&\dots&\dots&\dots\\ 0&0&\dots&1\end{array}\right|+\dots+\left|\begin{array}{cccc} 1&0&\dots&0\\ 0&1&\dots&0\\ \dots&\dots&\dots&\dots\\ -a_{n1}&-a_{n2}&\dots&-a_{nn}\end{array}\right|=$$ $$=-(a_{11}+\dots+a_{nn})=-\hbox{trace}(A).$$ Since we have $f'(0)=g'(0)$ we get $b_1=\hbox{trace}(A)$.

• Great first answer! Good job! – user370967 Jun 7 '17 at 19:51

Let $$A \in M_{n}(\mathbb{C})$$. Then $$\text{tr}(A) = \text{tr}(PTP^{-1})$$ where $$T$$ is an upper triangular matrix and $$P$$ is invertible$$^{\alpha}$$. Thus $$\text{tr}(A) = \text{tr}(PTP^{-1}) \overset{\beta}{=} \text{tr}(P^{-1}PT) = \text{tr}(T)$$. Since the diagonal entries of $$T$$ are the eigenvalues of $$A$$, the result follows.

$$^{\alpha}$$ The existence of the matrices $$T$$ and $$P$$ can be shown to follow from $$\mathbb{C}$$ being algebraically closed!

$$^{\beta}$$ Here we use $$\text{tr}(AB) = \text{tr}(BA)$$ which can be shown by direct calculation.