linalg(deprecated)
trace
the trace of a matrix
Calling Sequence
Parameters
Description
Examples
trace(A)
A
-
square matrix
Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Trace], instead.
- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
The function trace(A) computes the trace of the matrix A. The trace of a matrix A is defined to be the sum of the diagonal elements of A.
The command with(linalg,trace) allows the use of the abbreviated form of this command.
with⁡linalg:
trace⁡array⁡1,2,1,4
5
A≔matrix⁡3,3,a,b,c,d,e,f,g,h,i
A≔abcdefghi
trace⁡A
a+e+i
See Also
LinearAlgebra
LinearAlgebra[Trace]
Trace
Download Help Document