Definition

The trace of an $n \times n$ square matrix $A$ is the sum of the diagonal components of the matrix,
Examples

Let $A$ be a squared matrix defined as
Symmetry

The trace of the product of two matrices is equal to the trace of the product in which order is swapped.
Let $A$ and $B$ be an $m \times n$ and an
$n \times m$ matrix, respectively,
then
$AB$ is an $m \times m$ matrix. By the definition of trace, the trace of $AB$ is

Cyclic property

Let $A$, $B$, $C$
be
$m\times n$,
$n \times l$,
$l \times m$
matrix, respectively.
The trace of the product of three matrices is invariant even if the order of the products is cyclically changed:
We use the symmetry of the trace. Using the symmetry of $A$ and $BC$, we have

Linearity

Let $A$ and $B$ be square matrices and
$\alpha$ and $\beta$ be scalars.
The trace is linear: