Skip to content
This repository was archived by the owner on May 21, 2020. It is now read-only.
Florian Rappl edited this page Dec 21, 2014 · 2 revisions

trace

Performs the trace operation on the given matrix.

References

trace(M)

Sums all elements on the diagonal.

Argument M

Matrix

Returns 1. entry

Scalar

Example

trace([1,2;3,4])

Results in the value 5.

trace(x)

The trace of a 1x1 matrix is the element itself.

Argument x

Scalar

Returns 1. entry

Scalar

Example

trace(10)

Results in the value 10.

Clone this wiki locally