Matrix Trace Calculator
The sum of the diagonal elements of a square matrix, which also equals the sum of its eigenvalues.
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
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.
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
- Linear Algebra and Its Applications by Gilbert Strang
- Wikipedia: Trace (linear algebra)
- Bird, R. Byron; Stewart, Warren E.; Lightfoot, Edwin N. (2007). Transport Phenomena (2nd ed.). John Wiley & Sons.
- Callen, Herbert B. (1985). Thermodynamics and an Introduction to Thermostatistics (2nd ed.). John Wiley & Sons.
- Lay, David C. Linear Algebra and Its Applications. Pearson, 2016.
- Trace (linear algebra). Wikipedia. https://en.wikipedia.org/wiki/Trace_(linear_algebra)
- Lay, D. C., Lay, S. R., & McDonald, J. J. (2016). Linear Algebra and Its Applications. Pearson.