Matrix Trace
The sum of the diagonal elements of a square matrix, which also equals the sum of its eigenvalues.
This public page keeps the free explanation visible and leaves premium worked solving, advanced walkthroughs, and saved study tools inside the app.
Core idea
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.
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.
Symbols
Variables
tr(A) = Matrix Trace, = Diagonal Element a11, = Diagonal Element a22
Walkthrough
Derivation
Derivation/Understanding of Matrix Trace
This derivation defines the trace of a square matrix as the sum of its diagonal elements and demonstrates that it is also equal to the sum of its eigenvalues.
- A is an n x n square matrix with real or complex entries.
- Understanding of eigenvalues and eigenvectors.
- Familiarity with the characteristic polynomial of a matrix.
Definition of the Trace:
The trace of a square matrix A is defined as the sum of the elements on its main diagonal.
Characteristic Polynomial and Eigenvalues:
The eigenvalues of a matrix A are the roots of its characteristic polynomial p() = (A - I). Expanding this determinant reveals that the coefficient of is (-1)^{n-1} (A).
Relationship between Roots and Coefficients:
Since , , are the roots of the characteristic polynomial, we can also express p() in factored form. Expanding this product, the coefficient of is (-1)^n (- ) = (-1)^{n+1} .
Equating Coefficients:
By equating the coefficients of from both expansions of the characteristic polynomial, we find that the trace of the matrix is equal to the sum of its eigenvalues.
Result
Source: Lay, D. C., Lay, S. R., & McDonald, J. J. (2016). Linear Algebra and Its Applications. Pearson.
Visual intuition
Graph
Graph unavailable for this formula.
The graph is a constant horizontal line because the trace of a fixed square matrix is a single scalar value regardless of the independent variable. Since the sum of the diagonal elements and the sum of the eigenvalues are invariant for a given matrix, the result does not change as the independent variable varies.
Graph type: constant
Why it behaves this way
Intuition
Imagine the trace as a measure of how much a linear transformation 'stretches' or 'shrinks' space along its principal directions, summing up these scaling effects into a single number.
Free study cues
Insight
Canonical usage
The trace of a matrix inherits the units of its elements.
Common confusion
A common mistake is assuming the trace is always dimensionless, or confusing its units with those of the determinant (which are units of elements raised to the power of the matrix dimension).
Unit systems
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.
Where it shows up
Real-World Context
In quantum mechanics, the expectation value of an observable is calculated as the trace of the product of the density matrix and the corresponding operator.
Study smarter
Tips
- Confirm the matrix is square (n ×n) before attempting to find the trace.
- Remember the cyclic property: tr(AB) = tr(BA).
- The trace of a sum is the sum of the traces: tr(A + B) = tr(A) + tr(B).
- Eigenvalue sum check: Use it to verify if your calculated eigenvalues are correct.
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.
Common questions
Frequently Asked Questions
This derivation defines the trace of a square matrix as the sum of its diagonal elements and demonstrates that it is also equal to the sum of its eigenvalues.
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.
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.
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.
In quantum mechanics, the expectation value of an observable is calculated as the trace of the product of the density matrix and the corresponding operator.
Confirm the matrix is square (n ×n) before attempting to find the trace. Remember the cyclic property: tr(AB) = tr(BA). The trace of a sum is the sum of the traces: tr(A + B) = tr(A) + tr(B). Eigenvalue sum check: Use it to verify if your calculated eigenvalues are correct.
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.