Matrix Trace Calculator
Work out the sum of a square matrix's diagonal from square matrix (rows on separate lines). Trace(A) = Σ aᵢᵢ, and the page prints the substitution so the result can be checked by hand.
Matrix Trace Calculator
Work out the sum of a square matrix's diagonal from square matrix (rows on separate lines). Trace(A) = Σ aᵢᵢ, and the page prints the substitution so the result can be checked by hand.
How this page computes
Trace(A) = Σ aᵢᵢ
trace(AB) = trace(BA), so a change of basis leaves the trace unchanged. It is one of the few numbers attached to a linear map rather than to a particular grid.
The page also prints the characteristic polynomial's λⁿ⁻¹ coefficient, which is −trace, as a cross-check.
The calculation runs entirely in this browser tab; nothing is uploaded.
Matrix Trace Calculator computes the sum of a square matrix's diagonal. Trace(A) = Σ aᵢᵢ. The page prints the rule, the numbers substituted into it and the result, so the arithmetic can be checked by hand.
trace(AB) = trace(BA), so a change of basis leaves the trace unchanged. It is one of the few numbers attached to a linear map rather than to a particular grid. Pressed with square matrix 1 2; 3 4, it answers: Trace = 5
How to use Matrix Trace Calculator
Enter square matrix 1 2; 3 4, then press Run: the page evaluates the sum of a square matrix's diagonal and prints every line of the working. Typed input is read exactly as written, and a blank field is refused with its name.
Read the first line as the answer and the lines below it as the substitution. If a value is out of range the page refuses it by field and reason instead of printing a number.
With square matrix 1 2; 3 4, the answer is Trace = 5.
A property of the map
trace(AB) = trace(BA), so a change of basis leaves the trace unchanged. It is one of the few numbers attached to a linear map rather than to a particular grid.
The page also prints the characteristic polynomial's λⁿ⁻¹ coefficient, which is −trace, as a cross-check.
What to Expect
Best for
- Working out the sum of a square matrix's diagonal without a spreadsheet
- Checking a figure someone else quoted
- Seeing the formula behind an answer
Not ideal for
- A non-square matrix is refused, because a trace is defined only for a square matrix.
- A quantity the page cannot compute, which it refuses instead of estimating
- Rounding an answer that has an exact form
What this tool keeps
- Trace(A) = Σ aᵢᵢ
- Every input exactly as typed
What may need cleanup
- Nothing: the printed answer is the final output
- A unit conversion, if the inputs were entered in different units
Common errors
- A non-square matrix is refused, because a trace is defined only for a square matrix.
- An empty field is refused with the field's name
Example use cases
- Work out the sum of a square matrix's diagonal for one set of inputs
- Check the result against the formula by hand
- See which input the answer is most sensitive to
Sample input
Matrix Trace Calculator: square matrix 1 2; 3 4
Sample output
Trace = 5 — Trace is the sum of the main diagonal: 1 + 4 = 5
Who this is for
- Students checking a formula
- Anyone who needs the number and the working
Frequently asked questions
What formula does this page use?
Trace(A) = Σ aᵢᵢ. The page prints the substitution as well, so the answer can be checked against the rule.
What does Matrix Trace Calculator refuse?
A non-square matrix is refused, because a trace is defined only for a square matrix.
What does the default example give?
Square matrix 1 2; 3 4 gives Trace = 5. Every line below that restates the same arithmetic.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.