Answer
See answer below
Work Step by Step
Let $A=[a_{ij}]$ and $B=[a_{ij}]$.
A and B are both $n \times n$ matrices,
then $tr(AB)=\sum\limits_{k=1} (\sum\limits_{i=1} a_{ki}b_{ik})=\sum\limits_{k=1}(\sum\limits_{i=1} b_{ik} a_{ki})=\sum\limits_{i=1}(\sum\limits_{k=1} b_{ik} a_{ki})=tr(AB)$