What Is the Trace of a Linear Operator?
At a glance
- 1. Choose a basis
Represent the operator by a square matrix in any basis of the finite-dimensional vector space.
- 2. Add the diagonal
The trace is the sum of the matrix’s diagonal entries.
- 3. Change basis freely
The value is independent of the basis, so it belongs to the operator itself.
The trace of a linear operator is a scalar that captures a simple feature of its matrix representation: the sum of the diagonal entries. Although you calculate it using a basis, the result is the same in every basis. This makes trace a property of the operator itself, rather than of a particular coordinate system.
The usual definition applies to an operator on a finite-dimensional vector space. The key qualification is finite-dimensional: an arbitrary operator on an infinite-dimensional space does not generally have a trace.
Definition
Let be an -dimensional vector space over a field , and let be a linear operator. Choose a basis of and write the matrix of in that basis as . The trace of is
For example, if the matrix of is
then
The off-diagonal entries do not contribute. The trace is defined for square matrices, as an operator from to itself has the same input and output space and therefore has a square matrix in any basis.
Why the trace does not depend on the basis
If you change basis, the matrix of changes by a similarity transformation. If is its matrix in the first basis and is the change-of-basis matrix, the matrix in the new basis has the form .
For square matrices, . Using this identity,
So every basis gives the same sum. The matrix entries depend on the basis, but their diagonal sum does not. This is why it is meaningful to speak of the trace of the operator .
You can also express the definition directly using a basis and its dual basis . If , then , so
This expression still uses a basis and its dual, but the result is independent of which basis you choose.
A worked example from a linear map
Suppose is defined by
Using the standard basis and , calculate the images of the basis vectors:
These vectors are the columns of the matrix of :
Add the diagonal entries to obtain . If you represent the same map using another basis, the matrix entries may differ, but its diagonal sum will still be .
Useful properties
For operators and a scalar , trace is linear:
For compatible square matrices, cyclic rearrangement of a product preserves trace: . More generally, the trace of a product is unchanged by moving its first factor to the end. This does not mean that matrix products can be reordered arbitrarily; for instance, , but it need not equal .
Over the complex numbers, the trace also equals the sum of the eigenvalues, counted with algebraic multiplicity. This remains true when the operator is not diagonalizable. The eigenvalues and the diagonal entries need not match one by one; it is their sums that agree.
Common mistakes
- Treating the trace as one fixed diagonal from every representation. The diagonal entries change with the basis. Only their sum is invariant.
- Adding every matrix entry. Trace means the main diagonal only: .
- Taking the trace of a nonsquare matrix. The usual trace is defined for square matrices, or equivalently for operators from a finite-dimensional space to itself.
- Assuming every infinite-dimensional operator has a trace. In infinite-dimensional analysis, trace is defined only for certain operators under additional conditions, such as trace-class operators on a Hilbert space.
- Confusing trace with determinant. Both are basis-independent quantities for a finite-dimensional operator, but they are different: trace is a sum of diagonal entries, while determinant is a separate scalar with different properties.
References
- Linear Algebra Done Right, Sheldon Axler
- Linear Algebra, Stephen H. Friedberg, Arnold J. Insel, and Lawrence E. Spence
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.