Home

Trace of a Matrix

Matrix trace calculator. Enter a square matrix to compute tr(A), the sum of diagonal entries—with properties.

展开更多 ▾
tr(A) = Σ aᵢᵢ
space-separated entries, semicolon-separated rows, e.g. 1 2;3 4

📖 Tutorial|Trace of a Matrix

1. Definition
The sum of the main diagonal entries of a square matrix is its trace, tr(A) = Σ aᵢᵢ.
2. Symbols
SymbolMeaning
tr(A)trace
aᵢᵢmain diagonal entry
3. How this tool works
  • Trace is defined only for square matrices;
  • It is the sum of diagonal entries;
  • tr(A)=tr(Aᵀ), tr(AB)=tr(BA).
4. Steps
  1. Enter a square matrix A;
  2. Click Calculate to see diagonal entries and the trace.
5. Example
Example: A=1 2;3 4. tr(A)=1+4=5.
6. Pitfalls
Only square matrices have a trace;
Trace is the diagonal sum, not the total sum;
Non-square matrices raise an error.

❓ FAQ|Trace of a Matrix

How is the trace computed?
Sum the main diagonal: a₁₁+a₂₂+… .
Can a non-square matrix have a trace?
No; trace is defined only for square matrices.
Properties of the trace?
tr(A)=tr(Aᵀ), tr(AB)=tr(BA); trace is the sum of eigenvalues.
Is the trace the sum of all entries?
No, only the diagonal entries.
Link to eigenvalues?
The sum of all eigenvalues of an n×n matrix equals tr(A).