On this page
When you work with matrices, calculating products and inverses can quickly become tedious. But one property lets you extract useful information from a matrix almost instantly: the trace. Often denoted as tr(A), the trace turns an entire square matrix into a single number.
What makes the trace so powerful is not just its definition, but the mathematical rules it obeys. These properties—especially how it handles sums and products—are frequent shortcuts in JEE and Advanced placement exams.
What is the trace of a matrix?
The trace of a square matrix is simply the sum of the elements on its main diagonal (Wolfram MathWorld). If you have an n × n matrix, you start at the top left and add your way down to the bottom right.
For example, if you have a 3 × 3 matrix A:
A = [ 5 2 −1 ] [ 0 3 4 ] [ −3 1 −2 ]
The trace is tr(A) = 5 + 3 + (−2) = 6.
If you have concept gaps around matrix structure, you can explore them in the Fermi Concept Library.
Is tr(A + B) = tr(A) + tr(B)?
Yes, the trace is a linear operator, meaning it splits neatly over matrix addition (Wolfram MathWorld).
Because matrix addition is done element by element, the main diagonal of A + B is just the sum of the main diagonal of A and the main diagonal of B. When you sum those up, it is mathematically identical to finding the trace of A and adding it to the trace of B.
Similarly, you can pull a scalar multiplier out of a trace. If k is a constant scalar, then tr(kA) = k tr(A). Every element in the matrix is multiplied by k, so the sum of the diagonal elements is also multiplied by k.
Why does tr(AB) = tr(BA)?
One of the most important properties of the trace is its invariance under cyclic permutations, meaning tr(AB) = tr(BA) (Wolfram MathWorld).
We know that matrix multiplication is generally not commutative; AB usually does not equal BA. The resulting matrices can look entirely different. However, the *sum of their main diagonals* will always be exactly the same.
This happens because the diagonal elements of AB are calculated by multiplying the rows of A by the columns of B. When you calculate BA, you multiply the rows of B by the columns of A. If you write out the algebra for the trace, the terms just rearrange themselves symmetrically.
Why is tr(AB) ≠ tr(A)tr(B)?
While the trace plays nicely with addition, it does not distribute over multiplication.
To see why tr(AB) is generally not equal to tr(A)tr(B), we can look at a simple counterexample. Let A and B be 2 × 2 matrices:
A = [ 1 0 ] [ 0 0 ]
B = [ 0 0 ] [ 0 1 ]
Here, tr(A) = 1 and tr(B) = 1, so tr(A)tr(B) = 1.
However, if we multiply A and B, the result is the zero matrix:
AB = [ 0 0 ] [ 0 0 ]
The trace of the zero matrix is 0. Since 0 ≠ 1, we prove that tr(AB) ≠ tr(A)tr(B).
If you use the wrong method in matrix algebra, the Fermi Problem Library provides a step-by-step solver that explains the reasoning rather than printing an answer.
A JEE-style use: The commutator problem
In competitive exams like the JEE, the trace is often the secret key to proving that a matrix equation has no solution.
A classic example is the commutator equation: Prove that there are no square matrices A and B with real entries that satisfy the equation AB − BA = I, where I is the identity matrix.
If you try to solve this by writing out elements, you will drown in algebra. Instead, take the trace of both sides:
tr(AB − BA) = tr(I)
Using the addition rule: tr(AB) − tr(BA) = tr(I)
Using the cyclic rule, tr(AB) = tr(BA), so the left side becomes 0.
The trace of an n × n identity matrix is the sum of n ones, which is n.
Therefore, 0 = n.
Since n must be at least 1 for a matrix to exist, 0 = n is a contradiction. The trace elegantly proves that no such finite matrices A and B can exist.
The equation AB − BA = I doesn't just appear in maths papers. In quantum mechanics, it is the algebraic foundation of the Heisenberg uncertainty principle, where A and B represent position and momentum operators. Because finite matrices cannot satisfy this equation (as the trace proves), physicists had to use infinite-dimensional matrices to describe the quantum world.
A framework for trace problems in exams
When faced with an unknown matrix equation in an exam, run through this mental checklist:
Check the dimensions: Are there only square matrices involved? The trace is only defined for square n × n matrices.
Look for linear splits: Is the equation an identity involving sums or scalars? Use the linearity property to break it apart.
Seek a contradiction: Are you asked to prove that an equation is impossible? Take the trace of both sides and look for a contradiction like 0 = n.
Cancel symmetric products: Does the equation involve a product and its reverse, like AB and BA? Apply the cyclic rule to cancel terms out.
Once you master the trace alongside tricks like finding Aⁿ for a matrix by spotting the pattern and finding the area of a triangle using determinants, you can crack matrix problems in seconds instead of minutes.



