MathematicsLinear AlgebraUniversity
OCRAPOntarioNSWCBSEGCE O-LevelMoECAPS

Matrix Trace Calculator

The sum of the diagonal elements of a square matrix, which also equals the sum of its eigenvalues.

Use the free calculatorCheck the variablesOpen the advanced solver
This is the free calculator preview. Advanced walkthroughs stay in the app.
Result
Ready
Matrix Trace

Formula first

Overview

The trace of a square matrix is the scalar value defined as the sum of the elements along its main diagonal. It is a fundamental operator in linear algebra that is equal to the sum of the matrix's eigenvalues and remains invariant under similarity transformations.

Symbols

Variables

tr(A) = Matrix Trace, = Diagonal Element a11, = Diagonal Element a22

tr(A)
Matrix Trace
The sum of the diagonal elements
Diagonal Element a11
The first element on the main diagonal
Diagonal Element a22
The second element on the main diagonal

Apply it well

When To Use

When to use: Use the trace when you need to calculate the sum of eigenvalues or identify invariant properties of a linear transformation. It is also applied when computing the inner product of two matrices or analyzing the divergence of a vector field in tensor calculus.

Why it matters: The trace is vital because it simplifies complex matrix operations into a single scalar that captures essential information about the system. In physics, it is used in quantum mechanics to find expectation values and in thermodynamics to define the partition function.

Avoid these traps

Common Mistakes

  • Attempting to calculate the trace for a non-square matrix.
  • Assuming tr(ABC) = tr(ACB); only cyclic permutations like tr(ABC) = tr(BCA) = tr(CAB) are guaranteed.
  • Confusing the trace with the determinant.

One free problem

Practice Problem

A 2×2 square matrix A has diagonal elements a₁₁ = x and a₂₂ = y. Calculate the trace (result) of matrix A.

Diagonal Element a1114 The first element on the main diagonal
Diagonal Element a22-5 The second element on the main diagonal

Solve for: result

Hint: The trace is found by adding the numbers located on the main diagonal from the top-left to the bottom-right.

The full worked solution stays in the interactive walkthrough.

References

Sources

  1. Linear Algebra and Its Applications by Gilbert Strang
  2. Wikipedia: Trace (linear algebra)
  3. Bird, R. Byron; Stewart, Warren E.; Lightfoot, Edwin N. (2007). Transport Phenomena (2nd ed.). John Wiley & Sons.
  4. Callen, Herbert B. (1985). Thermodynamics and an Introduction to Thermostatistics (2nd ed.). John Wiley & Sons.
  5. Lay, David C. Linear Algebra and Its Applications. Pearson, 2016.
  6. Trace (linear algebra). Wikipedia. https://en.wikipedia.org/wiki/Trace_(linear_algebra)
  7. Lay, D. C., Lay, S. R., & McDonald, J. J. (2016). Linear Algebra and Its Applications. Pearson.