Matrix Trace
Sum of the diagonal entries of a square matrix.
Formula
Variables
Example
tr of I₃ = 3
How it works
The trace of a square matrix is found by adding the entries running from the top-left to the bottom-right. It is useful because it captures a key part of a matrix’s action in a compact single number, and it stays the same under a change of basis, so it describes an intrinsic property of the linear transformation rather than just the chosen coordinate system. For an n×n matrix, only the diagonal entries are included because they are the terms that contribute directly to how each basis direction maps back onto itself.
When to use it
Use the trace when you need a quick summary of a square matrix, especially in linear algebra, differential equations, physics, and statistics. It often appears in eigenvalue problems, matrix identities, and calculations involving determinants, covariance matrices, and linear transformations.
Worked example, step by step
Let A = [[4, -1, 2], [0, 3, 5], [7, 8, -2]] Identify the diagonal entries: a11 = 4, a22 = 3, a33 = -2 Add the diagonal entries: tr(A) = 4 + 3 + (-2) Compute the sum: tr(A) = 5
Common mistakes to avoid
- Adding every entry in the matrix instead of only the diagonal entries
- Trying to take the trace of a non-square matrix
- Mixing up the trace with the determinant, which is a product-like quantity rather than a sum
Did You Know?
The trace of a matrix equals the sum of its eigenvalues, a fact that survives any change of coordinates.
Share this formula
More in Linear Algebra
View allDeterminant (2×2)
IntermediateDeterminant of a 2×2 matrix.
Dot Product
IntermediateScalar product of two vectors.
Cross Product Magnitude
AdvancedMagnitude of the vector perpendicular to two vectors.
Vector Magnitude
IntermediateLength of a vector.
Eigenvalue Equation
AdvancedDefines eigenvalues and eigenvectors of a matrix.
Inverse of a 2×2 Matrix
AdvancedInverse of a 2×2 matrix (ad−bc ≠ 0).