\[\operatorname{tr}(\mathbf{A})=\sum_{i=1}^{n}a_{ii}.\]