numpy 1.22.4 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
det(a)

Notes

versionadded

Broadcasting rules apply, see the numpy.linalg documentation for details.

The determinant is computed via LU factorization using the LAPACK routine z/dgetrf .

Parameters

a : (..., M, M) array_like

Input array to compute determinants for.

Returns

det : (...) array_like

Determinant of a.

Compute the determinant of an array.

See Also

scipy.linalg.det

Similar function in SciPy.

slogdet

Another way to represent the determinant, more suitable for large matrices where underflow/overflow may occur.

Examples

The determinant of a 2-D array [[a, b], [c, d]] is ad - bc:

>>> a = np.array([[1, 2], [3, 4]])
... np.linalg.det(a) -2.0 # may vary

Computing determinants for a stack of matrices:

>>> a = np.array([ [[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]] ])
... a.shape (3, 2, 2)
>>> np.linalg.det(a)
array([-2., -3., -8.])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

numpy.linalg.slogdet scipy.signal._ltisys.place_poles

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/linalg/linalg.py#2092
type: <class 'function'>
Commit: