Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Matrix determinant

`d = det(A)`

Avoid using `det`

to examine if a matrix is
singular because of the following limitations. Use `cond`

or `rcond`

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, |

`det`

computes the determinant from the triangular
factors obtained by Gaussian elimination with the `lu`

function.

[L,U] = lu(X) s = det(L) % This is always +1 or -1 det(X) = s*prod(diag(U))

Was this topic helpful?