In linear algebra, the trace of a square matrix is the sum of the elements on its main diagonal (from upper left to lower right).

The trace of a real matrix is the sum of its eigenvalues.