Matrix Trace Calculator

Enter a square matrix to add up its main diagonal.

Matrix A
Size
3

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

Try

Result

You enteredtr⁡((200034049))\operatorname{tr}\left(\begin{pmatrix} 2 & 0 & 0 \\ 0 & 3 & 4 \\ 0 & 4 & 9 \end{pmatrix}\right)

14\displaystyle 14
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=2, a22=3, a33=9a_{11} = 2,\ a_{22} = 3,\ a_{33} = 9
  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+a33=2+3+9=14\begin{aligned} \operatorname{tr}\left(A\right) &= a_{11} + a_{22} + a_{33} \\ &= 2 + 3 + 9 \\ &= 14 \end{aligned}
  3. Result

    So the trace is 1414.

Worked examples