det
Matrix determinant
Syntax
Description
Examples
Input Arguments
Limitations
Avoid usingdet
to examine if a matrix is singular because of the following limitations. Usecond
orrcond
instead.
Limitation | Result |
---|---|
The magnitude of the determinant is typically unrelated to the condition number of a matrix. |
The determinant of a matrix can be arbitrarily large or small without changing the condition number. |
|
The determinant calculation is sometimes numerically unstable. For example, |
Algorithms
det
computes the determinant from the triangular factors obtained by Gaussian elimination with thelu
function.
[L,U] = lu(X) s = det(L) % This is always +1 or -1 det(X) = s*prod(diag(U))