What this calculator does
The trace adds the diagonal entries and nothing else, which sounds too simple to be useful. It turns out to equal the sum of the eigenvalues, which makes it a quick invariant to check against.
The transpose reflects the matrix across that same diagonal, turning rows into columns. For the matrix 1 to 9 in order, the trace is 15.000 and the transpose has first row 1, 4, 7.
The formula
The trace sums the entries where the row and column indices match. The transpose places the entry at row i, column j into row j, column i.
| Term | Meaning |
|---|---|
| Trace | The sum of the diagonal entries, equal to the sum of the eigenvalues. |
| Transpose | The matrix reflected across its main diagonal. |
| Symmetric matrix | One equal to its own transpose. |
The inputs explained
| Field | What to enter |
|---|---|
| Matrix size | Matrix size. Third row and column entries are ignored for a 2x2. |
| Row 1, Col 1 | Row 1, column 1. |
| Row 1, Col 2 | Row 1, column 2. |
| Row 1, Col 3 (3×3 only) | Row 1, column 3, for a 3x3 only. |
| Row 2, Col 1 | Row 2, column 1. |
| Row 2, Col 2 | Row 2, column 2. |
| Row 2, Col 3 (3×3 only) | Row 2, column 3, for a 3x3 only. |
| Row 3, Col 1 (3×3 only) | Row 3, column 1, for a 3x3 only. |
| Row 3, Col 2 (3×3 only) | Row 3, column 2, for a 3x3 only. |
| Row 3, Col 3 (3×3 only) | Row 3, column 3, for a 3x3 only. |
When to use it
Checking eigenvalue calculations
The eigenvalues must sum to the trace, which catches arithmetic errors.
Testing for symmetry
A matrix equal to its transpose is symmetric, which matters in many applications.
Preparing a matrix operation
Transposes appear throughout linear algebra, particularly in least squares.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How does one entry move the trace?
The same matrix with the top-left entry changed.
Questions
Why does the trace equal the sum of eigenvalues?
Because the characteristic polynomial's second coefficient is the negative of the trace, and by the relationship between polynomial coefficients and roots, that coefficient is also the negative of the sum of the roots.
What is a transpose used for?
A great deal. Least squares regression, covariance matrices, and inner product definitions all involve transposes. In machine learning the transpose appears in almost every gradient calculation.
Is the trace of a product commutative?
Yes, remarkably. Even though AB and BA are usually different matrices, they always have the same trace. That property is used constantly in proofs.
What happens transposing twice?
You get back the original matrix. Reflecting across the diagonal twice returns every entry to where it started, so the transpose is its own inverse operation.
For the determinant, see the determinant calculator. For eigenvalues that sum to the trace, see the eigenvalues calculator.