Step 1

Let A and B are n×n matrices.

Consider the \(AB=\left[c_{ij}\right]_{n \times n}\) with , \(c_{ij}=\sum_{k=1}^n a_{ik}b_{kj}\)

Consider the \(BA=\left[d_{ij}\right]_{n \times n}\) with , \(d_{ij}=\sum_{k=1}^n b_{ik}a_{kj}\)

\(=\sum_{s=1}^n b_{is}a_{sj}\)

Step 2

Use the continuation for the above expression,

\(tr(AB)=\sum_{i=1}^n c_{ij}\)

\(\sum_{i=1}^n (\sum_{k=1}^n a_{ik}b_{ki})\)

Step 3

Evaluate the above expression by interchanging the order of summation,

\(tr(AB)=\sum_{i=1}^n (\sum_{s=1}^n a_{ks}b_{ks})\)

\(\sum_{k=1}^n d_{kk}\)

\(\sum_{i=1}^n d_{ii}\)

\(=tr(BA)\)

Hence proved tr(AB)=tr(BA).

Let A and B are n×n matrices.

Consider the \(AB=\left[c_{ij}\right]_{n \times n}\) with , \(c_{ij}=\sum_{k=1}^n a_{ik}b_{kj}\)

Consider the \(BA=\left[d_{ij}\right]_{n \times n}\) with , \(d_{ij}=\sum_{k=1}^n b_{ik}a_{kj}\)

\(=\sum_{s=1}^n b_{is}a_{sj}\)

Step 2

Use the continuation for the above expression,

\(tr(AB)=\sum_{i=1}^n c_{ij}\)

\(\sum_{i=1}^n (\sum_{k=1}^n a_{ik}b_{ki})\)

Step 3

Evaluate the above expression by interchanging the order of summation,

\(tr(AB)=\sum_{i=1}^n (\sum_{s=1}^n a_{ks}b_{ks})\)

\(\sum_{k=1}^n d_{kk}\)

\(\sum_{i=1}^n d_{ii}\)

\(=tr(BA)\)

Hence proved tr(AB)=tr(BA).