det
Determinant of a square matrix.
Syntax
Section titled “Syntax”b = det(A)Description
Section titled “Description”Returns the determinant of the square matrix A. Computed via LU decomposition rather than direct expansion, so it’s stable and reasonably fast for moderately-sized matrices.
Watch for overflow / underflow with large matrices: when det(A) is extremely large or small, the value isn’t reliable and you should use log(abs(det(A))) or related quantities instead.
Examples
Section titled “Examples”det([1 2; 3 4]) % -2det(magic(3)) % -360det(eye(5)) % 1