Matrix Trace Calculator
Compute the trace of a square matrix — the sum of all diagonal elements. The trace equals the sum of the matrix's eigenvalues.
Loading calculator…
Notes
What is the Trace?
The trace of a square matrix is the sum of its main diagonal elements (entries where the row index equals the column index).
Example
| 5 | 2 | 1 |
| 0 | 3 | 7 |
| 4 | 0 | 9 |
tr(A) = 5 + 3 + 9 = 17 (sum of highlighted diagonal entries)
The trace equals the sum of eigenvalues and is invariant under cyclic permutation: tr(ABC) = tr(CAB) = tr(BCA).
See also
- Matrix Calculations Guide — Matrix Trace — In-depth notes on Matrix Trace with worked examples
Frequently Asked Questions
What is the relationship between trace and eigenvalues?
tr(A) equals the sum of all eigenvalues of A (counted with multiplicity), even though individual eigenvalues may be complex.
Is the trace invariant under similarity transformations?
Yes. tr(P⁻¹AP) = tr(A) for any invertible P. This is why the trace is a useful matrix invariant.
What is tr(I) for an n×n identity matrix?
tr(I) = n, since all n diagonal entries are 1.