# det() Function & Examples

Use the det() matrix function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## det

#### det(x)

Try it yourself:

```calculio
det([1, 2; 3, 4])
det([-2, 2, 3; -1, 1, 3; 2, 0, -1])
```

[concat](https://calcul.io/function/concat/index.md)

[diag](https://calcul.io/function/diag/index.md)

[identity](https://calcul.io/function/identity/index.md)

[inv](https://calcul.io/function/inv/index.md)

[ones](https://calcul.io/function/ones/index.md)

[range](https://calcul.io/function/range/index.md)

[size](https://calcul.io/function/size/index.md)

[squeeze](https://calcul.io/function/squeeze/index.md)

[subset](https://calcul.io/function/subset/index.md)

[trace](https://calcul.io/function/trace/index.md)

[transpose](https://calcul.io/function/transpose/index.md)

[zeros](https://calcul.io/function/zeros/index.md)

---

## 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()](https://calcul.io/function/inv/index.md), 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()](https://calcul.io/function/size/index.md) when a matrix comes from external data. Determinants are not calculated element by element, so do not confuse det with [prod()](https://calcul.io/function/prod/index.md). For decomposition-based work, [lu()](https://calcul.io/function/lu/index.md) or [qr()](https://calcul.io/function/qr/index.md) 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()](https://calcul.io/function/abs/index.md) only when you specifically need unsigned area or volume.

[All functions](https://calcul.io/functions/index.md)
