Definition · applies to square matrices

High school

Consider a square matrix $A$, such as

\[A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}.\]

The trace of $A$ is the sum of the entries of $A$ on the diagonal from the top-left corner to the bottom-right corner. For the matrix above, the diagonal entries are $1$, $5$, and $9$, so

\[\trace{A} = 1 + 5 + 9 = 15.\]
Undergraduate

Consider an $n \times n$ matrix $A = [a_{ij}]$. The trace of $A$ is the sum of its diagonal entries:

\[\trace{A} = a_{11} + a_{22} + \dots + a_{nn}.\]

Examples

Worked examples

Properties

  • The trace of $A$ is the sum of its eigenvalues, counted with multiplicity.
  • $\traceOf{A B} = \traceOf{B A}$, even though $A B \neq B A$ in general.

All definitions · All distinctions · All examples · Notation