# Why is the trace of a matrix important?

Lower division linear algebra course at my university taught the simple computation steps to finding a trace of a matrix, but not the intuition nor the purpose for it. What information is gained from summing the diagonal entries?

Why is the trace of a matrix important?

• One thing you'll learn about later is the importance of linear transformations rather than just matrics. Linear transformations are represented as different matrices depending on which basis you take. Since the same linear transformation might have infinitely many representations as different matrices, it would be nice to have some object related to the linear transformation that was invariant with respect to change of basis. One such invariant is the trace, another is the determinant. Commented May 19, 2022 at 8:57

2. It has a lot of nice properties such as linearity, invariance by transposition and basis change, and perhaps more importantly invariance by cyclic permutations; i.e. $$\mathrm{trace}(ABC)=\mathrm{trace}(CAB)=\mathrm{trace}(BCA)$$ for square matrices $$A,B,C$$. Again those properties are extremely convenient to have.
3. The inner-product on $$\mathbb{R}$$, $$\langle x,y\rangle=x^Ty$$ is generalized to matrices in $$\mathbb{R}^{n\times n}$$ as $$\langle X,Y\rangle=\mathrm{trace}(X^TY)$$ and the same use can be done with matrices as with vectors, so we can talk of projections, induced-norms, distances, operators and their adjoints, etc. The norm induced by this inner-product is the so-called Frobenius norm, which coincides with the sum of the singular values of the matrix. Such an inner product has important application in optimization and, especially, in semidefinite programming. It also has applications in the analysis of matrix-valued dynamical systems where the trace allows us to build suitable Lyapunov functions.
4. This also generalizes the inner product on infinite-dimensional space such as $$\ell_2[0,\infty)$$ and $$L_2[0,\infty)$$ spaces where $$\langle x,y\rangle_{\ell_2}=\sum_{i=0}^\infty x_i^*y_i\quad \mathrm{and}\quad \langle x,y\rangle_{L_2}=\int_0^\infty x(s)^*y(s)ds,$$
$$\langle X,Y\rangle_{\ell_2}=\mathrm{trace}\left(\sum_{i=0}^\infty X_i^*Y_i\right)\quad \mathrm{and}\quad \langle X,Y\rangle_{L_2}=\mathrm{trace}\left(\int_0^\infty Y(s)^*X(s)ds\right),$$