Matrix Trace

The trace of an n×n square matrix A is defined to be

 Tr(A)=sum_(i=1)^na_(ii),
(1)

i.e., the sum of the diagonal elements. The matrix trace is implemented in the Wolfram Language as Tr[list]. In group theory, traces are known as "group characters."

For square matrices A and B, it is true that

Tr(A)=Tr(A^(T))
(2)
Tr(A+B)=Tr(A)+Tr(B)
(3)
Tr(alphaA)=alphaTr(A)
(4)

(Lang 1987, p. 40), where A^(T) denotes the transpose. The trace is also invariant under a similarity transformation

 A^'=BAB^(-1)
(5)

(Lang 1987, p. 64). Since

 (bab^(-1))_(ij)=b_(il)a_(lk)b_(kj)^(-1)
(6)

(where Einstein summation is used here to sum over repeated indices), it follows that

Tr(BAB^(-1))=b_(il)a_(lk)b^(-1)_(ki)
(7)
=(b^(-1)b)_(kl)a_(lk)
(8)
=delta_(kl)a_(lk)
(9)
=a_(kk)
(10)
=Tr(A),
(11)

where delta_(ij) is the Kronecker delta.

The trace of a product of two square matrices is independent of the order of the multiplication since

Tr(AB)=(ab)_(ii)
(12)
=a_(ij)b_(ji)
(13)
=b_(ji)a_(ij)
(14)
=(ba)_(jj)
(15)
=Tr(BA)
(16)

(again using Einstein summation). Therefore, the trace of the commutator of A and B is given by

 Tr([A,B])=Tr(AB)-Tr(BA)=0.
(17)

The trace of a product of three or more square matrices, on the other hand, is invariant only under cyclic permutations of the order of multiplication of the matrices, by a similar argument.

The product of a symmetric and an antisymmetric matrix has zero trace,

 Tr(A_SB_A)=0.
(18)

The value of the trace for a 3×3 nonsingular matrix can be found using the fact that the matrix can always be transformed to a coordinate system where the z-axis lies along the axis of rotation. In the new coordinate system (which is assumed to also have been appropriately rescaled), the matrix is

 A^'=[cosphi sinphi 0; -sinphi cosphi 0; 0 0 1],
(19)

so the trace is

 Tr(A^')=Tr(A)=a_(ii)=1+2cosphi,
(20)

where a_(ii) is interpreted as Einstein summation notation.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.