# Prove that $\operatorname{trace}(ABC) = \operatorname{trace}(BCA) = \operatorname{trace}(CAB)$ [closed]

Prove that $\operatorname{trace}(ABC) = \operatorname{trace}(BCA) = \operatorname{trace}(CAB)$ if $A,B,C$ matrices have the same size.

## closed as off-topic by user26857, mrp, John B, Daniel W. Farlow, Nick PetersonMar 3 '17 at 23:25

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – user26857, mrp, John B, Daniel W. Farlow, Nick Peterson
If this question can be reworded to fit the rules in the help center, please edit the question.

Is it already known that $\operatorname{Tr}(XY) = \operatorname{Tr}(YX)$ when $X$ and $Y$ are square matrices of the same size?

If it is, then simply set $X= AB$ and $Y = C$. It will give you $\operatorname{Tr}(ABC) = \operatorname{Tr}(CAB)$. You can get $\operatorname{Tr}(ABC) = \operatorname{Tr}(BCA)$ in a similar fashion.

• Thank's Dan. A proof is givnig above by A. Molendijk that $\text{tr}(AB) = \text{tr}(BA)$ for a $m \times n$ matrix $A$ and a $n \times m$ matrix $B$ – Mohamed Nov 29 '16 at 21:14

Hint

$$tr(ABC)=\sum_i (ABC)_{ii}=(ABC=A(BC))=\sum_i\sum_j A_{ij}(BC)_{ji}= \sum_i\sum_j\sum_k A_{ij}B_{jk}C_{ki};$$

now you can exchange the order of the matrices to arrive at the thesis as each of the $A_{ij}$, $B_{jk}$ and $C_{ki}$ are scalars (considering matrices over $\mathbb R$, for example). We arrive at

$$tr(ABC)=\sum_i\sum_j\sum_k A_{ij}B_{jk}C_{ki}=\sum_i\sum_j\sum_kB_{jk}C_{ki}A_{ij}=(BCA=(BC)A)=tr(BCA),$$

and so on.

• here I used the associativity of the product of matrices. – Avitus Nov 10 '13 at 11:20
• got it thanks :) – Wanderer Nov 10 '13 at 11:57
• you are welcome! Feel free to upvote it, if it was helpful. – Avitus Nov 10 '13 at 12:15

Hint: use the definition of trace.

$$\text{Tr}(ABC)=\sum_i\sum_j\sum_k A_{ij}B_{jk}C_{ki}.$$

I will help you by proving that $\text{tr}(AB) = \text{tr}(BA)$ for a $m \times n$ matrix $A$ and a $n \times m$ matrix $B$ first. Let $C = AB$ and $D = BA$. Then using the definition of matrix multiplication we find that $c_{ij} = \sum_{k=1}^{n} a_{ik}b_{kj}$ and $d_{ij} = \sum_{m=1}^{n} b_{im}a_{mj}$. Then,

\begin{align*} \text{tr}(C) & = \sum_{m = 1}^n c_{mm} \\ & = \sum_{m=1}^n\sum_{k=1}^na_{mk}b_{km} \\ & = \sum_{k=1}^n\sum_{m=1}^nb_{km}a_{mk} \\ & = \sum_{k=1}^nd_{kk} \\ & = \text{tr}(D). \end{align*} Now, for $ABC$ take $AB = A_1$ and $C = A_2$ and apply the idenity proven above.