det

det(x)

Try it yourself:


det(): The Determinant of a Square Matrix

det() calculates the determinant of a square matrix. The determinant is a single number that describes how a linear transformation scales signed area or volume. For a 2×2 matrix [[a, b], [c, d]], det is a×d − b×c.

Why determinants matter

A zero determinant means the matrix is singular: it collapses at least one dimension and cannot have an ordinary inverse. Before calling inv(), det can provide a useful conceptual check. A nonzero determinant indicates an inverse exists, although values very close to zero may still be numerically ill-conditioned.

det requires a square matrix. Check dimensions with size() when a matrix comes from external data. Determinants are not calculated element by element, so do not confuse det with prod(). For decomposition-based work, lu() or qr() can be more informative.

Interpretation

The sign records orientation: a negative determinant includes a reflection, while magnitude records scale. In geometric and engineering calculations, retain full precision and use abs() only when you specifically need unsigned area or volume.

Try Det in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions