Skip to content

Trace

Definition

The trace of a square matrix A\boldsymbol{A} is the sum of its diagonal entries: tr⁡(A)=∑i=1naii\displaystyle \operatorname{tr}(\boldsymbol{A})=\sum_{i=1}^n a_{ii}.


Interpretation

The trace is a simple scalar summary of the main diagonal: add the diagonal entries and ignore the rest. Although it is easy to compute, it carries information about the eigenvalues.

For every square matrix, the trace is the sum of the complex eigenvalues, counted with algebraic multiplicity, and the determinant is their product. For a 2×22\times2 matrix this can be seen in the characteristic polynomial λ2−tr⁡(A)λ+det⁡A\lambda^2-\operatorname{tr}(\boldsymbol{A})\lambda+\det\boldsymbol{A}. For (1234)\begin{pmatrix}1&2\\3&4\end{pmatrix} the eigenvalues are 12(5±33)\tfrac{1}{2}(5\pm\sqrt{33}), yet their sum 55 and product −2-2 need no computation.

Change the entries of A\boldsymbol{A}: the eigenvalues always add up to tr⁡(A)\operatorname{tr}(\boldsymbol{A}) and multiply to det⁡(A)\det(\boldsymbol{A}), so the parabola is symmetric about tr⁡(A)/2\operatorname{tr}(\boldsymbol{A})/2.

The trace is linear, and tr⁡(AB)=tr⁡(BA)\operatorname{tr}(\boldsymbol{A}\boldsymbol{B})=\operatorname{tr}(\boldsymbol{B}\boldsymbol{A}) even when AB≠BA\boldsymbol{A}\boldsymbol{B}\neq\boldsymbol{B}\boldsymbol{A}; hence tr⁡(P−1AP)=tr⁡(A)\operatorname{tr}(\boldsymbol{P}^{-1}\boldsymbol{A}\boldsymbol{P})=\operatorname{tr}(\boldsymbol{A}), so the trace does not change under diagonalization. It is not multiplicative: for A=B=I2\boldsymbol{A}=\boldsymbol{B}=\boldsymbol{I}_2, tr⁡(AB)=2\operatorname{tr}(\boldsymbol{A}\boldsymbol{B})=2, while tr⁡(A)tr⁡(B)=4\operatorname{tr}(\boldsymbol{A})\operatorname{tr}(\boldsymbol{B})=4.


Key Results


Examples

  • tr⁡(1234)=5\operatorname{tr}\begin{pmatrix}1&2\\3&4\end{pmatrix}=5.
  • tr⁡(In)=n\operatorname{tr}(\boldsymbol{I}_n)=n.

Prerequisites

Sources

Aliases: matrix trace Symbols: lambda, square root, sum

Last updated: 20 October 2026 03:02