Prove trace of matrix: Tr(AB) = Tr(BA)

Very nice proof indeed :)Sure, happy to explain.The term "rank one matrix" is a generalization of the notion of an outer product from vectors to matrices. Given two vectors ##\mathbf a, \mathbf b \in \mathbb R^n##, you can define the matrix ##\mathbf R = \mathbf a \tilde{ \mathbf b}^T## where ##\tilde{ \mathbf b}## is the complex conjugate transpose of ##\mathbf b##. This is an ##n \times n## matrix where ##\mathbf R_{i,j} = a_i \bar b_j##. If you're not familiar with complex numbers,
  • #1
DrMCoeus

Homework Statement


[/B]
The trace of a matrix is defined to be the sum of its diaganol matrix elements.
1. Show that Tr(ΩΛ) = Tr(ΩΛ)
2. Show that Tr(ΩΛθ) = Tr(θΩΛ) = Tr(ΛθΩ) (the permutations are cyclic)

my note: the cross here U[+][/+]is supposed to signify the adjoint of the unitary matrix U

Homework Equations



$$
Tr(Ω) = \sum_{i=1} Ω_{ii} \\
I = \sum_{k=1}^n | k >< k |
$$

The Attempt at a Solution



$$
Tr(Ω) = \sum_{i=1} Ω_{ii} \\
Tr(ΛΩ) = \sum_{i=1} (ΛΩ)_{ii} \\
(Ω)_{ij} = < i | Ω | j >
$$

(this is saying that when we take the product of the matrices we sum the diagonal entries where the element is in the ith row of the ith column, I also assume the trace is )

1.
$$
= \sum_{i=1} (Λ Ω)_{ii} \\
= \sum_{i=1} < i |ΛΩ| i > \\
= \sum_{i=1} < i |Λ I Ω| i > \\
= \sum_{k=1} \sum_{i=1} < i |Λ| k >< k |Ω| i > \\
= \sum_{k=1} \sum_{i=1} Λ_{ik} Ω_{ki}
$$

Unsure about how to finish as I think I am on the right track but my thinking is a bit cloudy.

To finish proof i need to show as this is where we end up if we reverse the operators initially as we want:

$$
\sum _{k=1} \sum _{i=1} Λ_{ik} Ω_{ki} = \sum _{k=1} \sum _{i=1} Ω_{ki} Λ_{ik}
$$

So correct me where/if I'm wrong.

The way I'm thinking about it is in terms of matrix multiplication. The trace only sums the diagonal elements of the a matrix. Thus when multiplying two matrices/operators the only terms that 'survive' are terms which end up there as the ith row * the ith column. This is denoted by the fact that ' i ' is the 1st term $$Λ_{ik}$$ denotes the ith row time of Λ times the ith column $$Ω_{ki}$$ when we sum through all the values k = 1 to k = n.

Is it possible that we can just swap the two indexes k & i? as they both go to n? Can I just swap their positions as they are are matrix elements and are thus commutative?

For part 2 i can use a similar method to get to:
$$
\sum _{k=1} \sum _{i=1} \sum _{j=1} Λ_{ik} Ω_{kj} θ_{ji}
$$
I notice that the last index of a matrix matches the first index of the next operator. Which may be a clue to why its cyclic but I can't figure out why.

Apologies for the long winded attempt, I just wanted to be clear for anybody attempting to understand my confusion. In my text this proof is in the Unitary Matrix/ Determinant section. These are obviously relevant in later parts to this question but they don't appear to be relevant here.

Any help greatly appreciated
 
Physics news on Phys.org
  • #2
It might be easier to work with matrices ##A_1,A_2,A_3## and calculate ##\operatorname{tr}(A_1A_2)## and ##\operatorname{tr}(A_1A_2A_3)##. Then the result should be symmetric in ##(1,2)## and cyclic in ##(1,2,3)##. In any case, you have finite sums here, so changing the order of summation is no issue and the rest comes with the fact, that your matrix entries are hopefully from a commutative and associative domain.
 
  • Like
Likes DrMCoeus
  • #3
My advice would be to only spend much time on the first statement, and you ultimately need to find a way to prove this that is intuitively satisfying to you, as traces are ridiculously useful and the cyclic property is vital. I.e. spend your time on proving

##trace\Big(\mathbf {AB}\Big) = trace\Big(\mathbf {BA}\Big)##

Personally, I like to start simple and build, which in this context means rank one matrices, i.e. that

##trace\Big(\mathbf a \tilde{ \mathbf b}^T \Big) = trace\Big(\tilde{ \mathbf b}^T \mathbf a \Big)##

If you look at matrix multiplication in terms of a series of rank one updates vs a bunch of dot products, you can build on this simple vector setup.

- - - -
once you have this locked down, use that fact plus associativity of matrix multiplication to get the cyclic property. Specifically consider

##trace\Big(\mathbf {XYZ}\Big) = trace\Big(\big(\mathbf {XY}\big)\big(\mathbf Z \big)\Big)##

now call on the fact that ##trace\Big(\mathbf {AB}\Big) = trace\Big(\mathbf {BA}\Big)##, which if you assigned ##\mathbf A := \big(\mathbf {XY}\big)## and ##\mathbf B := \big(\mathbf Z\big)##, gives you the below:

##trace\Big(\big(\mathbf {XY}\big)\big(\mathbf Z \big)\Big) = trace\Big(\big(\mathbf Z \big)\big(\mathbf {XY}\big)\Big)##

and use associativity and original proof once more to finish this off.
 
  • Like
Likes DrMCoeus
  • #4
Thanks for help guys. I am beginning to understand some of my issues.

However I realized that that this identity applies for non-square matrix products also. i.e. if we have matrix A (2x3 matrix) and matrix B (3x2 matrix) then AB produces a 2x2 matrix & BA produces a 3x3 matrix yet the traces are still the same. Which was something I hadn't even considered and very interesting.

StoneTemplePython said:
Personally, I like to start simple and build, which in this context means rank one matrices, i.e. that

##trace\Big(\mathbf a \tilde{ \mathbf b}^T \Big) = trace\Big(\tilde{ \mathbf b}^T \mathbf a \Big)##

If you look at matrix multiplication in terms of a series of rank one updates vs a bunch of dot products, you can build on this simple vector setup.

I was just wondering if you could elaborate on this a bit more? More specifically, why do you have the complex conjugate and transpose of b denoted. Also the term rank one updates is unfamiliar to me. My Linear algebra is geared towards QM and lacks some generality.

Also I had figured out the answer to why they are cyclic. Very nice proof indeed :)
 
  • #5
DrMCoeus said:
Thanks for help guys. I am beginning to understand some of my issues.

However I realized that that this identity applies for non-square matrix products also. i.e. if we have matrix A (2x3 matrix) and matrix B (3x2 matrix) then AB produces a 2x2 matrix & BA produces a 3x3 matrix yet the traces are still the same. Which was something I hadn't even considered and very interesting.
I was just wondering if you could elaborate on this a bit more? More specifically, why do you have the complex conjugate and transpose of b denoted. Also the term rank one updates is unfamiliar to me. My Linear algebra is geared towards QM and lacks some generality.

Also I had figured out the answer to why they are cyclic. Very nice proof indeed :)

I would probably start off by assuming the scalars are in ##\mathbb R## for starters here that way you don't get lost in things like dot product versus inner product. If you right click the LaTeX, and do 'show math as -> Tex commands' you'll see that the symbol above the b vector in

##trace\Big(\mathbf a \tilde{ \mathbf b}^T \Big) = trace\Big(\tilde{ \mathbf b}^T \mathbf a \Big)##

is actually the "tilde" sign.

People don't always use it, but basically ##\tilde{ \mathbf b}^T## indicates that the vector is a row vector and was originally a row vector. (As opposed to if it didn't have the tilde sign, it would mean you have a column vector that has been transposed so that it is now a row vector.)

Notation is not uniform though... FWIW if I was showing a conjugate transpose I would do ##\mathbf b^H## or ##\mathbf b^*## but again, in the example I show here, conjugation has nothing to do with anything... you're certainly welcome to ignore the tilde signs if you want. There is a hint, though, tied in with the tilde sign -- consider how to partition ##\mathbf A## and ##\mathbf B## appropriately into row and column vectors, and look at the two different types of multiplication mentioned.

As for rank one updates -- you can just call it a finite series of rank one matrices if you want. Sometimes people call it the outer product interpretation of matrix multiplication.

Again, the key thing is finding a way to prove

##trace\Big(\mathbf {AB}\Big) = trace\Big(\mathbf {BA}\Big)##

in a way that is satisfying and intuitive to you. Most proofs I've seen involve juggling double sigmas. I prefer something a bit more visual, and building off of rank one matrices.

In Linear Algebra Done Wrong, they strongly hint at using, in effect, indicator variables for ##\mathbf B## to prove this, but ultimately the problem is left as an exercise. It is a very good book, and free. You may want to read it as some point. It is available here:

https://www.math.brown.edu/~treil/papers/LADW/book.pdf
 
  • #6
DrMCoeus said:
I was just wondering if you could elaborate on this a bit more?
You have already done all the work needed in your opening post under point ##1##. Just use ##\Lambda_{ik}\Omega_{ki}=\Omega_{ki}\Lambda_{ik}##, switch the summation order and walk the same way back to end up with ##\operatorname{Tr}(\Omega \Lambda)##. The ##3-##cycles follow with what @StoneTemplePython said in post #3 by using the associativity of matrix multiplication. No need for ranks, row- or column vectors, transposings, conjugates or special fields, except that the scalar field has to be commutative and associative.
 

1. What is the definition of the trace of a matrix?

The trace of a matrix is the sum of the elements on the main diagonal of the matrix. In other words, it is the sum of all the entries of the form aii where aij represents the element in the ith row and jth column of the matrix.

2. How do you compute the trace of a matrix?

To compute the trace of a matrix, simply add up all the elements on the main diagonal of the matrix. If the matrix is n x n, then the trace will be the sum of n elements.

3. What does it mean for two matrices to commute?

Two matrices A and B are said to commute if AB = BA. This means that the order in which the matrices are multiplied does not affect the result.

4. How do you prove the trace of AB is equal to the trace of BA?

To prove the trace of AB is equal to the trace of BA, we can use the fact that the trace is a linear operator and the definition of matrix multiplication. Let A and B be n x n matrices, then:

Tr(AB) = Σi=1n (AB)ii = Σi=1nj=1n aijbji) = Σj=1ni=1n bjiaij) = Σj=1n (BA)jj = Tr(BA)

Therefore, Tr(AB) = Tr(BA).

5. In what situations is knowing the trace of a matrix useful?

Knowing the trace of a matrix can be useful in many situations, including:

  • Calculating the determinant of a matrix using the Leibniz formula: det(A) = Σσ sgn(σ)a1σ(1)a2σ(2)...anσ(n), where σ is a permutation of {1, 2, ..., n}, sgn(σ) is the sign of the permutation, and aij is the entry in the ith row and jth column of the matrix.
  • Proving properties of matrices, such as the trace of a product being invariant under cyclic permutations.
  • Finding eigenvalues, as the sum of the eigenvalues is equal to the trace of the matrix.
  • Solving systems of linear equations, as the trace can be used to simplify computations.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
964
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
969
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Linear and Abstract Algebra
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
Back
Top