HOME

TheInfoList



OR:

In
linear algebra Linear algebra is the branch of mathematics concerning linear equations such as :a_1x_1+\cdots +a_nx_n=b, linear maps such as :(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n, and their representations in vector spaces and through matrix (mathemat ...
, the trace of a
square matrix In mathematics, a square matrix is a Matrix (mathematics), matrix with the same number of rows and columns. An ''n''-by-''n'' matrix is known as a square matrix of order Any two square matrices of the same order can be added and multiplied. Squ ...
, denoted , is the sum of the elements on its
main diagonal In linear algebra, the main diagonal (sometimes principal diagonal, primary diagonal, leading diagonal, major diagonal, or good diagonal) of a matrix A is the list of entries a_ where i = j. All off-diagonal elements are zero in a diagonal matrix ...
, a_ + a_ + \dots + a_. It is only defined for a square matrix (). The trace of a matrix is the sum of its
eigenvalue In linear algebra, an eigenvector ( ) or characteristic vector is a vector that has its direction unchanged (or reversed) by a given linear transformation. More precisely, an eigenvector \mathbf v of a linear transformation T is scaled by a ...
s (counted with multiplicities). Also, for any matrices and of the same size. Thus,
similar matrices In linear algebra, two ''n''-by-''n'' matrices and are called similar if there exists an invertible ''n''-by-''n'' matrix such that B = P^ A P . Similar matrices represent the same linear map under two possibly different bases, with being ...
have the same trace. As a consequence, one can define the trace of a
linear operator In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pr ...
mapping a finite-dimensional
vector space In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
into itself, since all matrices describing such an operator with respect to a basis are similar. The trace is related to the derivative of the
determinant In mathematics, the determinant is a Scalar (mathematics), scalar-valued function (mathematics), function of the entries of a square matrix. The determinant of a matrix is commonly denoted , , or . Its value characterizes some properties of the ...
(see Jacobi's formula).


Definition

The trace of an
square matrix In mathematics, a square matrix is a Matrix (mathematics), matrix with the same number of rows and columns. An ''n''-by-''n'' matrix is known as a square matrix of order Any two square matrices of the same order can be added and multiplied. Squ ...
is defined as \operatorname(\mathbf) = \sum_^n a_ = a_ + a_ + \dots + a_ where denotes the entry on the row and column of . The entries of can be
real number In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s,
complex numbers In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the form a ...
, or more generally elements of a field . The trace is not defined for non-square matrices.


Example

Let be a matrix, with \mathbf = \begin a_ & a_ & a_ \\ a_ & a_ & a_ \\ a_ & a_ & a_ \end = \begin 1 & 0 & 3 \\ 11 & 5 & 2 \\ 6 & 12 & -5 \end Then \operatorname(\mathbf) = \sum_^ a_ = a_ + a_ + a_ = 1 + 5 + (-5) = 1


Properties


Basic properties

The trace is a
linear mapping In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a Map (mathematics), mapping V \to W between two vec ...
. That is, \begin \operatorname(\mathbf + \mathbf) &= \operatorname(\mathbf) + \operatorname(\mathbf) \\ \operatorname(c\mathbf) &= c \operatorname(\mathbf) \end for all square matrices and , and all scalars . A matrix and its
transpose In linear algebra, the transpose of a Matrix (mathematics), matrix is an operator which flips a matrix over its diagonal; that is, it switches the row and column indices of the matrix by producing another matrix, often denoted by (among other ...
have the same trace: \operatorname(\mathbf) = \operatorname\left(\mathbf^\mathsf\right). 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 square matrix which is the product of two matrices can be rewritten as the sum of entry-wise products of their elements, i.e. as the sum of all elements of their Hadamard product. Phrased directly, if and are two matrices, then: \operatorname\left(\mathbf^\mathsf\mathbf\right) = \operatorname\left(\mathbf\mathbf^\mathsf\right) = \operatorname\left(\mathbf^\mathsf\mathbf\right) = \operatorname\left(\mathbf\mathbf^\mathsf\right) = \sum_^m \sum_^n a_b_ \; . If one views any real matrix as a vector of length (an operation called vectorization) then the above operation on and coincides with the standard
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
. According to the above expression, is a sum of squares and hence is nonnegative, equal to zero if and only if is zero. Furthermore, as noted in the above formula, . These demonstrate the positive-definiteness and symmetry required of an
inner product In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, ofte ...
; it is common to call the Frobenius inner product of and . This is a natural inner product on the
vector space In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
of all real matrices of fixed dimensions. The norm derived from this inner product is called the
Frobenius norm In the field of mathematics, norms are defined for elements within a vector space. Specifically, when the vector space comprises matrices, such norms are referred to as matrix norms. Matrix norms differ from vector norms in that they must also ...
, and it satisfies a submultiplicative property, as can be proven with the
Cauchy–Schwarz inequality The Cauchy–Schwarz inequality (also called Cauchy–Bunyakovsky–Schwarz inequality) is an upper bound on the absolute value of the inner product between two vectors in an inner product space in terms of the product of the vector norms. It is ...
: 0 \leq \left operatorname(\mathbf \mathbf)\right2 \leq \operatorname\left(\mathbf^\mathsf \mathbf\right) \operatorname\left(\mathbf^\mathsf \mathbf\right) , if and are real matrices such that is a square matrix. The Frobenius inner product and norm arise frequently in
matrix calculus In mathematics, matrix calculus is a specialized notation for doing multivariable calculus, especially over spaces of matrix (mathematics), matrices. It collects the various partial derivatives of a single Function (mathematics), function with ...
and
statistics Statistics (from German language, German: ', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a s ...
. 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 In mathematics, the complex conjugate of a complex number is the number with an equal real part and an imaginary part equal in magnitude but opposite in sign. That is, if a and b are real numbers, then the complex conjugate of a + bi is a - ...
. 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, thenThis is immediate from the definition of the
matrix product In mathematics, specifically in linear algebra, matrix multiplication is a binary operation that produces a matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the s ...
: \operatorname(\mathbf\mathbf) = \sum_^m \left(\mathbf\mathbf\right)_ = \sum_^m \sum_^n a_ b_ = \sum_^n \sum_^m b_ a_ = \sum_^n \left(\mathbf\mathbf\right)_ = \operatorname(\mathbf\mathbf).
This is notable both for the fact that does not usually equal , and also since the trace of either does not usually equal .For example, if \mathbf = \begin 0 & 1 \\ 0 & 0 \end,\quad \mathbf = \begin 0 & 0 \\ 1 & 0 \end, then the product is \mathbf = \begin 1 & 0 \\ 0 & 0 \end, and the traces are . 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\left(\mathbf^(\mathbf\mathbf)\right) = \operatorname\left((\mathbf \mathbf)\mathbf^\right) = \operatorname(\mathbf). Similarity invariance is the crucial property of the trace in order to discuss traces of
linear transformation In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pr ...
s as below. Additionally, for real column vectors \mathbf\in\mathbb^n and \mathbf\in\mathbb^n, the trace of the outer product is equivalent to the inner product:


Cyclic property

More generally, the trace is ''invariant under
circular shift In combinatorial mathematics, a circular shift is the operation of rearranging the entries in a tuple, either by moving the final entry to the first position, while shifting all other entries to the next position, or by performing the inverse ope ...
s'', that is, This is known as the ''cyclic property''. Arbitrary permutations are not allowed: in general, \operatorname(\mathbf\mathbf\mathbf\mathbf) \ne \operatorname(\mathbf\mathbf\mathbf\mathbf) ~. However, if products of ''three''
symmetric Symmetry () in everyday life refers to a sense of harmonious and beautiful proportion and balance. In mathematics, the term has a more precise definition and is usually used to refer to an object that is invariant under some transformations ...
matrices are considered, any permutation is allowed, since: \operatorname(\mathbf\mathbf\mathbf) = \operatorname\left(\left(\mathbf\mathbf\mathbf\right)^\right) = \operatorname(\mathbf\mathbf\mathbf) = \operatorname(\mathbf\mathbf\mathbf), 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 In mathematics, the Kronecker product, sometimes denoted by ⊗, is an operation on two matrices of arbitrary size resulting in a block matrix. It is a specialization of the tensor product (which is denoted by the same symbol) from vector ...
of two matrices is the product of their traces: \operatorname(\mathbf \otimes \mathbf) = \operatorname(\mathbf)\operatorname(\mathbf).


Characterization of the trace

The following three properties: \begin \operatorname(\mathbf + \mathbf) &= \operatorname(\mathbf) + \operatorname(\mathbf), \\ \operatorname(c\mathbf) &= c \operatorname(\mathbf), \\ \operatorname(\mathbf\mathbf) &= \operatorname(\mathbf\mathbf), \end characterize the trace
up to Two Mathematical object, mathematical objects and are called "equal up to an equivalence relation " * if and are related by , that is, * if holds, that is, * if the equivalence classes of and with respect to are equal. This figure of speech ...
a scalar multiple in the following sense: If f is a
linear functional In mathematics, a linear form (also known as a linear functional, a one-form, or a covector) is a linear mapIn some texts the roles are reversed and vectors are defined as linear maps from covectors to scalars from a vector space to its field of ...
on the space of square matrices that satisfies f(xy) = f(yx), then f and \operatorname are proportional.Proof: Let e_ the standard basis and note that f\left(e_\right) = f\left(e_ e_^\top\right) = f\left(e_i e_1^\top e_1 e_j^\top\right) = f\left(e_1 e_j^\top e_i e_1^\top\right) = f\left(0\right) = 0 if i \neq j and f\left(e_\right) = f\left(e_\right) f(\mathbf) = \sum_ mathbf f\left(e_\right) = \sum_i mathbf f\left(e_\right) = f\left(e_\right) \operatorname(\mathbf). More abstractly, this corresponds to the decomposition \mathfrak_n = \mathfrak_n \oplus k, as \operatorname(AB) = \operatorname(BA) (equivalently, \operatorname( , B = 0) defines the trace on \mathfrak_n, which has complement the scalar matrices, and leaves one degree of freedom: any such map is determined by its value on scalars, which is one scalar parameter and hence all are multiple of the trace, a nonzero such map. For n\times n matrices, imposing the normalization f(\mathbf) = n makes f equal to the trace.


Trace as the sum of eigenvalues

Given any matrix , there is where are the
eigenvalue In linear algebra, an eigenvector ( ) or characteristic vector is a vector that has its direction unchanged (or reversed) by a given linear transformation. More precisely, an eigenvector \mathbf v of a linear transformation T is scaled by a ...
s of counted with multiplicity. This holds true even if is a real matrix and some (or all) of the eigenvalues are complex numbers. This may be regarded as a consequence of the existence of the
Jordan canonical form \begin \lambda_1 1\hphantom\hphantom\\ \hphantom\lambda_1 1\hphantom\\ \hphantom\lambda_1\hphantom\\ \hphantom\lambda_2 1\hphantom\hphantom\\ \hphantom\hphantom\lambda_2\hphantom\\ \hphantom\lambda_3\hphantom\\ \hphantom\ddots\hphantom\\ ...
, together with the similarity-invariance of the trace discussed above.


Trace of commutator

When both and are matrices, the trace of the (ring-theoretic)
commutator In mathematics, the commutator gives an indication of the extent to which a certain binary operation fails to be commutative. There are different definitions used in group theory and ring theory. Group theory The commutator of two elements, ...
of and vanishes: , because and is linear. One can state this as "the trace is a map of
Lie algebras In mathematics, a Lie algebra (pronounced ) is a vector space \mathfrak g together with an operation called the Lie bracket, an alternating bilinear map \mathfrak g \times \mathfrak g \rightarrow \mathfrak g, that satisfies the Jacobi identi ...
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.Proof: \mathfrak_n is a
semisimple Lie algebra In mathematics, a Lie algebra is semisimple if it is a direct sum of modules, direct sum of Simple Lie algebra, simple Lie algebras. (A simple Lie algebra is a non-abelian Lie algebra without any non-zero proper Lie algebra#Subalgebras.2C ideals ...
and thus every element in it is a linear combination of commutators of some pairs of elements, otherwise the derived algebra would be a proper ideal.
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


Relationship to the characteristic polynomial

The trace of an n \times n matrix A is the coefficient of t^ in the
characteristic polynomial In linear algebra, the characteristic polynomial of a square matrix is a polynomial which is invariant under matrix similarity and has the eigenvalues as roots. It has the determinant and the trace of the matrix among its coefficients. The ...
, possibly changed of sign, according to the convention in the definition of the characteristic polynomial.


Relationship to eigenvalues

If is a linear operator represented by a square matrix with real or
complex Complex commonly refers to: * Complexity, the behaviour of a system whose components interact in multiple ways so possible interactions are difficult to describe ** Complex system, a system composed of many components which may interact with each ...
entries and if are the
eigenvalue In linear algebra, an eigenvector ( ) or characteristic vector is a vector that has its direction unchanged (or reversed) by a given linear transformation. More precisely, an eigenvector \mathbf v of a linear transformation T is scaled by a ...
s of (listed according to their algebraic multiplicities), then This follows from the fact that is always similar to its Jordan form, an upper
triangular matrix In mathematics, a triangular matrix is a special kind of square matrix. A square matrix is called if all the entries ''above'' the main diagonal are zero. Similarly, a square matrix is called if all the entries ''below'' the main diagonal are z ...
having on the main diagonal. In contrast, the
determinant In mathematics, the determinant is a Scalar (mathematics), scalar-valued function (mathematics), function of the entries of a square matrix. The determinant of a matrix is commonly denoted , , or . Its value characterizes some properties of the ...
of is the ''product'' of its eigenvalues; that is, \det(\mathbf) = \prod_i \lambda_i. Everything in the present section applies as well to any square matrix with coefficients in an
algebraically closed field In mathematics, a field is algebraically closed if every non-constant polynomial in (the univariate polynomial ring with coefficients in ) has a root in . In other words, a field is algebraically closed if the fundamental theorem of algebra ...
.


Derivative relationships

If is a square matrix with small entries and denotes the
identity matrix In linear algebra, the identity matrix of size n is the n\times n square matrix with ones on the main diagonal and zeros elsewhere. It has unique properties, for example when the identity matrix represents a geometric transformation, the obje ...
, then we have approximately \det(\mathbf+\mathbf)\approx 1 + \operatorname(\mathbf). Precisely this means that the trace is the
derivative In mathematics, the derivative is a fundamental tool that quantifies the sensitivity to change of a function's output with respect to its input. The derivative of a function of a single variable at a chosen input value, when it exists, is t ...
of the
determinant In mathematics, the determinant is a Scalar (mathematics), scalar-valued function (mathematics), function of the entries of a square matrix. The determinant of a matrix is commonly denoted , , or . Its value characterizes some properties of the ...
function at the identity matrix. Jacobi's formula d\det(\mathbf) = \operatorname \big(\operatorname(\mathbf)\cdot d\mathbf\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 In mathematics, the matrix exponential is a matrix function on square matrix, square matrices analogous to the ordinary exponential function. It is used to solve systems of linear differential equations. In the theory of Lie groups, the matrix exp ...
function, and the determinant:\det(\exp(\mathbf)) = \exp(\operatorname(\mathbf)). A related characterization of the trace applies to linear
vector field In vector calculus and physics, a vector field is an assignment of a vector to each point in a space, most commonly Euclidean space \mathbb^n. A vector field on a plane can be visualized as a collection of arrows with given magnitudes and dire ...
s. 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 In vector calculus, divergence is a vector operator that operates on a vector field, producing a scalar field giving the rate that the vector field alters the volume in an infinitesimal neighborhood of each point. (In 2D this "volume" refers to ...
is a constant function, whose value is equal to . By the
divergence theorem In vector calculus, the divergence theorem, also known as Gauss's theorem or Ostrogradsky's theorem, reprinted in is a theorem relating the '' flux'' of a vector field through a closed surface to the ''divergence'' of the field in the volume ...
, 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 Volume is a measure of regions in three-dimensional space. It is often quantified numerically using SI derived units (such as the cubic metre and litre) or by various imperial or US customary units (such as the gallon, quart, cubic inch) ...
of . The trace is a linear operator, hence it commutes with the derivative: d \operatorname (\mathbf) = \operatorname(d\mathbf) .


Trace of a linear operator

In general, given some linear map (where is a finite- dimensional
vector space In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
), we can define the trace of this map by considering the trace of a matrix representation of , that is, choosing a basis for and describing as a matrix relative to this basis, and taking the trace of this square matrix. The result will not depend on the basis chosen, since different bases will give rise to
similar matrices In linear algebra, two ''n''-by-''n'' matrices and are called similar if there exists an invertible ''n''-by-''n'' matrix such that B = P^ A P . Similar matrices represent the same linear map under two possibly different bases, with being ...
, allowing for the possibility of a basis-independent definition for the trace of a linear map. Such a definition can be given using the
canonical isomorphism In mathematics, an isomorphism is a structure-preserving mapping or morphism between two structures of the same type that can be reversed by an inverse mapping. Two mathematical structures are isomorphic if an isomorphism exists between them ...
between the space of linear maps on and , where is the
dual space In mathematics, any vector space ''V'' has a corresponding dual vector space (or just dual space for short) consisting of all linear forms on ''V,'' together with the vector space structure of pointwise addition and scalar multiplication by cons ...
of . Let be in and let be in . Then the trace of the indecomposable element is defined to be ; the trace of a general element is defined by linearity. The trace of a linear map can then be defined as the trace, in the above sense, of the element of corresponding to ''f'' under the above mentioned canonical isomorphism. Using an explicit basis for and the corresponding dual basis for , one can show that this gives the same definition of the trace as given above.


Numerical algorithms


Stochastic estimator

The trace can be estimated unbiasedly by "Hutchinson's trick":
Given any matrix \boldsymbol W\in \R^, and any random \boldsymbol u\in \R^n with \mathbb E boldsymbol u\boldsymbol u^\intercal= \mathbf I, we have \mathbb E boldsymbol u^\intercal\boldsymbol W\boldsymbol u = \operatorname\boldsymbol W.
For a proof expand the expectation directly. Usually, the random vector is sampled from \operatorname N(\mathbf 0,\mathbf I) (normal distribution) or \^n ( Rademacher distribution). More sophisticated stochastic estimators of trace have been developed.


Applications

If a 2 x 2 real matrix has zero trace, its square is a
diagonal matrix In linear algebra, a diagonal matrix is a matrix in which the entries outside the main diagonal are all zero; the term usually refers to square matrices. Elements of the main diagonal can either be zero or nonzero. An example of a 2×2 diagon ...
. The trace of a 2 × 2 complex matrix is used to classify
Möbius transformation In geometry and complex analysis, a Möbius transformation of the complex plane is a rational function of the form f(z) = \frac of one complex number, complex variable ; here the coefficients , , , are complex numbers satisfying . Geometrically ...
s. First, the matrix is normalized to make its
determinant In mathematics, the determinant is a Scalar (mathematics), scalar-valued function (mathematics), function of the entries of a square matrix. The determinant of a matrix is commonly denoted , , or . Its value characterizes some properties of the ...
equal to one. Then, if the square of the trace is 4, the corresponding transformation is ''parabolic''. If the square is in the interval , it is ''elliptic''. Finally, if the square is greater than 4, the transformation is ''loxodromic''. See classification of Möbius transformations. The trace is used to define characters of
group representation In the mathematical field of representation theory, group representations describe abstract groups in terms of bijective linear transformations of a vector space to itself (i.e. vector space automorphisms); in particular, they can be used ...
s. Two representations of a group are equivalent (up to change of basis on ) if for all . The trace also plays a central role in the distribution of
quadratic forms In mathematics, a quadratic form is a polynomial with terms all of degree two (" form" is another name for a homogeneous polynomial). For example, 4x^2 + 2xy - 3y^2 is a quadratic form in the variables and . The coefficients usually belong to ...
.


Lie algebra

The trace is a map of Lie algebras \operatorname:\mathfrak_n\to K from the Lie algebra \mathfrak_n of linear operators on an -dimensional space ( matrices with entries in K) to the Lie algebra of scalars; as is Abelian (the Lie bracket vanishes), the fact that this is a map of Lie algebras is exactly the statement that the trace of a bracket vanishes: \operatorname( mathbf, \mathbf = 0 \text\mathbf A,\mathbf B\in\mathfrak_n. The kernel of this map, a matrix whose trace is
zero 0 (zero) is a number representing an empty quantity. Adding (or subtracting) 0 to any number leaves that number unchanged; in mathematical terminology, 0 is the additive identity of the integers, rational numbers, real numbers, and compl ...
, is often said to be or , and these matrices form the simple Lie algebra \mathfrak_n, which is the
Lie algebra In mathematics, a Lie algebra (pronounced ) is a vector space \mathfrak g together with an operation called the Lie bracket, an alternating bilinear map \mathfrak g \times \mathfrak g \rightarrow \mathfrak g, that satisfies the Jacobi ident ...
of the
special linear group In mathematics, the special linear group \operatorname(n,R) of degree n over a commutative ring R is the set of n\times n Matrix (mathematics), matrices with determinant 1, with the group operations of ordinary matrix multiplication and matrix ...
of matrices with determinant 1. The special linear group consists of the matrices which do not change volume, while the special linear Lie algebra is the matrices which do not alter volume of ''infinitesimal'' sets. In fact, there is an internal
direct sum The direct sum is an operation between structures in abstract algebra, a branch of mathematics. It is defined differently but analogously for different kinds of structures. As an example, the direct sum of two abelian groups A and B is anothe ...
decomposition \mathfrak_n = \mathfrak_n \oplus K of operators/matrices into traceless operators/matrices and scalars operators/matrices. The projection map onto scalar operators can be expressed in terms of the trace, concretely as: \mathbf \mapsto \frac\operatorname(\mathbf)\mathbf. Formally, one can compose the trace (the counit map) with the unit map K\to\mathfrak_n of "inclusion of
scalars Scalar may refer to: *Scalar (mathematics), an element of a field, which is used to define a vector space, usually the field of real numbers *Scalar (physics), a physical quantity that can be described by a single element of a number field such a ...
" to obtain a map \mathfrak_n\to\mathfrak_n mapping onto scalars, and multiplying by . Dividing by makes this a projection, yielding the formula above. In terms of
short exact sequence In mathematics, an exact sequence is a sequence of morphisms between objects (for example, Group (mathematics), groups, Ring (mathematics), rings, Module (mathematics), modules, and, more generally, objects of an abelian category) such that the Im ...
s, one has 0 \to \mathfrak_n \to \mathfrak_n \overset K \to 0 which is analogous to 1 \to \operatorname_n \to \operatorname_n \overset K^* \to 1 (where K^*=K\setminus\) for
Lie group In mathematics, a Lie group (pronounced ) is a group (mathematics), group that is also a differentiable manifold, such that group multiplication and taking inverses are both differentiable. A manifold is a space that locally resembles Eucli ...
s. However, the trace splits naturally (via 1/n times scalars) so \mathfrak_n=\mathfrak_n\oplus K, but the splitting of the determinant would be as the th root times scalars, and this does not in general define a function, so the determinant does not split and the
general linear group In mathematics, the general linear group of degree n is the set of n\times n invertible matrices, together with the operation of ordinary matrix multiplication. This forms a group, because the product of two invertible matrices is again inve ...
does not decompose: \operatorname_n \neq \operatorname_n \times K^*.


Bilinear forms

The
bilinear form In mathematics, a bilinear form is a bilinear map on a vector space (the elements of which are called '' vectors'') over a field ''K'' (the elements of which are called '' scalars''). In other words, a bilinear form is a function that is linea ...
(where , are square matrices) B(\mathbf, \mathbf) = \operatorname(\operatorname(\mathbf)\operatorname(\mathbf)) : where \operatorname(\mathbf)\mathbf = mathbf, \mathbf= \mathbf\mathbf - \mathbf\mathbf : and for orientation, if \operatorname \mathbf \ne 0 :: then \operatorname(\mathbf) = \mathbf - \mathbf\mathbf\mathbf^ ~. B(\mathbf, \mathbf) is called the
Killing form In mathematics, the Killing form, named after Wilhelm Killing, is a symmetric bilinear form that plays a basic role in the theories of Lie groups and Lie algebras. Cartan's criteria (criterion of solvability and criterion of semisimplicity) sho ...
; it is used to classify
Lie algebra In mathematics, a Lie algebra (pronounced ) is a vector space \mathfrak g together with an operation called the Lie bracket, an alternating bilinear map \mathfrak g \times \mathfrak g \rightarrow \mathfrak g, that satisfies the Jacobi ident ...
s. The trace defines a bilinear form: (\mathbf, \mathbf) \mapsto \operatorname(\mathbf\mathbf) ~. The form is symmetric, non-degenerateThis follows from the fact that
if and only if In logic and related fields such as mathematics and philosophy, "if and only if" (often shortened as "iff") is paraphrased by the biconditional, a logical connective between statements. The biconditional is true in two cases, where either bo ...
.
and associative in the sense that: \operatorname(\mathbf mathbf, \mathbf = \operatorname( mathbf, \mathbfmathbf). For a complex simple Lie algebra (such as ), every such bilinear form is proportional to each other; in particular, to the Killing form. Two matrices and are said to be ''trace orthogonal'' if \operatorname(\mathbf\mathbf) = 0. There is a generalization to a general representation (\rho,\mathfrak,V) of a Lie algebra \mathfrak, such that \rho is a homomorphism of Lie algebras \rho: \mathfrak \rightarrow \text(V). The trace form \text_V on \text(V) is defined as above. The bilinear form \phi(\mathbf,\mathbf) = \text_V(\rho(\mathbf)\rho(\mathbf)) is symmetric and invariant due to cyclicity.


Generalizations

The concept of trace of a matrix is generalized to the
trace class In mathematics, specifically functional analysis, a trace-class operator is a linear operator for which a trace may be defined, such that the trace is a finite number independent of the choice of basis used to compute the trace. This trace of tra ...
of
compact operator In functional analysis, a branch of mathematics, a compact operator is a linear operator T: X \to Y, where X,Y are normed vector spaces, with the property that T maps bounded subsets of X to relatively compact subsets of Y (subsets with compact ...
s on
Hilbert space In mathematics, a Hilbert space is a real number, real or complex number, complex inner product space that is also a complete metric space with respect to the metric induced by the inner product. It generalizes the notion of Euclidean space. The ...
s, and the analog of the
Frobenius norm In the field of mathematics, norms are defined for elements within a vector space. Specifically, when the vector space comprises matrices, such norms are referred to as matrix norms. Matrix norms differ from vector norms in that they must also ...
is called the Hilbert–Schmidt norm. If K is a trace-class operator, then for any
orthonormal basis In mathematics, particularly linear algebra, an orthonormal basis for an inner product space V with finite Dimension (linear algebra), dimension is a Basis (linear algebra), basis for V whose vectors are orthonormal, that is, they are all unit vec ...
\_, the trace is given by \operatorname(K) = \sum_n \left\langle e_n, Ke_n \right\rangle, and is finite and independent of the orthonormal basis. The
partial trace In linear algebra and functional analysis, the partial trace is a generalization of the trace (linear algebra), trace. Whereas the trace is a scalar (mathematics), scalar-valued function on operators, the partial trace is an operator (mathemati ...
is another generalization of the trace that is operator-valued. The trace of a linear operator Z which lives on a product space A\otimes B is equal to the partial traces over A and B: \operatorname(Z) = \operatorname_A \left(\operatorname_B(Z)\right) = \operatorname_B \left(\operatorname_A(Z)\right). For more properties and a generalization of the partial trace, see traced monoidal categories. If A is a general
associative algebra In mathematics, an associative algebra ''A'' over a commutative ring (often a field) ''K'' is a ring ''A'' together with a ring homomorphism from ''K'' into the center of ''A''. This is thus an algebraic structure with an addition, a mult ...
over a field k, then a trace on A is often defined to be any functional \operatorname:A\to k which vanishes on commutators; \operatorname( ,b=0 for all a,b\in A. Such a trace is not uniquely defined; it can always at least be modified by multiplication by a nonzero scalar. A supertrace is the generalization of a trace to the setting of
superalgebra In mathematics and theoretical physics, a superalgebra is a Z2-graded algebra. That is, it is an algebra over a commutative ring or field with a decomposition into "even" and "odd" pieces and a multiplication operator that respects the grading. T ...
s. The operation of tensor contraction generalizes the trace to arbitrary tensors. Gomme and Klein (2011) define a matrix trace operator \operatorname that operates on
block matrices In mathematics, a block matrix or a partitioned matrix is a matrix that is interpreted as having been broken into sections called blocks or submatrices. Intuitively, a matrix interpreted as a block matrix can be visualized as the original matrix w ...
and use it to compute second-order perturbation solutions to dynamic economic models without the need for tensor notation.


Traces in the language of tensor products

Given a vector space , there is a natural bilinear map given by sending to the scalar . The
universal property In mathematics, more specifically in category theory, a universal property is a property that characterizes up to an isomorphism the result of some constructions. Thus, universal properties can be used for defining some objects independently fro ...
of the
tensor product In mathematics, the tensor product V \otimes W of two vector spaces V and W (over the same field) is a vector space to which is associated a bilinear map V\times W \rightarrow V\otimes W that maps a pair (v,w),\ v\in V, w\in W to an element of ...
automatically implies that this bilinear map is induced by a linear functional on . Similarly, there is a natural bilinear map given by sending to the linear map . The universal property of the tensor product, just as used previously, says that this bilinear map is induced by a linear map . If is finite-dimensional, then this linear map is a
linear isomorphism In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pr ...
. This fundamental fact is a straightforward consequence of the existence of a (finite) basis of , and can also be phrased as saying that any linear map can be written as the sum of (finitely many) rank-one linear maps. Composing the inverse of the isomorphism with the linear functional obtained above results in a linear functional on . This linear functional is exactly the same as the trace. Using the definition of trace as the sum of diagonal elements, the matrix formula is straightforward to prove, and was given above. In the present perspective, one is considering linear maps and , and viewing them as sums of rank-one maps, so that there are linear functionals and and nonzero vectors and such that and for any in . Then :(S\circ T)(u)=\sum_i\varphi_i\left(\sum_j\psi_j(u)w_j\right)v_i=\sum_i\sum_j\psi_j(u)\varphi_i(w_j)v_i for any in . The rank-one linear map has trace and so :\operatorname(S\circ T)=\sum_i\sum_j\psi_j(v_i)\varphi_i(w_j)=\sum_j\sum_i\varphi_i(w_j)\psi_j(v_i). Following the same procedure with and reversed, one finds exactly the same formula, proving that equals . The above proof can be regarded as being based upon tensor products, given that the fundamental identity of with is equivalent to the expressibility of any linear map as the sum of rank-one linear maps. As such, the proof may be written in the notation of tensor products. Then one may consider the multilinear map given by sending to . Further composition with the trace map then results in , and this is unchanged if one were to have started with instead. One may also consider the bilinear map given by sending to the composition , which is then induced by a linear map . It can be seen that this coincides with the linear map . The established symmetry upon composition with the trace map then establishes the equality of the two traces. For any finite dimensional vector space , there is a natural linear map ; in the language of linear maps, it assigns to a scalar the linear map . Sometimes this is called ''coevaluation map'', and the trace is called ''evaluation map''. These structures can be axiomatized to define categorical traces in the abstract setting of category theory.


See also

* Scalar curvature#Definition, Trace of a tensor with respect to a metric tensor * Characteristic function (probability theory)#Matrix-valued random variables, Characteristic function * Field trace * Golden–Thompson inequality * Singular trace * Specht's theorem * Trace class * Trace identity * Trace inequalities * von Neumann's trace inequality


Notes


References

* * *


External links

* {{DEFAULTSORT:Trace (Linear Algebra) Linear algebra Matrix theory Trace theory