This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Tr

Tr[list]
finds the trace of the matrix or tensor list.
Tr[list, f]
finds a generalized trace, combining terms with f instead of Plus.
Tr[list, f, n]
goes down to level n in list.
  • Tr[list] sums the diagonal elements list[[i, i, ...]].
  • Tr works for rectangular as well as square matrices and tensors.
New in 4