Engineering Mathematics
Trace of Matrix Product — GATE CS 2022
Question
Consider the following two statements with respect to the matrices \(A_{m\times n}\), \(B_{n\times m}\), \(C_{n\times n}\) and \(D_{n\times n}\).
Where \(\operatorname{tr}(\cdot)\) represents the trace of a matrix.
Which one of the following holds?
Given
- \(A\) is an \(m\times n\) matrix.
- \(B\) is an \(n\times m\) matrix.
- \(C\) is an \(n\times n\) matrix.
- \(D\) is an \(n\times n\) matrix.
Concept Used
The trace of a square matrix is the sum of its diagonal elements.
The important property used in this question is:
Notice that \(AB\) and \(BA\) do not necessarily have the same dimensions. What matters is that both products are defined and are square matrices so that their traces exist.
Solution
Step 1: Check the dimensions of \(AB\) and \(BA\)
We are given
Therefore,
Similarly,
Thus both \(AB\) and \(BA\) are square matrices. Therefore, their traces are well-defined.
Step 2: Prove Statement 1
Let
The \(i,i\)-th element of \(AB\) is
By definition of trace,
Substitute the expression for \((AB)_{ii}\):
Since the summations are finite, we can change their order:
Since multiplication of scalars is commutative,
Hence,
But the \(j,j\)-th diagonal element of \(BA\) is
Therefore,
Therefore, Statement 1 is TRUE.
Step 3: Check Statement 2
We are given
Therefore,
and
Both products are square matrices. Therefore the trace property can be directly applied:
Hence, Statement 2 is TRUE.
Step 4: Evaluate the options
We have established:
Therefore, both statements are correct.
Final Answer
Both Statement 1 and Statement 2 are correct.
Formulas & Concepts to Remember
1. Trace of a square matrix
2. Trace of product
3. Cyclic property of trace
For compatible matrices, trace can be cyclically permuted:
However, do not confuse this with arbitrary rearrangement. In general,
GATE Tip
The biggest trap in this question is thinking that \(AB\) and \(BA\) must be the same matrix.
They generally are not equal:
But their traces satisfy:
For this question, the fastest approach is simply:
- Check that \(AB\) and \(BA\) are square.
- Apply \(\operatorname{tr}(AB)=\operatorname{tr}(BA)\).
- Do the same for \(CD\) and \(DC\).
- Select Option C.
Original GATE Question
Original question image for reference: