Prove that for square matrices $tr(A\times B)=tr(A)tr(B).$

1.4k Views Asked by At

Prove that for square matrices $ A\,(m\times m) $ and $ B\,(n\times n) $, $tr(A\times B)=tr(A)tr(B).$

$tr(A)=\sum_{i=1}^ma_{ii}=a_{11}+a_{22}+...+a_{mm}$

$tr(B)=\sum_{i=1}^nb_{ii}=b_{11}+b_{22}+...+b_{nn}$

Since $A\times B$ has to be true, the matrices have to be the same size and $m=n$.

$A\times B=\sum_{k=1}^m a_{ik}b_{kj}=a_{i1}b_{1j}+...+a_{nm}b_{mn}$

I don't know if what I've done is correct so far and I'm not sure how to go on with solving the trace of $A\times B$.

2

There are 2 best solutions below

0
On BEST ANSWER

Suppose that $A$ is $m\times m$ with typical elements $A_{ij}$ and $B$ is $n\times n$ with typical elements $B_{hk}$. We have $$ A\otimes B=\begin{pmatrix} A_{11}B & A_{12}B & \cdots & A_{1m}B\\ A_{21}B & A_{22}B & \cdots & A_{2m}B \\ \vdots & \vdots & \ddots & \vdots \\ A_{m1}B & A_{m2}B & \cdots & A_{mm}B \end{pmatrix} $$ so the diagonal elements of $A\otimes B$ are $$ A_{11}B_{11},\ldots,A_{11}B_{nn},A_{22}B_{11},\ldots,A_{22}B_{nn},\ldots,A_{mm}B_{11},\ldots,A_{mm}B_{nn}. $$ Summing these yields \begin{align*} &\quad\operatorname{Tr}(A\otimes B)\\ &=A_{11}B_{11}+\cdots+A_{11}B_{nn}+A_{22}B_{11}+\cdots+A_{22}B_{nn}+\cdots+A_{mm}B_{11}+\cdots+A_{mm}B_{nn}\\ &=A_{11}(B_{11}+\cdots+B_{nn})+A_{22}(B_{11}+\cdots+B_{nn})+\cdots+A_{mm}(B_{11}+\cdots+B_{nn})\\ &=(A_{11}+\cdots+A_{mm})(B_{11}+\cdots+B_{nn})=\operatorname{Tr}(A)\operatorname{Tr}(B). \end{align*}

5
On

If you meant $\operatorname{tr}(A\times B)$ as $\operatorname{tr}(A\otimes B)$ then as @Sangchul Lee mentioned, we have:

$\displaystyle {\begin{bmatrix}a&b\\c&d\\\end{bmatrix}}\otimes {\begin{bmatrix}p&q\\r&s\\\end{bmatrix}}={\begin{bmatrix}a\cdot {\begin{bmatrix}p&q\\r&s\\\end{bmatrix}}&b\cdot {\begin{bmatrix}p&q\\r&s\\\end{bmatrix}}\\c\cdot {\begin{bmatrix}p&q\\r&s\\\end{bmatrix}}&d\cdot {\begin{bmatrix}p&q\\r&s\\\end{bmatrix}}\\\end{bmatrix}}={\begin{bmatrix}a\cdot p&a\cdot q&b\cdot p&b\cdot q\\a\cdot r&a\cdot s&b\cdot r&b\cdot s\\c\cdot p&c\cdot q&d\cdot p&d\cdot q\\c\cdot r&c\cdot s&d\cdot r&d\cdot s\\\end{bmatrix}}$

So we have:

$$(\operatorname{tr}A)(\operatorname{tr}B)=(a+d)(p+s)=a\cdot p+a \cdot s+d\cdot p+d\cdot s=\operatorname{tr}(A\otimes B)$$

Where $\otimes$ is the Kronecker Product and $\operatorname{tr}(.)$ is the trace of a matrix.


If you meant $\operatorname{tr}(A\times B)$ as $\operatorname{tr}(AB)$, which is a simple Matrix multiplication, then :

$\displaystyle {\begin{bmatrix}a&b\\c&d\\\end{bmatrix}} {\begin{bmatrix}p&q\\r&s\\\end{bmatrix}}={\begin{bmatrix}ap+br&aq+bs\\cp+dr&cq+ds\\\end{bmatrix}}$

So now we can see that:

$$(\operatorname{tr}A)(\operatorname{tr}B)=(a+d)(p+s)=a\cdot p+a \cdot s+d\cdot p+d\cdot s \ne a\cdot p+b\cdot r+c\cdot q+d\cdot s=\operatorname{tr}(AB)$$

You can follow the same methodology and it would be true for any $n\times n$ matrices.