Trace   - properties and formulas -

Definition
- Definition
- Examples

Prpoperties
- Symmetry
- Cyclic property
- Linearity
Definition
  The trace of an $n \times n$ square matrix $A$ is the sum of the diagonal components of the matrix,
The trace of a square matrix
where $A_{ij}$ is $i$-th row and $j$-th column element of $A$.
Examples
Let $A$ be a squared matrix defined as
Example of trace of a matrix
The trace of $A$ is
Example of trace of a matrix
Let $B$ be a squared matrix defined as
Example of trace of a matrix
The trace of $A$ is
Example of trace of a matrix
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
symmetry of trace

Proof
  $AB$ is an $m \times m$ matrix. By the definition of trace, the trace of $AB$ is
Using the rule of matrix product, we have
then

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:
cyclic property of the trace
In other words, the trace is invariant under cyclic permutations
This property is called cyclic property of the trace.
Proof
  We use the symmetry of the trace. Using the symmetry of $A$ and $BC$, we have
Using the symmetry of $AB$ and $C$, we have
Therefore,

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

Proof
  By the definition of trace, we see that