finds the trace of the matrix or tensor list.
finds a generalized trace, combining terms with f instead of Plus.
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.
- Tr can be used on SparseArray objects. »
Basic Examples (1)
The trace of a matrix is the sum of the diagonal elements:
Generalizations & Extensions (6)
Properties & Relations (3)
Introduced in 1999
Updated in 2003