Prove that if A and B are n x n matrices, then tr(AB) = tr(BA).

Chardonnay Felix

Chardonnay Felix

Answered question

2020-11-12

Prove that if A and B are n x n matrices, then tr(AB) = tr(BA).

Answer & Explanation

hosentak

hosentak

Skilled2020-11-13Added 100 answers

A and B are n×n matrices. 
 AB=[cij]n×n with , cij=k=1naikbkj 
 BA=[dij]n×n with , dij=k=1nbikakj =s=1nbisasj 
tr(AB)=i=1ncij 
i=1n(k=1naikbki) 
tr(AB)=i=1n(s=1naksbks) 
k=1ndkk 
i=1ndii =tr(BA) 
Hence proved tr(AB)=tr(BA).

Jeffrey Jordon

Jeffrey Jordon

Expert2022-01-24Added 2605 answers

Answer is given below (on video)

Nick Camelot

Nick Camelot

Skilled2023-05-28Added 164 answers

To prove that tr(AB)=tr(BA) for two n×n matrices A and B, we can use the definition of the trace of a matrix. The trace of a square matrix is the sum of its diagonal elements.
Let A=[aij] and B=[bij] be two n×n matrices. Then, we have:
AB=[a11b11+a12b21++a1nbn1a11b12+a12b22++a1nbn2a11b1n+a12b2n++a1nbnna21b11+a22b21++a2nbn1a21b12+a22b22++a2nbn2a21b1n+a22b2n++a2nbnnan1b11+an2b21++annbn1an1b12+an2b22++annbn2an1b1n+an2b2n++annbnn]
Similarly,
BA=[b11a11+b12a21++b1nan1b11a12+b12a22++b1nan2b11a1n+b12a2n++b1nannb21a11+b22a21++b2nan1b21a12+b22a22++b2nan2b21a1n+b22a2n++b2nannbn1a11+bn2a21++bnnan1bn1a12+bn2a22++bnnan2bn1a1n+bn2a2n++bnnann]
Now, to find the trace of AB and BA, we sum the diagonal elements of each matrix. For AB, we have:
tr(AB)=a11b11+a22b22++annbnn
And for BA, we have:
tr(BA)=b11a11+b22a22++bnnann
By comparing these two equations, we can observe that the terms in the summation are the same, only the order of multiplication is different. Since multiplication of real numbers is commutative, the order of multiplication does not affect the final result. Therefore, we can conclude that tr(AB)=tr(BA) for any n×n matrices A and B.
madeleinejames20

madeleinejames20

Skilled2023-05-28Added 165 answers

Answer:
tr(AB)=tr(BA)
Explanation:
Given matrices A and B of size n×n, the trace of a matrix is defined as the sum of its diagonal elements. Using this definition, the trace of matrix X can be denoted as tr(X).
Consider the product AB. The (i,j)-th entry of AB is given by the dot product of the i-th row of A with the j-th column of B. Using matrix multiplication, we can express the (i,j)-th entry as:
(AB)ij=k=1nAikBkj
Now, let's compute the trace of AB:
tr(AB)=i=1n(AB)ii
Substituting the expression for (AB)ij:
tr(AB)=i=1nk=1nAikBki
Next, let's consider the product BA. Similarly, the (i,j)-th entry of BA can be expressed as:
(BA)ij=k=1nBikAkj
Now, let's compute the trace of BA:
tr(BA)=i=1n(BA)ii
Substituting the expression for (BA)ij:
tr(BA)=i=1nk=1nBikAki
Comparing the expressions for tr(AB) and tr(BA), we observe that the order of A and B is reversed in the summation. However, since addition is commutative, the order of summation does not affect the final result. Therefore, we can rewrite the expression for tr(BA) as:
tr(BA)=i=1nk=1nAkiBik
Notice that the indices i and k are swapped compared to the expression for tr(AB). Since the order of summation does not matter, we can interchange the indices i and k in the expression for tr(BA) without changing the value of the summation. This allows us to rewrite tr(BA) as:
tr(BA)=k=1ni=1nAkiBik
Now, we can see that tr(BA) has the same form as tr(AB), but with the indices i and k swapped. Therefore, we can conclude that:
tr(AB)=tr(BA)
This completes the proof.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?