The trace identity $\text{tr}((A+B)^2) = \text{tr}(A^2) + \text{tr}(B^2) + 2\text{tr}(AB)$

254 Views Asked by At

Prove that $$\text{tr}((A+B)^2) = \text{tr}(A^2) + \text{tr}(B^2) + 2\text{tr}(AB).$$ Else show a counterexample.

I've tried using the trace properties such as $$\text{tr}(A+B) = \text{tr}(A) + \text{tr}(B)$$ but I'm pretty stuck. Any guidance on how to tackle this problem? Thanks a ton!

4

There are 4 best solutions below

0
On

You should also use $\text{Tr}(AB)=\text{Tr}(BA)$ besides the linearity of trace.

0
On

Hints: Note that $(A+B)^2 = (A+B)(A+B) = A^2+AB+BA+B^2$.

Also, for matrices $A$ (of size $m \times n$) and $B$ (of size $n \times m$), $\text{tr}(AB) = \text{tr}(BA)$.

1
On

If $A = (a_{ij})_{1\leq i,j\leq n}\in \Bbb R^{n \times n}$, then by definition: $${\rm tr}(A) = \sum_{i=1}^na_{ii}.$$Call $B = (b_{ij})_{1 \leq i,j\leq n}\in \Bbb R^{n \times n}$ too. So: $${\rm tr}(A+B) = \sum_{i=1}^na_{ii}+b_{ii} = \sum_{i=1}^na_{ii}+\sum_{i=1}^nb_{ii} = {\rm tr}(A)+{\rm tr}(B).$$And from this: $$({\rm tr}(A+B))^2 = ({\rm tr}(A)+{\rm tr}(B))^2 = {\rm tr}(A)^2+{\rm tr}(B)^2 + 2 {\rm tr}(A){\rm tr}(B).$$ The point here is that not always ${\rm tr}(A){\rm tr}(B) = {\rm tr}(AB)$..

0
On

Solution: Note that $(A+B)^2 = (A+B)(A+B) = A^2+AB+BA+B^2. . . . (1)$

And Also $tr(AB)=tr(BA)....(2)$

So from (1) we have

$tr((A+B)^2)=tr(A^2)+tr(B^2)+tr(AB)+tr(BA)$

Now using (2) here, we have

$tr((A+B)^2)=tr(A^2)+tr(B^2)+2tr(AB)$