Question

Consider the following two statements with respect to the matrices Am×nA_{m \times n}, Bn×mB_{n \times m}, Cn×nC_{n \times n} and Dn×nD_{n \times n}.

Statement 1: tr(AB)=tr(BA)\text{tr}(AB) = \text{tr}(BA)
Statement 2: tr(CD)=tr(DC)\text{tr}(CD) = \text{tr}(DC)

where tr()\text{tr}() represents the trace of a matrix. Which one of the following holds?

Choose one option
Official answer and solution
Official answer
C
From
Official GATE 2022 answer key

Solution

Use the cyclic invariance property of the trace operator for general rectangular and square matrices.

For any matrices Am×nA_{m \times n} and Bn×mB_{n \times m}:

  • The product ABAB is an m×mm \times m matrix with diagonal entries (AB)ii=∑k=1nAikBki(AB)_{ii} = \sum_{k=1}^n A_{ik} B_{ki}.
  • The product BABA is an n×nn \times n matrix with diagonal entries (BA)jj=∑l=1mBjlAlj(BA)_{jj} = \sum_{l=1}^m B_{jl} A_{lj}.

Computing the traces:

tr(AB)=∑i=1m(AB)ii=∑i=1m∑k=1nAikBki=∑k=1n∑i=1mBkiAik=∑k=1n(BA)kk=tr(BA)\text{tr}(AB) = \sum_{i=1}^m (AB)_{ii} = \sum_{i=1}^m \sum_{k=1}^n A_{ik} B_{ki} = \sum_{k=1}^n \sum_{i=1}^m B_{ki} A_{ik} = \sum_{k=1}^n (BA)_{kk} = \text{tr}(BA)

Hence, Statement 1 holds for all rectangular matrices AA and BB.

Statement 2 is a direct instance of the same identity where CC and DD are square matrices of size n×nn \times n. Therefore, tr(CD)=tr(DC)\text{tr}(CD) = \text{tr}(DC) is also correct.

Both Statement 1 and Statement 2 are correct.

Final answer

Option (C)

Common trap

Assuming ABAB and BABA must have the same dimension for their traces to be equal.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2022 Computer Science and Information Technology (CS)
Question
20 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.