method

trace

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

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

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