Trace (linear algebra)
In linear algebra, the trace of a square matrix A, denoted tr(A), is defined as a sum of the elements on its main diagonal, a 11 + a 22 + ⋯ + a n n {\displaystyle a_{11}+a_{22}+\dots +a_{nn}} . It is only defined for a square matrix (n × n).