det

det(x: array, /) array

Returns the determinant of a square matrix (or a stack of square matrices) x.

Parameters:

x (array) – input array having shape (..., M, M) and whose innermost two dimensions form square matrices. Should have a floating-point data type.

Returns:

out (array) – if x is a two-dimensional array, a zero-dimensional array containing the determinant; otherwise, a non-zero dimensional array containing the determinant for each square matrix. The returned array must have the same data type as x.

Notes

Changed in version 2022.12: Added complex data type support.