DOCUMENTATION CENTER SEARCH
Mathematica
>
Matrix Operations
>
Built-in
Mathematica
Symbol
Basic Matrix Operations
Vectors and Matrices
Tensors
Tutorials »
|
Total
Diagonal
Transpose
Det
DiagonalMatrix
Eigenvalues
See Also »
|
Matrices and Linear Algebra
Matrix Operations
Tensors
More About »
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
.
MORE INFORMATION
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.
»
EXAMPLES
CLOSE ALL
Basic Examples
(1)
The trace of a matrix is the sum of the diagonal elements:
In[1]:=
Out[1]=
Scope
(2)
Generalizations & Extensions
(6)
Applications
(2)
Properties & Relations
(2)
SEE ALSO
Total
Diagonal
Transpose
Det
DiagonalMatrix
Eigenvalues
TUTORIALS
Basic Matrix Operations
Vectors and Matrices
Tensors
MORE ABOUT
Matrices and Linear Algebra
Matrix Operations
Tensors
New in 4
© 2008 Wolfram Research, Inc.