39. Trace
The trace of a square matrix is the sum of its main diagonal entries:
Example
39.1. Properties
- Linearity: and
- Transpose:
-
Cyclic property:
- More generally:
-
Similarity invariance:
- The trace doesn’t change under change of basis
- Sum of eigenvalues: (counted with multiplicity, including complex)
- Identity:
39.2. Trace as inner product
For matrices, the Frobenius inner product is defined via the trace:
It induces the Frobenius norm .
39.3. Where it shows up
- Sum of eigenvalues — quick check via
- Variance / covariance: = total variance across all dimensions
- Loss functions in machine learning —
- Quantum mechanics — expectation values:
- Characteristic polynomial: trace appears as a coefficient