# Trace of a square matrix

The sum of the entries on the main diagonal of this matrix. The trace of a matrix $A = [a_{ij}]$ is denoted by $\tr A$, $\Tr A$ or $\Sp A$: $$\tr A = \sum_{i=0}^n a_{ii}$$ Let $A$ be a square matrix of order $n$ over a field $k$. The trace of $A$ coincides with the sum of the roots of the characteristic polynomial of $A$. If $k$ is a field of characteristic 0, then the $n$ traces $\tr A, \ldots \tr A^n$ uniquely determine the characteristic polynomial of $A$. In particular, $A$ is nilpotent if and only if $\tr A^m = 0$ for all $m=1,\ldots,n$.
If $A$ and $B$ are square matrices of the same order over $k$, and $\alpha,\beta \in k$, then $$\tr(\alpha A + \beta B) = \alpha \tr A + \beta \tr B, \quad \tr AB = \tr BA,$$ while if $\det B \neq 0$, $$\tr(BAB^{-1}) = \tr A.$$ The trace of the tensor (Kronecker) product of square matrices over a field is equal to the product of the traces of the factors.