Trace of matrix for square matrix
The trace of a square matrix is the sum of the diagonal elements, \(tr(\mathbf{A}) = \sum_j a_{jj}\).
Properties
\[tr(c\mathbf{A}) = c\; tr(\mathbf{A})\]
\[tr(\mathbf{A}\pm \mathbf{B}) = tr(\mathbf{A})\pm tr(\mathbf{B})\]
\[tr(\mathbf{AB}) = tr(\mathbf{BA})\]