Definition of trace of a matrix
Definition: The trace of a square matrix $A$ is the sum of its diagonal entries: $\text{tr}(A) = \sum_i a_{ii}$. Equivalently, the trace equals the sum of eigenvalues (counted with multiplicity). Properties: $\text{tr}(A+B) = \text{tr}(A) + \text{tr}(B)$, $\text{tr}(AB) = \text{tr}(BA)$, $\text{tr}(A^T) = \text{tr}(A)$.