This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# Tr

 Tr[list]finds the trace of the matrix or tensor list. Trfinds a generalized trace, combining terms with f instead of Plus. Trgoes down to level n in list.
• Tr[list] sums the diagonal elements .
• Tr works for rectangular as well as square matrices and tensors.
The trace of a matrix is the sum of the diagonal elements:
The trace of a matrix is the sum of the diagonal elements:
 Out[1]=
 Scope   (2)
Symbolic trace:
Trace of a numerical matrix:
Trace of a sparse matrix:
For a vector Tr gives the sum of the elements:
For a higher-rank tensor, Tr gives the sum of elements with equal indices:
Apply a function to the diagonal elements of a matrix:
Extract the diagonal of a matrix as a list:
Only consider down to level 1; this adds the rows of the matrix:
Only consider down to level 2:
 Applications   (2)
Find the determinant of a triangular matrix:
Define an inner product for the cone of positive definite matrices using :
Project the matrix onto the space spanned by the matrix :
The trace of a matrix is invariant under similarity transformations:
The invariance means that the sum of the eigenvalues must equal the trace:
The Frobenius norm is defined as :