method

trace

v1_8_6_287 - Show latest stable - Class: Matrix
trace()
public

Returns the trace (sum of diagonal elements) of the matrix.

  Matrix[[7,6], [3,9]].trace
    => 16