How To Prove Tr(AB)=Tr(BA)?

9 min read Sep 22, 2024
How To Prove Tr(AB)=Tr(BA)?

In the realm of linear algebra, the trace of a matrix plays a crucial role in various applications, including matrix analysis, quantum mechanics, and statistical modeling. One fundamental property of the trace operation is that the trace of the product of two matrices is invariant under commutation. In other words, the trace of AB is equal to the trace of BA, denoted as Tr(AB) = Tr(BA). This property has significant implications for simplifying calculations and understanding the relationship between matrices. This article delves into the proof of this property, providing a step-by-step explanation and elucidating the underlying concepts.

Understanding the Trace of a Matrix

Before embarking on the proof, it's essential to define the trace operation and its properties. For a square matrix A, the trace of A, denoted as Tr(A), is defined as the sum of its diagonal elements. Mathematically, if A is an n x n matrix with elements a<sub>ij</sub>, then:

Tr(A) = a<sub>11</sub> + a<sub>22</sub> + ... + a<sub>nn</sub>

For example, if:

A =  [[1, 2],
      [3, 4]]

Then:

Tr(A) = 1 + 4 = 5

Proving Tr(AB) = Tr(BA)

To prove Tr(AB) = Tr(BA), we need to show that the sum of the diagonal elements of AB is equal to the sum of the diagonal elements of BA. Let's consider two matrices, A and B, with dimensions m x n and n x m, respectively. This ensures that both AB and BA are defined and are square matrices.

The element in the i-th row and j-th column of AB, denoted as (AB)<sub>ij</sub>, is given by the dot product of the i-th row of A and the j-th column of B:

(AB)<sub>ij</sub> = Σ<sub>k=1</sub><sup>n</sup> a<sub>ik</sub>b<sub>kj</sub>

Similarly, the element in the i-th row and j-th column of BA, denoted as (BA)<sub>ij</sub>, is given by:

(BA)<sub>ij</sub> = Σ<sub>k=1</sub><sup>m</sup> b<sub>ik</sub>a<sub>kj</sub>

Now, let's focus on the diagonal elements of AB and BA. For the diagonal elements, i = j. Therefore, the diagonal element in the i-th row of AB is given by:

(AB)<sub>ii</sub> = Σ<sub>k=1</sub><sup>n</sup> a<sub>ik</sub>b<sub>ki</sub>

And the diagonal element in the i-th row of BA is given by:

(BA)<sub>ii</sub> = Σ<sub>k=1</sub><sup>m</sup> b<sub>ik</sub>a<sub>ki</sub>

Since the indices of summation are interchangeable (we are summing over all k values), we can rewrite these expressions as:

(AB)<sub>ii</sub> = Σ<sub>k=1</sub><sup>n</sup> b<sub>ki</sub>a<sub>ik</sub>

(BA)<sub>ii</sub> = Σ<sub>k=1</sub><sup>m</sup> a<sub>ki</sub>b<sub>ik</sub>

Now, the trace of AB is the sum of its diagonal elements:

Tr(AB) = Σ<sub>i=1</sub><sup>m</sup> (AB)<sub>ii</sub> = Σ<sub>i=1</sub><sup>m</sup> Σ<sub>k=1</sub><sup>n</sup> b<sub>ki</sub>a<sub>ik</sub>

And the trace of BA is:

Tr(BA) = Σ<sub>i=1</sub><sup>m</sup> (BA)<sub>ii</sub> = Σ<sub>i=1</sub><sup>m</sup> Σ<sub>k=1</sub><sup>n</sup> a<sub>ki</sub>b<sub>ik</sub>

Since the order of summation doesn't affect the result, we can rearrange the terms in the double summation for Tr(BA) to match the expression for Tr(AB):

Tr(BA) = Σ<sub>i=1</sub><sup>m</sup> Σ<sub>k=1</sub><sup>n</sup> a<sub>ki</sub>b<sub>ik</sub> = Σ<sub>i=1</sub><sup>m</sup> Σ<sub>k=1</sub><sup>n</sup> b<sub>ki</sub>a<sub>ik</sub> = Tr(AB)

Therefore, we have proven that Tr(AB) = Tr(BA) for any matrices A and B where AB and BA are defined.

Implications and Applications

The property Tr(AB) = Tr(BA) has several significant implications and applications. Some of the key areas where this property proves useful include:

  • Matrix Analysis: In matrix analysis, the trace property simplifies calculations involving matrix products and enables the derivation of various relationships between matrices.
  • Linear Transformations: The trace is closely related to the eigenvalues of a matrix, and the property Tr(AB) = Tr(BA) can be used to analyze the properties of linear transformations represented by matrices.
  • Quantum Mechanics: In quantum mechanics, the trace is used to compute probabilities and expectation values. The property Tr(AB) = Tr(BA) plays a crucial role in deriving important results in quantum theory.

Conclusion

The proof of Tr(AB) = Tr(BA) is a fundamental concept in linear algebra with far-reaching implications. This property highlights the importance of the trace operation and its relationship to matrix multiplication. Understanding this property is essential for comprehending the behavior of matrices and their applications in various fields. By leveraging this property, we can simplify calculations, derive valuable insights, and solve complex problems involving matrices and linear transformations. The concept of the trace and its properties continue to play a vital role in advancing our understanding of mathematical structures and their applications in the real world.