Trace (linear algebra)




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.,


tr⁡(A)=∑i=1naii=a11+a22+⋯+ann{displaystyle operatorname {tr} (A)=sum _{i=1}^{n}a_{ii}=a_{11}+a_{22}+dots +a_{nn}}{displaystyle operatorname {tr} (A)=sum _{i=1}^{n}a_{ii}=a_{11}+a_{22}+dots +a_{nn}}

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).


The trace (often abbreviated to tr) is related to the derivative of the determinant (see Jacobi's formula).




Contents






  • 1 Example


  • 2 Properties


    • 2.1 Basic properties


    • 2.2 Trace of a product


    • 2.3 Other properties




  • 3 Exponential trace


  • 4 Trace of a linear operator


    • 4.1 Eigenvalue relationships


    • 4.2 Derivatives




  • 5 Applications


  • 6 Lie algebra


    • 6.1 Bilinear forms




  • 7 Inner product


  • 8 Generalizations


  • 9 Coordinate-free definition


    • 9.1 Dual




  • 10 See also


  • 11 Notes


  • 12 External links





Example


Let A be a matrix, with


A=(a11a12a13a21a22a23a31a32a33)=(−1031152612−5).{displaystyle A={begin{pmatrix}a_{11}&a_{12}&a_{13}\a_{21}&a_{22}&a_{23}\a_{31}&a_{32}&a_{33}end{pmatrix}}={begin{pmatrix}-1&0&3\11&5&2\6&12&-5end{pmatrix}}.}{displaystyle A={begin{pmatrix}a_{11}&a_{12}&a_{13}\a_{21}&a_{22}&a_{23}\a_{31}&a_{32}&a_{33}end{pmatrix}}={begin{pmatrix}-1&0&3\11&5&2\6&12&-5end{pmatrix}}.}

Then


tr⁡(A)=∑i=13aii=a11+a22+a33=−1+5+−5=−1.{displaystyle operatorname {tr} (A)=sum _{i=1}^{3}a_{ii}=a_{11}+a_{22}+a_{33}=-1+5+-5=-1.}{displaystyle operatorname {tr} (A)=sum _{i=1}^{3}a_{ii}=a_{11}+a_{22}+a_{33}=-1+5+-5=-1.}


Properties



Basic properties


The trace is a linear mapping. That is,


tr⁡(A+B)=tr⁡(A)+tr⁡(B)tr⁡(cA)=ctr⁡(A).{displaystyle {begin{aligned}operatorname {tr} (A+B)&=operatorname {tr} (A)+operatorname {tr} (B)\operatorname {tr} (cA)&=coperatorname {tr} (A).end{aligned}}}{displaystyle {begin{aligned}operatorname {tr} (A+B)&=operatorname {tr} (A)+operatorname {tr} (B)\operatorname {tr} (cA)&=coperatorname {tr} (A).end{aligned}}}

for all square matrices A and B, and all scalars c.


A matrix and its transpose have the same trace:


tr⁡(A)=tr⁡(AT).{displaystyle operatorname {tr} (A)=operatorname {tr} left(A^{textsf {T}}right).}{displaystyle operatorname {tr} (A)=operatorname {tr} left(A^{textsf {T}}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 product can be rewritten as the sum of entry-wise products of elements:


tr⁡(XTY)=tr⁡(XYT)=tr⁡(YTX)=tr⁡(YXT)=∑i,jXijYij.{displaystyle operatorname {tr} left(X^{textsf {T}}Yright)=operatorname {tr} left(XY^{textsf {T}}right)=operatorname {tr} left(Y^{textsf {T}}Xright)=operatorname {tr} left(YX^{textsf {T}}right)=sum _{i,j}X_{ij}Y_{ij}.}{displaystyle operatorname {tr} left(X^{textsf {T}}Yright)=operatorname {tr} left(XY^{textsf {T}}right)=operatorname {tr} left(Y^{textsf {T}}Xright)=operatorname {tr} left(YX^{textsf {T}}right)=sum _{i,j}X_{ij}Y_{ij}.}

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:












tr⁡(XTY)=∑ij(X∘Y)ij{displaystyle operatorname {tr} left(X^{textsf {T}}Yright)=sum _{ij}(Xcirc Y)_{ij}}{displaystyle operatorname {tr} left(X^{textsf {T}}Yright)=sum _{ij}(Xcirc Y)_{ij}}


(using the Hadamard product, i.e. entry-wise product).


tr⁡(XTY)=vec⁡(Y)Tvec⁡(X)=vec⁡(X)Tvec⁡(Y){displaystyle operatorname {tr} left(X^{textsf {T}}Yright)=operatorname {vec} (Y)^{textsf {T}}operatorname {vec} (X)=operatorname {vec} (X)^{textsf {T}}operatorname {vec} (Y)}{displaystyle operatorname {tr} left(X^{textsf {T}}Yright)=operatorname {vec} (Y)^{textsf {T}}operatorname {vec} (X)=operatorname {vec} (X)^{textsf {T}}operatorname {vec} (Y)}


(using the vectorization operator).


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



tr⁡(AB)=tr⁡(BA).{displaystyle operatorname {tr} (AB)=operatorname {tr} (BA).}{displaystyle operatorname {tr} (AB)=operatorname {tr} (BA).}[1]

More generally, the trace is invariant under cyclic permutations, i.e.,


tr⁡(ABCD)=tr⁡(BCDA)=tr⁡(CDAB)=tr⁡(DABC).{displaystyle operatorname {tr} (ABCD)=operatorname {tr} (BCDA)=operatorname {tr} (CDAB)=operatorname {tr} (DABC).}{displaystyle operatorname {tr} (ABCD)=operatorname {tr} (BCDA)=operatorname {tr} (CDAB)=operatorname {tr} (DABC).}

This is known as the cyclic property.


Note that arbitrary permutations are not allowed: in general,


tr⁡(ABC)≠tr⁡(ACB).{displaystyle operatorname {tr} (ABC)neq operatorname {tr} (ACB).}{displaystyle operatorname {tr} (ABC)neq operatorname {tr} (ACB).}

However, if products of three symmetric matrices are considered, any permutation is allowed. (Proof: tr(ABC) = tr(ATBTCT) = 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:


tr⁡(XY)≠tr⁡(X)tr⁡(Y){displaystyle operatorname {tr} (XY)neq operatorname {tr} (X)operatorname {tr} (Y)}{displaystyle operatorname {tr} (XY)neq operatorname {tr} (X)operatorname {tr} (Y)}

What is true is that the trace of the Kronecker product of two matrices is the product of their traces:


tr⁡(X⊗Y)=tr⁡(X)tr⁡(Y).{displaystyle operatorname {tr} (Xotimes Y)=operatorname {tr} (X)operatorname {tr} (Y).}{displaystyle operatorname {tr} (Xotimes Y)=operatorname {tr} (X)operatorname {tr} (Y).}


Other properties


The following three properties:


tr⁡(A+B)=tr⁡(A)+tr⁡(B),tr⁡(cA)=ctr⁡(A),tr⁡(AB)=tr⁡(BA),{displaystyle {begin{aligned}operatorname {tr} (A+B)&=operatorname {tr} (A)+operatorname {tr} (B),\operatorname {tr} (cA)&=coperatorname {tr} (A),\operatorname {tr} (AB)&=operatorname {tr} (BA),end{aligned}}}{displaystyle {begin{aligned}operatorname {tr} (A+B)&=operatorname {tr} (A)+operatorname {tr} (B),\operatorname {tr} (cA)&=coperatorname {tr} (A),\operatorname {tr} (AB)&=operatorname {tr} (BA),end{aligned}}}

characterize the trace completely in the sense that follows. Let f be a linear functional on the space of square matrices satisfying f(x y) = f(y x). Then f and tr are proportional.[2]


The trace is similarity-invariant, which means that A and P−1AP have the same trace. This is because


tr⁡(P−1AP)=tr⁡(P−1(AP))=tr⁡((AP)P−1)=tr⁡(A(PP−1))=tr⁡(A).{displaystyle operatorname {tr} left(P^{-1}APright)=operatorname {tr} left(P^{-1}(AP)right)=operatorname {tr} left((AP)P^{-1}right)=operatorname {tr} left(Aleft(PP^{-1}right)right)=operatorname {tr} (A).}{displaystyle operatorname {tr} left(P^{-1}APright)=operatorname {tr} left(P^{-1}(AP)right)=operatorname {tr} left((AP)P^{-1}right)=operatorname {tr} left(Aleft(PP^{-1}right)right)=operatorname {tr} (A).}

If A is symmetric and B is antisymmetric, then


tr⁡(AB)=0.{displaystyle operatorname {tr} (AB)=0.}{displaystyle operatorname {tr} (AB)=0.}

The trace of the identity matrix is the dimension of the space; this leads to generalizations of dimension using trace. The trace of an idempotent matrix A (for which A2 = A) is the rank of A. The trace of a nilpotent matrix is zero.


More generally, if f(x) = (xλ1)d1···(xλk)dk is the characteristic polynomial of a matrix A, then


tr⁡(A)=d1λ1+⋯+dkλk.{displaystyle operatorname {tr} (A)=d_{1}lambda _{1}+cdots +d_{k}lambda _{k}.}{displaystyle operatorname {tr} (A)=d_{1}lambda _{1}+cdots +d_{k}lambda _{k}.}

When both A and B are n-by-n, the trace of the (ring-theoretic) commutator of A and B vanishes: tr([AB]) = 0; one can state this as "the trace is a map of Lie algebras gln→k{textstyle gl_{n}to k}{textstyle gl_{n}to k} 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 combinations of the commutators of pairs of matrices.[3] Moreover, any square matrix with zero trace is unitarily equivalent to a square matrix with diagonal consisting of all zeros.


The trace of any power of a nilpotent matrix is zero. When the characteristic of the base field is zero, the converse also holds: if tr⁡(xk)=0{textstyle operatorname {tr} left(x^{k}right)=0}{textstyle operatorname {tr} left(x^{k}right)=0} for all k{textstyle k}{textstyle k}, then x{textstyle x}{textstyle x} is nilpotent.


The trace of a Hermitian matrix is real, because the elements on the diagonal are real.


The trace of a projection matrix is the dimension of the target space.


PX=X(XTX)−1XT⟹tr⁡(PX)=rank⁡(X).{displaystyle {begin{aligned}P_{X}&=Xleft(X^{textsf {T}}Xright)^{-1}X^{textsf {T}}\[3pt]Longrightarrow operatorname {tr} left(P_{X}right)&=operatorname {rank} (X).end{aligned}}}{displaystyle {begin{aligned}P_{X}&=Xleft(X^{textsf {T}}Xright)^{-1}X^{textsf {T}}\[3pt]Longrightarrow operatorname {tr} left(P_{X}right)&=operatorname {rank} (X).end{aligned}}}

Note that PX{textstyle P_{X}}{textstyle P_{X}} is idempotent, and more generally the trace of any idempotent matrix equals its rank.



Exponential trace


Expressions like tr(exp(A)), where A is a square matrix, occur so often in some fields (e.g. multivariate statistical theory), that a shorthand notation has become common:


tre⁡(A):=tr⁡(exp⁡(A)).{displaystyle operatorname {tre} (A):=operatorname {tr} (exp(A)).}{displaystyle operatorname {tre} (A):=operatorname {tr} (exp(A)).}

This is sometimes referred to as the exponential trace function; it is used in the Golden–Thompson inequality.



Trace of a linear operator


Given some linear map f : VV (where V is a finite-dimensional vector space) generally, we can define the trace of this map by considering the trace of matrix representation of f, that is, choosing a basis for V and describing f 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, 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 between the space End(V) of linear maps on V and VV, where V is the dual space of V. Let v be in V and let f be in V. Then the trace of the indecomposable element vf is defined to be f(v); the trace of a general element is defined by linearity. Using an explicit basis for V and the corresponding dual basis for V, one can show that this gives the same definition of the trace as given above.



Eigenvalue relationships


If A is a linear operator represented by a square n-by-n matrix with real or complex entries and if λ1, ..., λn are the eigenvalues of A (listed according to their algebraic multiplicities), then


tr⁡(A)=∑i.{displaystyle operatorname {tr} (A)=sum _{i}lambda _{i}.}{displaystyle operatorname {tr} (A)=sum _{i}lambda _{i}.}

This follows from the fact that A is always similar to its Jordan form, an upper triangular matrix having λ1, ..., λn on the main diagonal. In contrast, the determinant of A is the product of its eigenvalues; i.e.,


det⁡(A)=∏i.{displaystyle operatorname {det} (A)=prod _{i}lambda _{i}.}{displaystyle operatorname {det} (A)=prod _{i}lambda _{i}.}

More generally,


tr⁡(Ak)=∑ik.{displaystyle operatorname {tr} left(A^{k}right)=sum _{i}lambda _{i}^{k}.}{displaystyle operatorname {tr} left(A^{k}right)=sum _{i}lambda _{i}^{k}.}


Derivatives


The trace corresponds to the derivative of the determinant: it is the Lie algebra analog of the (Lie group) map of the determinant. This is made precise in Jacobi's formula for the derivative of the determinant.


As a particular case, at the identity, the derivative of the determinant actually amounts to the trace: tr=detI′{textstyle operatorname {tr} =operatorname {det} '_{I}}{textstyle operatorname {tr} =operatorname {det} '_{I}}. From this (or from the connection between the trace and the eigenvalues), one can derive a connection between the trace function, the exponential map between a Lie algebra and its Lie group (or concretely, the matrix exponential function), and the determinant:


det(exp⁡(A))=exp⁡(tr⁡(A)).{displaystyle det(exp(A))=exp(operatorname {tr} (A)).}{displaystyle det(exp(A))=exp(operatorname {tr} (A)).}

For example, consider the one-parameter family of linear transformations given by rotation through angle θ,


=(cos⁡θsin⁡θsin⁡θcos⁡θ).{displaystyle R_{theta }={begin{pmatrix}cos theta &-sin theta \sin theta &cos theta end{pmatrix}}.}{displaystyle R_{theta }={begin{pmatrix}cos theta &-sin theta \sin theta &cos theta end{pmatrix}}.}

These transformations all have determinant 1, so they preserve area. The derivative of this family at θ = 0, the identity rotation, is the antisymmetric matrix


A=(0−110){displaystyle A={begin{pmatrix}0&-1\1&0end{pmatrix}}}{displaystyle A={begin{pmatrix}0&-1\1&0end{pmatrix}}}

which clearly has trace zero, indicating that this matrix represents an infinitesimal transformation which preserves area.


A related characterization of the trace applies to linear vector fields. Given a matrix A, define a vector field F on ℝn by F(x) = Ax. The components of this vector field are linear functions (given by the rows of A). Its divergence div F is a constant function, whose value is equal to tr(A).


By the divergence theorem, one can interpret this in terms of flows: if F(x) represents the velocity of a fluid at location x and U is a region in ℝn, the net flow of the fluid out of U is given by tr(A) ⋅ vol(U), where vol(U) is the volume of U.


The trace is a linear operator, hence it commutes with the derivative:


d⁡tr⁡(X)=tr⁡(d⁡X).{displaystyle operatorname {d} operatorname {tr} (X)=operatorname {tr} (operatorname {d!} X).}{displaystyle operatorname {d} operatorname {tr} (X)=operatorname {tr} (operatorname {d!} X).}


Applications


The trace of a 2-by-2 complex matrix is used to classify Möbius transformations. First the matrix is normalized to make its determinant equal to one. Then, if the square of the trace is 4, the corresponding transformation is parabolic. If the square is in the interval [0,4), 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 representations. Two representations A,B:G→GL(V){textstyle A,B:Gto {mathit {GL}}(V)}{textstyle A,B:Gto {mathit {GL}}(V)} of a group G are equivalent (up to change of basis on V) if tr⁡A(g)=tr⁡B(g){textstyle operatorname {tr} A(g)=operatorname {tr} B(g)}{textstyle operatorname {tr} A(g)=operatorname {tr} B(g)} for all gG.


The trace also plays a central role in the distribution of quadratic forms.



Lie algebra


The trace is a map of Lie algebras tr:gln→k{textstyle operatorname {tr} colon {mathit {gl}}_{n}to k}{textstyle operatorname {tr} colon {mathit {gl}}_{n}to k} from the Lie algebra gln of operators on a n-dimensional space (n × n matrices) to the Lie algebra k of scalars; as k 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:


tr⁡([A,B])=0.{displaystyle operatorname {tr} ([A,B])=0.}{displaystyle operatorname {tr} ([A,B])=0.}

The kernel of this map, a matrix whose trace is zero, is often said to be traceless or tracefree, and these matrices form the simple Lie algebra sln, which is the Lie algebra of the special linear group 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 infinitesimally do not change volume.


In fact, there is an internal direct sum decomposition gln=sln⊕k{textstyle {mathit {gl}}_{n}={mathit {sl}}_{n}oplus k}{textstyle {mathit {gl}}_{n}={mathit {sl}}_{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:


A↦1ntr⁡(A)⋅I.{displaystyle Amapsto {frac {1}{n}}operatorname {tr} (A)cdot I.}{displaystyle Amapsto {frac {1}{n}}operatorname {tr} (A)cdot I.}

Formally, one can compose the trace (the counit map) with the unit map k→gln{textstyle kto {mathit {gl}}_{n}}{textstyle kto {mathit {gl}}_{n}} of "inclusion of scalars" to obtain a map gln→gln{textstyle {mathit {gl}}_{n}to {mathit {gl}}_{n}}{textstyle {mathit {gl}}_{n}to {mathit {gl}}_{n}} mapping onto scalars, and multiplying by n. Dividing by n makes this a projection, yielding the formula above.


In terms of short exact sequences, one has


0→sln→gln→trk→0{displaystyle 0to {mathit {sl}}_{n}to {mathit {gl}}_{n}{overset {operatorname {tr} }{to }}kto 0}0to {mathit {sl}}_{n}to {mathit {gl}}_{n}{overset {operatorname {tr} }{to }}kto 0

which is analogous to


1→SLn→GLn→detK∗1{displaystyle 1to {mathit {SL}}_{n}to {mathit {GL}}_{n}{overset {operatorname {det} }{to }}K^{*}to 1}1to {mathit {SL}}_{n}to {mathit {GL}}_{n}{overset {operatorname {det} }{to }}K^{*}to 1

for Lie groups. However, the trace splits naturally (via 1n{textstyle {frac {1}{n}}}{textstyle {frac {1}{n}}} times scalars) so gln=sln⊕k{textstyle {mathit {gl}}_{n}=sl_{n}oplus k}{textstyle {mathit {gl}}_{n}=sl_{n}oplus k}, but the splitting of the determinant would be as the nth root times scalars, and this does not in general define a function, so the determinant does not split and the general linear group does not decompose: GLn≠SLn×K∗.{textstyle {mathit {GL}}_{n}neq SL_{n}times K^{*}.}{textstyle {mathit {GL}}_{n}neq SL_{n}times K^{*}.}



Bilinear forms


The bilinear form


B(x,y)=tr⁡(ad⁡(x)ad⁡(y)) where ad⁡(x)y=[x,y]=xy−yx{displaystyle B(x,y)=operatorname {tr} (operatorname {ad} (x)operatorname {ad} (y)){text{ where }}operatorname {ad} (x)y=[x,y]=xy-yx}B(x,y)=operatorname {tr} (operatorname {ad} (x)operatorname {ad} (y)){text{ where }}operatorname {ad} (x)y=[x,y]=xy-yx

is called the Killing form, which is used for the classification of Lie algebras.


The trace defines a bilinear form:


(x,y)↦tr⁡(xy){displaystyle (x,y)mapsto operatorname {tr} (xy)}(x,y)mapsto operatorname {tr} (xy)

(x, y square matrices).


The form is symmetric, non-degenerate[4] and associative in the sense that:


tr⁡(x[y,z])=tr⁡([x,y]z).{displaystyle operatorname {tr} (x[y,z])=operatorname {tr} ([x,y]z).}{displaystyle operatorname {tr} (x[y,z])=operatorname {tr} ([x,y]z).}

For a complex simple Lie algebra (e.g., sln{textstyle {mathfrak {sl}}_{n}}{textstyle {mathfrak {sl}}_{n}}), every such bilinear form is proportional to each other; in particular, to the Killing form.


Two matrices x and y are said to be trace orthogonal if


tr⁡(xy)=0.{displaystyle operatorname {tr} (xy)=0.}{displaystyle operatorname {tr} (xy)=0.}


Inner product


For an m-by-n matrix A with complex (or real) entries and * being the conjugate transpose, we have


tr⁡(A∗A)≥0{displaystyle operatorname {tr} left(A^{*}Aright)geq 0}{displaystyle operatorname {tr} left(A^{*}Aright)geq 0}

with equality if and only if A = 0. The assignment


A,B⟩=tr⁡(A∗B){displaystyle langle A,Brangle =operatorname {tr} left(A^{*}Bright)}{displaystyle langle A,Brangle =operatorname {tr} left(A^{*}Bright)}

yields an inner product on the space of all complex (or real) m-by-n matrices.


The norm derived from the above inner product is called the Frobenius norm, which satisfies submultiplicative property as matrix norm. Indeed, it is simply the Euclidean norm if the matrix is considered as a vector of length m n.


It follows that if A and B are real positive semi-definite matrices of the same size then



0≤[tr⁡(AB)]2≤tr⁡(A2)tr⁡(B2)≤[tr⁡(A)]2[tr⁡(B)]2.{displaystyle 0leq left[operatorname {tr} (AB)right]^{2}leq operatorname {tr} left(A^{2}right)operatorname {tr} left(B^{2}right)leq left[operatorname {tr} (A)right]^{2}left[operatorname {tr} (B)right]^{2}.}{displaystyle 0leq left[operatorname {tr} (AB)right]^{2}leq operatorname {tr} left(A^{2}right)operatorname {tr} left(B^{2}right)leq left[operatorname {tr} (A)right]^{2}left[operatorname {tr} (B)right]^{2}.}[5]


Generalizations


The concept of trace of a matrix is generalized to the trace class of compact operators on Hilbert spaces, and the analog of the Frobenius norm is called the Hilbert–Schmidt norm.


If K{textstyle K}{textstyle K} is trace-class, then for any orthonormal basis n)n{textstyle left(varphi _{n}right)_{n}}{textstyle left(varphi _{n}right)_{n}}, the trace is given by


tr⁡(K)=∑n⟨φn,Kφn⟩,{displaystyle operatorname {tr} (K)=sum _{n}leftlangle varphi _{n},Kvarphi _{n}rightrangle ,}{displaystyle operatorname {tr} (K)=sum _{n}leftlangle varphi _{n},Kvarphi _{n}rightrangle ,}

and is finite and independent of the orthonormal basis.[6]


The partial trace is another generalization of the trace that is operator-valued. The trace of a linear operator Z{textstyle Z}{textstyle Z} which lives on a product space A⊗B{textstyle Aotimes B}{textstyle Aotimes B} is equal to the partial traces over A{textstyle A}{textstyle A} and B{textstyle B}{textstyle B}: tr⁡(Z)=trA⁡(trB⁡(Z))=trB⁡(trA⁡(Z)).{textstyle operatorname {tr} (Z)=operatorname {tr} _{A}left(operatorname {tr} _{B}(Z)right)=operatorname {tr} _{B}left(operatorname {tr} _{A}(Z)right).}{textstyle operatorname {tr} (Z)=operatorname {tr} _{A}left(operatorname {tr} _{B}(Z)right)=operatorname {tr} _{B}left(operatorname {tr} _{A}(Z)right).} For more properties and a generalization of the partial trace, see the article on traced monoidal categories.


If A is a general associative algebra over a field k, then a trace on A is often defined to be any map tr: Ak which vanishes on commutators: tr([a, 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 superalgebras.


The operation of tensor contraction generalizes the trace to arbitrary tensors.



Coordinate-free definition


We can identify the space of linear operators on a vector space V, defined over the field F, with the space V⊗V∗{textstyle Votimes V^{*}}{textstyle Votimes V^{*}}, where v⊗h=(w↦h(w)v){textstyle votimes h=left(wmapsto h(w)vright)}{textstyle votimes h=left(wmapsto h(w)vright)}. We also have a canonical bilinear function t:V∗F{textstyle tcolon Vtimes V^{*}to F}{textstyle tcolon Vtimes V^{*}to F} that consists of applying an element w* of V* to an element v of V to get an element of F, in symbols t(v,w∗):=w∗(v)∈F{textstyle tleft(v,w^{*}right):=w^{*}(v)in F}{textstyle tleft(v,w^{*}right):=w^{*}(v)in F}. This induces a linear function on the tensor product (by its universal property) t:V⊗V∗F{textstyle tcolon Votimes V^{*}to F}{textstyle tcolon Votimes V^{*}to F}, which, as it turns out, when that tensor product is viewed as the space of operators, is equal to the trace.


This also clarifies why tr⁡(AB)=tr⁡(BA){textstyle operatorname {tr} (AB)=operatorname {tr} (BA)}{textstyle operatorname {tr} (AB)=operatorname {tr} (BA)} and why tr⁡(AB)≠tr⁡(A)tr⁡(B){textstyle operatorname {tr} (AB)neq operatorname {tr} (A)operatorname {tr} (B)}{textstyle operatorname {tr} (AB)neq operatorname {tr} (A)operatorname {tr} (B)}, as composition of operators (multiplication of matrices) and trace can be interpreted as the same pairing. Viewing End⁡(V)≅V⊗V∗{textstyle operatorname {End} (V)cong Votimes V^{*}}{textstyle operatorname {End} (V)cong Votimes V^{*}}, one may interpret the composition map End⁡(V)×End⁡(V)→End⁡(V){textstyle operatorname {End} (V)times operatorname {End} (V)to operatorname {End} (V)}{textstyle operatorname {End} (V)times operatorname {End} (V)to operatorname {End} (V)} as


(V⊗V∗(V⊗V∗)→(V⊗V∗){displaystyle (Votimes V^{*})times (Votimes V^{*})to (Votimes V^{*})}(Votimes V^{*})times (Votimes V^{*})to (Votimes V^{*})

coming from the pairing V∗×V→F{textstyle V^{*}times Vto F}{textstyle V^{*}times Vto F} on the middle terms. Taking the trace of the product then comes from pairing on the outer terms, while taking the product in the opposite order and then taking the trace just switches which pairing is applied first. On the other hand, taking the trace of A and the trace of B corresponds to applying the pairing on the left terms and on the right terms (rather than on inner and outer), and is thus different.


In coordinates, this corresponds to indexes: multiplication is given by (AB)ik=∑jaijbjk{textstyle (AB)_{ik}=sum _{j}a_{ij}b_{jk}}{textstyle (AB)_{ik}=sum _{j}a_{ij}b_{jk}}, so tr⁡(AB)=∑ijaijbji{textstyle operatorname {tr} (AB)=sum _{ij}a_{ij}b_{ji}}{textstyle operatorname {tr} (AB)=sum _{ij}a_{ij}b_{ji}} and tr⁡(BA)=∑ijbijaji{textstyle operatorname {tr} (BA)=sum _{ij}b_{ij}a_{ji}}{textstyle operatorname {tr} (BA)=sum _{ij}b_{ij}a_{ji}} which is the same, while tr⁡(A)⋅tr⁡(B)=∑iaii⋅jbjj{textstyle operatorname {tr} (A)cdot operatorname {tr} (B)=sum _{i}a_{ii}cdot sum _{j}b_{jj}}{textstyle operatorname {tr} (A)cdot operatorname {tr} (B)=sum _{i}a_{ii}cdot sum _{j}b_{jj}}, which is different.


For V{textstyle V}{textstyle V} finite-dimensional, with basis {ei}{textstyle left{e_{i}right}}{textstyle left{e_{i}right}} and dual basis {ei}{textstyle left{e^{i}right}}{textstyle left{e^{i}right}}, then ei⊗ej{textstyle e_{i}otimes e^{j}}{textstyle e_{i}otimes e^{j}} is the ij-entry of the matrix of the operator with respect to that basis. Any operator A{textstyle A}{textstyle A} is therefore a sum of the form A=aijei⊗ej{textstyle A=a_{ij}e_{i}otimes e^{j}}{textstyle A=a_{ij}e_{i}otimes e^{j}}. With t{textstyle t}{textstyle t} defined as above, t(A)=aijt(ei⊗ej){textstyle t(A)=a_{ij}tleft(e_{i}otimes e^{j}right)}{textstyle t(A)=a_{ij}tleft(e_{i}otimes e^{j}right)}. The latter, however, is just the Kronecker delta, being 1 if i = j and 0 otherwise. This shows that t(A){textstyle t(A)}{textstyle t(A)} is simply the sum of the coefficients along the diagonal. This method, however, makes coordinate invariance an immediate consequence of the definition.



Dual


Further, one may dualize this map, obtaining a map F∗=F→V⊗V∗End⁡(V){textstyle F^{*}=Fto Votimes V^{*}cong operatorname {End} (V)}{textstyle F^{*}=Fto Votimes V^{*}cong operatorname {End} (V)}. This map is precisely the inclusion of scalars, sending 1 ∈ F to the identity matrix: "trace is dual to scalars". In the language of bialgebras, scalars are the unit, while trace is the counit.


One can then compose these, F→IEnd⁡(V)→trF{textstyle F{overset {I}{to }}operatorname {End} (V){overset {operatorname {tr} }{to }}F}{textstyle F{overset {I}{to }}operatorname {End} (V){overset {operatorname {tr} }{to }}F}, which yields multiplication by n, as the trace of the identity is the dimension of the vector space.



See also



  • Trace of a tensor with respect to a metric tensor

  • Characteristic function

  • Field trace

  • Golden–Thompson inequality

  • Specht's theorem

  • Trace class

  • Trace inequalities

  • von Neumann's trace inequality



Notes





  1. ^ This is immediate from the definition of the matrix product:
    tr⁡(AB)=∑i=1m(AB)ii=∑i=1m∑j=1nAijBji=∑j=1n∑i=1mBjiAij=∑j=1n(BA)jj=tr⁡(BA).{displaystyle operatorname {tr} (AB)=sum _{i=1}^{m}left(ABright)_{ii}=sum _{i=1}^{m}sum _{j=1}^{n}A_{ij}B_{ji}=sum _{j=1}^{n}sum _{i=1}^{m}B_{ji}A_{ij}=sum _{j=1}^{n}left(BAright)_{jj}=operatorname {tr} (BA).}{displaystyle operatorname {tr} (AB)=sum _{i=1}^{m}left(ABright)_{ii}=sum _{i=1}^{m}sum _{j=1}^{n}A_{ij}B_{ji}=sum _{j=1}^{n}sum _{i=1}^{m}B_{ji}A_{ij}=sum _{j=1}^{n}left(BAright)_{jj}=operatorname {tr} (BA).}



  2. ^ Proof:

    f(eij)=0{displaystyle f(e_{ij})=0}f(e_{ij})=0 if and only if i≠j{textstyle ineq j}{textstyle ineq j} and f(ejj)=f(e11){textstyle fleft(e_{jj}right)=fleft(e_{11}right)}{textstyle fleft(e_{jj}right)=fleft(e_{11}right)} (with the standard basis eij{textstyle e_{ij}}{textstyle e_{ij}}), and thus

    f(A)=∑i,j[A]ijf(eij)=∑i[A]iif(e11)=f(e11)tr⁡(A).{displaystyle f(A)=sum _{i,j}[A]_{ij}fleft(e_{ij}right)=sum _{i}[A]_{ii}fleft(e_{11}right)=fleft(e_{11}right)operatorname {tr} (A).}{displaystyle f(A)=sum _{i,j}[A]_{ij}fleft(e_{ij}right)=sum _{i}[A]_{ii}fleft(e_{11}right)=fleft(e_{11}right)operatorname {tr} (A).}


    More abstractly, this corresponds to the decomposition gln=sln⊕k{textstyle {mathit {gl}}_{n}={mathit {sl}}_{n}oplus k}{textstyle {mathit {gl}}_{n}={mathit {sl}}_{n}oplus k}, as tr(AB) = tr(BA) (equivalently, tr⁡([A,B])=0{textstyle operatorname {tr} ([A,B])=0}{textstyle operatorname {tr} ([A,B])=0}) defines the trace on sln, 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 non-zero such map.



  3. ^ Proof: sln{textstyle {mathfrak {sl}}_{n}}{textstyle {mathfrak {sl}}_{n}} is a semisimple Lie algebra 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.


  4. ^ This follows from the fact that tr⁡(A∗A)=0{textstyle operatorname {tr} left(A^{*}Aright)=0}{textstyle operatorname {tr} left(A^{*}Aright)=0} if and only if A=0{textstyle A=0}{textstyle A=0}


  5. ^ Can be proven with the Cauchy–Schwarz inequality.


  6. ^ Teschl, G. (30 October 2014). Mathematical Methods in Quantum Mechanics. Graduate Studies in Mathematics. 157 (2nd ed.). American Mathematical Society. ISBN 1470417049..mw-parser-output cite.citation{font-style:inherit}.mw-parser-output q{quotes:"""""""'""'"}.mw-parser-output code.cs1-code{color:inherit;background:inherit;border:inherit;padding:inherit}.mw-parser-output .cs1-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-lock-limited a,.mw-parser-output .cs1-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration{color:#555}.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration span{border-bottom:1px dotted;cursor:help}.mw-parser-output .cs1-hidden-error{display:none;font-size:100%}.mw-parser-output .cs1-visible-error{font-size:100%}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-right{padding-right:0.2em}




External links



  • Hazewinkel, Michiel, ed. (2001) [1994], "Trace of a square matrix", Encyclopedia of Mathematics, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 978-1-55608-010-4



Popular posts from this blog

How to pass form data using jquery Ajax to insert data in database?

National Museum of Racing and Hall of Fame

Guess what letter conforming each word