Basic properties The trace is a
linear mapping. That is, Furthermore, as noted in the above formula, . These demonstrate the positive-definiteness and symmetry required of an
inner product; it is common to call the
Frobenius inner product of and . This is a natural inner product on the
vector space of all real matrices of fixed dimensions. The
norm derived from this inner product is called the
Frobenius norm, and it satisfies a submultiplicative property, as can be proven with the
Cauchy–Schwarz inequality: 0 \leq \left[\operatorname{tr}(\mathbf{A} \mathbf{B})\right]^2 \leq \operatorname{tr}\left(\mathbf{A}^\mathsf{T} \mathbf{A}\right) \operatorname{tr}\left(\mathbf{B}^\mathsf{T} \mathbf{B}\right) , if and are real matrices such that is a square matrix. The Frobenius inner product and norm arise frequently in
matrix calculus and
statistics. The Frobenius inner product may be extended to a
hermitian inner product on the
complex vector space of all complex matrices of a fixed size, by replacing by its
complex conjugate. The symmetry of the Frobenius inner product may be phrased more directly as follows: the matrices in the trace of a product can be switched without changing the result. If and are and real or complex matrices, respectively, then This is notable both for the fact that does not usually equal , and also since the trace of either does not usually equal . The
similarity-invariance of the trace, meaning that for any square matrix and any invertible matrix of the same dimensions, is a fundamental consequence. This is proved by \operatorname{tr}\left(\mathbf{P}^{-1}(\mathbf{A}\mathbf{P})\right) = \operatorname{tr}\left((\mathbf{A} \mathbf{P})\mathbf{P}^{-1}\right) = \operatorname{tr}(\mathbf{A}). Similarity invariance is the crucial property of the trace in order to discuss traces of
linear transformations as below. Additionally, for real column vectors \mathbf{a}\in\mathbb{R}^n and \mathbf{b}\in\mathbb{R}^n, the trace of the outer product is equivalent to the inner product:
Cyclic property More generally, the trace is
invariant under circular shifts, that is, {{Equation box 1 This is known as the
cyclic property. Arbitrary permutations are not allowed: in general, \operatorname{tr}(\mathbf{A}\mathbf{B}\mathbf{C}) \ne \operatorname{tr}(\mathbf{A}\mathbf{C}\mathbf{B}) . However, if products of three
symmetric matrices are considered, any permutation is allowed, since: \operatorname{tr}(\mathbf{A}\mathbf{B}\mathbf{C}) = \operatorname{tr}\left(\left(\mathbf{A}\mathbf{B}\mathbf{C}\right)^{\mathsf T}\right) = \operatorname{tr}(\mathbf{C}\mathbf{B}\mathbf{A}) = \operatorname{tr}(\mathbf{A}\mathbf{C}\mathbf{B}), where the first equality is because the traces of a matrix and its transpose are equal. Note that this is not true in general for more than three factors.
Trace of a Kronecker product The trace of the
Kronecker product of two matrices is the product of their traces: \operatorname{tr}(\mathbf{A} \otimes \mathbf{B}) = \operatorname{tr}(\mathbf{A})\operatorname{tr}(\mathbf{B}).
Characterization of the trace The following three properties: \begin{align} \operatorname{tr}(\mathbf{A} + \mathbf{B}) &= \operatorname{tr}(\mathbf{A}) + \operatorname{tr}(\mathbf{B}), \\ \operatorname{tr}(c\mathbf{A}) &= c \operatorname{tr}(\mathbf{A}), \\ \operatorname{tr}(\mathbf{A}\mathbf{B}) &= \operatorname{tr}(\mathbf{B}\mathbf{A}), \end{align} characterize the trace
up to a scalar multiple; in other words: If f is a
linear functional on the space of square matrices that satisfies f(xy) = f(yx), then f and \operatorname{tr} are proportional. For n\times n matrices, imposing the normalization f(\mathbf{I}) = n makes f equal to the trace.
Trace as the sum of eigenvalues Given any matrix , there is {{Equation box 1 where are the
eigenvalues of counted with algebraic multiplicity. This holds true even if is a real matrix and some (or all) of the eigenvalues are complex numbers, or more generally over any field with eigenvalues taken in an
algebraic closure. The identity follows from the fact that is always
similar to its
Jordan form, an upper
triangular matrix having on the main diagonal, together with the similarity-invariance of the trace discussed above. In contrast, the
determinant of is the
product of its eigenvalues; that is, \det(\mathbf{A}) = \prod_i \lambda_i.
Trace of commutator When both and are matrices, the trace of the (ring-theoretic)
commutator of and vanishes: , because and is linear. One can state this as "the trace is a map of
Lie algebras from operators to scalars", as the commutator of scalars is trivial (it is an
Abelian Lie algebra). In particular, using similarity invariance, it follows that the identity matrix is never similar to the commutator of any pair of matrices. Conversely, any square matrix with zero trace is a linear combination of the commutators of pairs of matrices. Moreover, any square matrix with zero trace is
unitarily equivalent to a square matrix with diagonal consisting of all zeros.
Traces of special kinds of matrices {{bulleted list \operatorname{tr}\left(\mathbf{I}_n\right) = n This leads to
generalizations of dimension using trace. \begin{align} \mathbf{P}_\mathbf{X} &= \mathbf{X}\left(\mathbf{X}^\mathsf{T} \mathbf{X}\right)^{-1} \mathbf{X}^\mathsf{T} \\[3pt] \Longrightarrow \operatorname{tr}\left(\mathbf{P}_\mathbf{X}\right) &= \operatorname{tr}\left(\mathbf{X}^\mathsf{T}\mathbf{X}\left(\mathbf{X}^\mathsf{T} \mathbf{X}\right)^{-1}\right)=\operatorname{rank}(\mathbf{X}). \end{align} When the
characteristic of the base field is zero, the converse also holds: if for all , then is nilpotent. When the characteristic is positive, the identity in dimensions is a counterexample, as \operatorname{tr}\left(\mathbf{I}_n^k\right) = \operatorname{tr}\left(\mathbf{I}_n\right) = n \equiv 0, but the identity is not nilpotent. }}
Relationship to the characteristic polynomial The trace of an n \times n matrix A is the coefficient of t^{n-1} in the
characteristic polynomial, possibly changed of sign, according to the convention in the definition of the characteristic polynomial.
Derivative relationships If is a square matrix
with small entries and denotes the
identity matrix, then we have approximately \det(\mathbf{I}+\mathbf{a})\approx 1 + \operatorname{tr}(\mathbf{a}). Precisely this means that the trace is the
derivative of the
determinant function at the identity matrix.
Jacobi's formula d\det(\mathbf{A}) = \operatorname{tr} \big(\operatorname{adj}(\mathbf{A})\cdot d\mathbf{A}\big) is more general and describes the
differential of the determinant at an arbitrary square matrix, in terms of the trace and the
adjugate of the matrix. From this (or from the connection between the trace and the eigenvalues), one can derive a relation between the trace function, the
matrix exponential function, and the determinant:\det(\exp(\mathbf{A})) = \exp(\operatorname{tr}(\mathbf{A})). A related characterization of the trace applies to linear
vector fields. Given a matrix , define a vector field on by . The components of this vector field are linear functions (given by the rows of ). Its
divergence is a constant function, whose value is equal to . By the
divergence theorem, one can interpret this in terms of flows: if represents the velocity of a fluid at location and is a region in , the
net flow of the fluid out of is given by , where is the
volume of . The trace is a linear operator, hence it commutes with the derivative: d \operatorname{tr} (\mathbf{X}) = \operatorname{tr}(d\mathbf{X}) . == Trace of a linear operator ==