Matrix Trace Calculator

Enter a square matrix to add up its main diagonal.

Matrix A
Size
2

Write rows separated by semicolons, like 1, 2; 3, 4.

Try

Result

You enteredtr⁡((1234))\operatorname{tr}\left(\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\right)

5\displaystyle 5
Show the work
  1. Main diagonal

    The main diagonal runs from the top-left corner to the bottom-right corner. Its entries are the ones whose row number equals their column number.

    a11=1, a22=4a_{11} = 1,\ a_{22} = 4
  2. Trace of a matrix

    The trace of a square matrix is the sum of its main-diagonal entries. It also equals the sum of the eigenvalues, counted with repeats.

    tr⁡(A)=a11+a22=1+4=5\begin{aligned} \operatorname{tr}\left(A\right) &= a_{11} + a_{22} \\ &= 1 + 4 \\ &= 5 \end{aligned}
  3. Result

    So the trace is 55.

Worked examples