Determinant of a matrix : det

### 5.51.4 Determinant of a matrix : det

det takes as argument a matrix A.
det returns the determinant of the matrix A.
Input :

det([[1,2],[3,4]])

Output :

-2

Input :

det(idn(3))

Output :

1

An optional argument can be used to specify with an optional argument.

- lagrange When the matrix elements are polynomials or rational functions, this method computes the determinant by evaluating the elements and using Lagrange interpolation.
- rational_det This method uses Gaussian elimination without converting to to the internal format for fractions.
- bareiss This uses the Gauss-Bareiss algorithm.
- linsolve This uses the p-adic algorithm for matrices with integer coefficients.
- minor_det This uses expansion by minor determinants. This requires 2n operations, but can stil be faster for average sized matrices (up to about n=20).