Linear Algebra

Matrix Trace

Sum of diagonal entries.

Formula

Formula
tr(A) = Σ Aii

Variables

SymbolDefinitionType & rangeUnitsRole
A square matrix real matrix input

Try it yourself

Interactive calculator
rows separated by ';' , values by commas
Result

Worked examples

Example 1
GivenA = 1, 2; 3, 4
Result5
Example 2
GivenA = 5, 0, 0; 0, 6, 0; 0, 0, 7
Result18