Skip to main content

Section 3.8 Trace

The trace of a (square) matrix is just the sum of all of its diagonal elements. In terms of components,

\begin{equation} \mathrm{tr}(A)=\sum_i A_{ii}\text{.}\tag{3.8.1} \end{equation}

For example, if

\begin{equation} A=\left(\begin{array}{ccc} 1\amp 2\amp 3\\ 4\amp 5\amp 6\\ 7\amp 8\amp 9 \end{array} \right)\tag{3.8.2} \end{equation}


\begin{equation} \mathrm{tr}(A)=1+5+9=15\text{.}\tag{3.8.3} \end{equation}

Try it for yourself by computing

\begin{equation} \mathrm{tr}\left(\begin{array}{ccc} 1\amp 34\amp 5\\ 23\amp 5\amp 98\\ 132\amp 7\amp 9 \end{array} \right)\text{.}\tag{3.8.4} \end{equation}