In linear algebra, the trace of an n-by-n square matrix A is defined to be the sum of the elements on the main diagonal (the diagonal from the upper left to the lower right) of A, i.e.,
where aii denotes the entry on the ith row and ith column of A. The trace of a matrix is the sum of the (complex) eigenvalues, and it is invariant with respect to a change of basis. This characterization can be used to define the trace of a linear operator in general. Note that the trace is only defined for a square matrix (i.e., n × n).
where aii denotes the entry on the ith row and ith column of A. The trace of a matrix is the sum of the (complex) eigenvalues, and it is invariant with respect to a change of basis. This characterization can be used to define the trace of a linear operator in general. Note that the trace is only defined for a square matrix (i.e., n × n).
Properties
Basic properties
The trace is a linear mapping. That is,
- .
for all square matrices A and B, and all scalars c.
A matrix and its transpose have the same trace:
- .
This follows immediately from the fact that transposing a square matrix does not affect elements along the main diagonal.
Trace of a product
The trace of a product can be rewritten as the sum of entry-wise products of elements:
- .
This means that the trace of a product of matrices functions similarly to a dot product of vectors. For this reason, generalizations of vector operations to matrices (e.g. in matrix calculus and statistics) often involve a trace of matrix products.
For real matrices, the trace of a product can also be written in the following forms:
|
|
|
|
The matrices in a trace of a product can be switched without changing the result: If A is an m × n matrix and B is an n × m matrix, then
- .[1]
More generally, the trace is invariant under cyclic permutations, i.e.,
- .
This is known as the cyclic property.
Note that arbitrary permutations are not allowed: in general,
- .
However, if products of three symmetric matrices are considered, any permutation is allowed. (Proof: tr(ABC) = tr(AT BT CT) = tr(AT(CB)T) = tr((CB)TAT) = tr((ACB)T) = tr(ACB), where the last equality is because the traces of a matrix and its transpose are equal.) For more than three factors this is not true.
Unlike the determinant, the trace of the product is not the product of traces, that is:
What is true is that the trace of the Kronecker product of two matrices is the product of their traces:
- .
Comments
Post a Comment