Pushoam said:
I was looking for something like this. The sum is 42.
So, is it true for any symmetric matrix?
How to prove it?
## Tr (A^2) = \Sigma_i (A^2)_{ii}
\\ (A^2)_{ii} = \Sigma_j (A_{ij} A_{ji)}##
For symmetric matrix, ## A_{ij} = A_{ji}##.
So, ## (A^2)_{ii} = \Sigma_j {(A_{ij} }^2
\\ Tr (A^2) = \Sigma_i \Sigma_j {(A_{ij} })^2##
Is this correct?
note: we are dealing in
reals for this post. Your approach is close, and maybe even correct, but I find it hard to follow.
My strong preference here is to block your matrix by column vectors.
Suppose you have some matrix ##\mathbf X##, partitioned by columns below
##\mathbf X = \bigg[\begin{array}{c|c|c|c|c}
\mathbf x_1 & \mathbf x_2 &\cdots & \mathbf x_{n-1} & \mathbf x_n\end{array}\bigg]##
to make the link with the traditional L2 norm for vectors, consider the vec operator
##
vec\big(\mathbf X\big) = \begin{bmatrix}
\mathbf x_1 \\
\mathbf x_2\\
\vdots \\
\mathbf x_{n-1}\\
\mathbf x_n
\end{bmatrix}##
which stacks each column of the matrix ##\mathbf X## on top of each other into one big vector. (The vec operator will show up again if and when you start dealing with Kronecker products.)
Our goal is to add up each squared component of ##\mathbf X## into a sum. do you understand why
##\big \Vert \mathbf X \big \Vert_F^2 = \sum_{j=1}^n\sum_{i=1}^n x_{i,j}^2 = trace\big(\mathbf X^T \mathbf X\big) = vec\big(\mathbf X\big)^Tvec\big(\mathbf X\big)= \big \Vert vec\big(\mathbf X\big) \big \Vert_2^2##
is true for any real matrix?
Now since ##\mathbf X## is symmetric, we have ##\mathbf X^T = \mathbf X## meaning that
##\big \Vert \mathbf X \big \Vert_F^2 = trace\big(\mathbf X^T \mathbf X\big) = trace\big(\mathbf X \mathbf X\big) = trace\big(\mathbf X^2\big)##
now you just need the fact that others mentioned, i.e. relating a trace of a matrix and its eigenvalues (or in this case the trace of a matrix to the second power gives sum of eigenvalues to second power).
Why is this fact true? (Hint: use characteristic polynomial, or if you prefer an easy but less general case: real symmetric matrices are diagonalizable -- do that and apply cyclic property of trace.)
Trace is absurdly useful, so its worth spending extra time understanding all the related details of this problem.