Matrix Trace Calculator

Enter a square matrix to add up its main diagonal.

Matrix A
Size
1

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

Try

Result

You enteredtr⁡((5))\operatorname{tr}\left(\begin{pmatrix} 5 \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=5a_{11} = 5
  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=5\begin{aligned} \operatorname{tr}\left(A\right) &= a_{11} \\ &= 5 \end{aligned}
  3. Result

    So the trace is 55.

Worked examples