Trace of Symmetric Matrix Proof

In summary: So then you can switch the order of summation and show that it's also equal to the trace of ##A^TA##. You can show that it's equal to the trace of ##A^2## using the same method.
  • #1
jonroberts74
189
0

Homework Statement



Prove ##tr(AA^T)=tr(A^TA)=s## where ##s## is the sum of the squares of the entries of A

I need help cleaning this up and I don't think my sigma notation is completely correct.

The Attempt at a Solution



I found the identity $$(AB)^T=B^TA^T$$then applying it to ##AA^T \Rightarrow (AA^T)^T= (A^T)^TA^T=AA^T## and ##(A^T)^T=A, A^T=A^T## so now I know A is symmetric.

##A= \displaystyle\sum_{i,j=1}^{n} a_{i,j}## and ##A^T= \displaystyle\sum_{j,i=1}^{n} a_{j,i}##, ##A=A^T##so we know ##\displaystyle\sum_{j,i=1}^{n} a_{j,i}= \displaystyle\sum_{i,j=1}^{n} a_{i,j}##

also ##s=\displaystyle\sum_{i,j}^{n}(a_{i,j})^2##

then ##AA^T=A^TA=A^2 \Rightarrow [AA^T]_{i,k} = \displaystyle\sum_{j}^{n} a_{i,j}a_{j,k} ##
so ##Tr(A^2) = Tr\Bigg(\displaystyle\sum_{j}^{n} a_{i,j}a_{j,k}\Bigg) = \displaystyle\sum_{i,j}^{n}(a_{i,j})^2 = s ##
thanks!
 
Last edited:
Physics news on Phys.org
  • #2
Prove ##tr(AA^T)=tr(A^TA)=s## where ##s## is the sum of the squares of the entries of A

Actually looks completely fine.
 
  • Like
Likes 1 person
  • #3
Zondrina said:
Do you intend this to mean the sum of the squares along the diagonal?

If so looks fine.

the trace of the the product would be the sum of the squares along the diagonal and s is the entries of A (not the product) squared and summed. I know its true, I proved it for a 3x3 square matrix but it has to be symmetric.

heres the 2x2 case

Let ##A=\left[\begin{array}{cc} a_{11} & a_{12} \\ a_{21} & a_{22}\end{array}\right]##so ##A^T= \left[\begin{array}{cc} a_{11} & a_{21} \\ a_{12} & a_{22}\end{array}\right] ##

and ##s=(a_{11})^2+(a_{12})^2+(a_{21})^2+(a_{22})^2##

now,

##tr(AA^T)=tr\Bigg(\left[\begin{array}{cc} a_{11} & a_{12} \\ a_{21} & a_{22}\end{array}\right]\left[\begin{array}{cc} a_{11} & a_{21} \\ a_{12} & a_{22}\end{array}\right]\Bigg) = tr\Bigg(\left[\begin{array}{cc} (a_{11})^2 + (a_{12})^2 & a_{11}a_{21} + a_{12}a_{22} \\ a_{11}a_{21} + a_{12}a_{22} & (a_{21})^2 + (a_{22})^2\end{array}\right]\Bigg) ##

##= (a_{11})^2+(a_{12})^2+(a_{21})^2+(a_{22})^2 = s##

and,

##tr(A^TA)=tr\Bigg(\left[\begin{array}{cc} a_{11} & a_{21} \\ a_{12} & a_{22}\end{array}\right]\left[\begin{array}{cc} a_{11} & a_{12} \\ a_{21} & a_{22}\end{array}\right]\Bigg) = tr\Bigg(\left[\begin{array}{cc} (a_{11})^2 + (a_{21})^2 & a_{11}a_{12} + a_{21}a_{22} \\ a_{11}a_{12} + a_{21}a_{22} & (a_{12})^2 + (a_{22})^2\end{array}\right]\Bigg) ##

##=(a_{11})^2+(a_{12})^2+(a_{21})^2+(a_{22})^2 = s##

therefore, ##tr(AA^T)=tr(A^TA)=s##

its probably not the best proof. Now I am trying to do the more general proof and want to use sigma notation so its not really messy making general square matrices.
Edit. Thanks!
 
  • #4
jonroberts74 said:

Homework Statement



Prove ##tr(AA^T)=tr(A^TA)=s## where ##s## is the sum of the squares of the entries of A

I need help cleaning this up and I don't think my sigma notation is completely correct.


The Attempt at a Solution



I found the identity $$(AB)^T=B^TA^T$$then applying it to ##AA^T \Rightarrow (AA^T)^T= (A^T)^TA^T=AA^T## and ##(A^T)^T=A, A^T=A^T## so now I know A is symmetric.

##A= \displaystyle\sum_{i,j=1}^{n} a_{i,j}## and ##A^T= \displaystyle\sum_{j,i=1}^{n} a_{j,i}##, ##A=A^T##so we know ##\displaystyle\sum_{j,i=1}^{n} a_{j,i}= \displaystyle\sum_{i,j=1}^{n} a_{i,j}##

also ##s=\displaystyle\sum_{i,j}^{n}(a_{i,j})^2##

then ##AA^T=A^TA=A^2 \Rightarrow [AA^T]_{i,k} = \displaystyle\sum_{j}^{n} a_{i,j}a_{j,k} ##
so ##Tr(A^2) = Tr\Bigg(\displaystyle\sum_{j}^{n} a_{i,j}a_{j,k}\Bigg) = \displaystyle\sum_{i,j}^{n}(a_{i,j})^2 = s ##
thanks!

Why do you claim that ##A## is symmetric? The result holds equally well for any square matrix, whether symmetric or not. Your 2x2 example shown later does NOT need a symmetric matrix; nowhere there did you say that you had to have ##a_{12} = a_{21}## in order to make it work.

Also, you have written a number of seriously incorrect statements: the equations
[tex] A =\sum_{i,j=1}^{n} a_{i,j} \text{ and } A^T = \sum_{j,i=1}^{n} a_{j,i} [/tex]
are wrong (and, basically, meaningless). You cannot just equate the ##n \times n## matrix ##A## to a sum of scalars ##a_{ij}##.
 
  • #5
Ray Vickson said:
Why do you claim that ##A## is symmetric? The result holds equally well for any square matrix, whether symmetric or not. Your 2x2 example shown later does NOT need a symmetric matrix; nowhere there did you say that you had to have ##a_{12} = a_{21}## in order to make it work.

Also, you have written a number of seriously incorrect statements: the equations
[tex] A =\sum_{i,j=1}^{n} a_{i,j} \text{ and } A^T = \sum_{j,i=1}^{n} a_{j,i} [/tex]
are wrong (and, basically, meaningless). You cannot just equate the ##n \times n## matrix ##A## to a sum of scalars ##a_{ij}##.

I tried find summation notation for a matrix the ones I found were in similar fashion also

and ##\left[\begin{array}{cc} 1&4\\2&3\end{array}\right] \left[\begin{array}{cc} 1&2\\4&3\end{array}\right]##wont have the same trace as ##\left[\begin{array}{cc} 1&2\\4&3\end{array}\right]\left[\begin{array}{cc} 1&4\\2&3\end{array}\right]##
 
  • #6
Hmm I would write it like this:

You want to show ##s##, which is the sum of the squares of the entries in matrix ##A##, is equal to the trace of ##AA^T##.

So ##s = \sum_{j = 1}^{m} \sum_{i = 1}^{n} (A_{ij}^2)## where the ##A_{ij}## are the matrix elements in ##A##.

Then the trace is given by:

##tr(AA^T) = tr([AA^T]_{ij}) = tr(\sum_{k=1}^{m} A_{ik} A^T_{kj})##
 
Last edited:
  • #7
oh okay so to write the n x n matrix A

##[A]_{i,j} = \displaystyle\sum_{i,j=1}^{n} A_{i,j}##and to continue what you have

##tr(AA^T) = tr([AA^T]_{ij}) = tr(\sum_{k=1}^{m} A_{ik} A^T_{kj}) = (a_{i,1})^2+(a_{i,2})^2+...+(a_{i,n})^2+(a_{1,j})^2+(a_{2,j})^2+...+(a_{n,j})^2 = \sum_{j = 1}^{m} \sum_{i = 1}^{n} (A_{ij}^2) = s##
 
  • #8
jonroberts74 said:
I tried find summation notation for a matrix the ones I found were in similar fashion also

and ##\left[\begin{array}{cc} 1&4\\2&3\end{array}\right] \left[\begin{array}{cc} 1&2\\4&3\end{array}\right]##wont have the same trace as ##\left[\begin{array}{cc} 1&2\\4&3\end{array}\right]\left[\begin{array}{cc} 1&4\\2&3\end{array}\right]##

Nope. If you compute them both you will see that they both have the same trace = 30 = 1^2 + 2^2 + 3^2 + 4^2.
 
  • #9
Ray Vickson said:
Nope. If you compute them both you will see that they both have the same trace = 30 = 1^2 + 2^2 + 3^2 + 4^2.

oh yeah, I was squaring down the diagonal for whatever reason. I apologize, you are correct.
 
  • #10
To continue further:

##tr(AA^T) = tr([AA^T]_{ij}) = tr(\sum_{k=1}^{m} A_{ik} A^T_{kj}) = tr(A_{i1}A^T_{1j} + A_{i2}A^T_{2j} + A_{i3}A^T_{3j} + ... + A_{im}A^T_{mj} )##

The sum ##s = \sum_{j = 1}^{m} \sum_{i = 1}^{n} (A_{ij}^2) = A_{11}^2 + A_{21}^2 + \cdots + A_{n1}^2 + \cdots + A_{1m}^2 + A_{2m}^2 + \cdots + A_{nm}^2##
 
  • #11
Zondrina said:
##tr(AA^T) = tr([AA^T]_{ij}) = tr(\sum_{k=1}^{m} A_{ik} A^T_{kj}) = tr(A_{i1}A^T_{1j} + A_{i2}A^T_{2j} + A_{i3}A^T_{3j} + ... + A_{im}A^T_{mj} )##
This notation is a bit odd, since indices suggest that we're dealing with a component of a matrix rather than the matrix itself. I would write the definitions of trace and matrix multiplication as
\begin{align}
&\operatorname{Tr} A=\sum_i A_{ii}\\
&(AB)_{ij}=\sum_k A_{ik}B_{kj},
\end{align} and then start the calculation like this:
$$\operatorname{Tr}(AA^T)=\sum_i (AA^T)_{ii} =\cdots $$ I initially wrote down two more very short and simple steps, but then I took another look at the problem statement and realized that my string of three simple equalities was the complete solution.
 
  • Like
Likes 1 person
  • #12
figured this out another way

Let A be an m x n matrix and ## s =\displaystyle\sum_{i=1}^{m}\sum_{j=1}^{n} a_{i,j}^2##

##A = \left[\begin{array}{cc}R_{1}\\R_{2}\\.\\.\\.\\R_{m}\end{array}\right] = \left[\begin{array}{cc}C_{1}&C_{2}&.&.&.&C_{n}\end{array}\right]## where ##R_{i},C_{i}## are rows and columns

now ##A^T =\left[\begin{array}{cc}R_{1}&R_{2}&.&.&.&R_{m}\end{array}\right] = \left[\begin{array}{cc}C_{1}\\C_{2}\\.\\.\\.\\C_{n}\end{array}\right] ##

so ##AA^T## gives an m x m matrix and ##A^TA## gives an n x n matrix by doing the dot product, ##R_{i} \cdot R_{i}, C_{i} \cdot C_{i}##, respectively. Now, I'm after the trace so I only need the diagonal
so ##\displaystyle\sum_{i=1}^{m} R_{i} \cdot R_{i} = \displaystyle\sum_{i=1}^{n} C_{i} \cdot C_{i} =\displaystyle\sum_{i=1}^{m}\sum_{j=1}^{n} a_{i,j}^2 = s##

this is just the rundown, the version I turned in was more formal looking.
 
Last edited:
  • #13
jonroberts74 said:
##A = \left[\begin{array}{cc}R_{1}\\R_{2}\\.\\.\\.\\R_{m}\end{array}\right] = \left[\begin{array}{cc}C_{1}&C_{2}&.&.&.&C_{n}\end{array}\right]## where ##R_{i},C_{i}## are rows and columns

now ##A^T =\left[\begin{array}{cc}R_{1}&R_{2}&.&.&.&R_{m}\end{array}\right] = \left[\begin{array}{cc}C_{1}\\C_{2}\\.\\.\\.\\C_{n}\end{array}\right] ##
If the Rs and Cs denote the same things in that last line as in the first, there should be transpose symbols on them in the last line, i.e. ##R_1{}^T## rather than ##R_1##.

jonroberts74 said:
so ##AA^T## gives an m x m matrix and ##A^TA## gives an n x n matrix by doing the dot product, ##R_{i} \cdot R_{i}, C_{i} \cdot C_{i}##, respectively.
The ij component of ##AA^T## will be ##R_iR_j{}^T##. This is equal to ##R_i{}^T\cdot R_j{}^T## and ##R_i\cdot R_j##, so you appear to be doing the right calculations, but writing them down in a way that's a little bit strange.

Since you have solved the problem, I will show you my complete solution:
$$\operatorname{Tr}(AA^T)=\sum_i (AA^T)_{ii} =\sum_i\sum_j A_{ij}(A^T)_{ji} =\sum_i\sum_j A_{ij}A_{ij}=s.$$ First equality: Just the definition of the trace.
Second equality: Just the definition of matrix multiplication.
Third equality: Just the definition of the transpose.

Most people don't bother to learn the definitions in this way. Perhaps this will be the motivation you need to do it.
 
  • #14
okay perfect thanks! Yeah the more I know the better, I am a math major so I don't want to learn just the bare minimum.
 
  • #15
jonroberts74 said:
oh okay so to write the n x n matrix A

##[A]_{i,j} = \displaystyle\sum_{i,j=1}^{n} A_{i,j}##
Again, this is wrong. On the left you have an array of numbers, on the right a single number- the sum of the numbers in that array.

and to continue what you have

##tr(AA^T) = tr([AA^T]_{ij}) = tr(\sum_{k=1}^{m} A_{ik} A^T_{kj}) = (a_{i,1})^2+(a_{i,2})^2+...+(a_{i,n})^2+(a_{1,j})^2+(a_{2,j})^2+...+(a_{n,j})^2 = \sum_{j = 1}^{m} \sum_{i = 1}^{n} (A_{ij}^2) = s##
 

FAQ: Trace of Symmetric Matrix Proof

What is 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 the entries in the top left to bottom right diagonal of the matrix. It is denoted by "tr(A)" where A is the matrix.

What is the significance of the trace of a matrix?

The trace of a matrix is important in many areas of mathematics and physics. It is used to calculate eigenvalues, determine the rank of a matrix, and find the determinant of a matrix. It also has applications in geometry, statistics, and signal processing.

How is the trace of a matrix calculated?

To calculate the trace of a matrix, simply add up all the elements on the main diagonal of the matrix. For example, if the matrix is A = [1 2; 3 4], the trace would be 1 + 4 = 5.

What is the relationship between the trace of a matrix and its eigenvalues?

The trace of a matrix is equal to the sum of its eigenvalues. This means that if we know the trace and a few other properties of a matrix, we can calculate its eigenvalues.

How is the trace of a matrix used in proofs?

The trace of a matrix is often used in proofs to simplify calculations or to show that two matrices are similar. It can also be used to prove the properties of eigenvalues and eigenvectors, or to prove theorems related to matrix operations.

Similar threads

Back
Top