Matrix Trace Calculator
Test cases replayed : 2 of 2 match · Methodology · No outside source listed
Enter a 3×3 matrix. For a 2×2 matrix, leave row 3 and column 3 at 0.
Result
Trace tr(A) = a₁₁ + a₂₂ + a₃₃ (sum of the eigenvalues)
Trace of A² (sum of the squared eigenvalues)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Row 1, column 1: enter a number.
- Row 1, column 2: enter a number.
- Row 1, column 3: enter a number.
- Row 2, column 1: enter a number.
- Row 2, column 2: enter a number.
- Row 2, column 3: enter a number.
- Row 3, column 1: enter a number.
- Row 3, column 2: enter a number.
- Row 3, column 3: enter a number.
- Read the result: Trace tr(A) = a₁₁ + a₂₂ + a₃₃ (sum of the eigenvalues); the panel also shows Trace of A² (sum of the squared eigenvalues).
How this calculator works
The trace of a square matrix is the sum of the entries on its main diagonal, from top left to bottom right.
The trace equals the sum of the eigenvalues counted with multiplicity, and tr(A²) = Σᵢ Σⱼ aᵢⱼaⱼᵢ equals the sum of their squares. The trace is unchanged by transposition and tr(AB) = tr(BA).
The formula
| Symbol | Meaning |
|---|---|
| Row 1, column 1 | |
| Row 2, column 2 | |
| Row 3, column 3 | |
| Trace tr(A) = a₁₁ + a₂₂ + a₃₃ (sum of the eigenvalues) |
Worked example
| Row 1, column 1 | 1 |
|---|---|
| Row 1, column 2 | 2 |
| Row 1, column 3 | 3 |
| Row 2, column 1 | 4 |
| Row 2, column 2 | 5 |
| Row 2, column 3 | 6 |
| Row 3, column 1 | 7 |
| Row 3, column 2 | 8 |
| Row 3, column 3 | 9 |
| Trace of A² (sum of the squared eigenvalues) | 261 |
|---|
Trace tr(A) = a₁₁ + a₂₂ + a₃₃ (sum of the eigenvalues) 15
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What is the trace of [[1, 2, 3], [4, 5, 6], [7, 8, 9]]?
1 + 5 + 9 = 15. The trace of its square is 261.
Does the trace exist for a non-square matrix?
No. The trace is defined only for square matrices.