Home / Maths for AI / Symbols / Vectors and matrices

Determinant

Say it: "the determinant of A"

What it means

A single number from a square matrix that says how much it scales area (or volume). For a 2×22 \times 2 matrix, det⁡=ad−bc\det = ad - bc. Zero means the matrix squashes space flat and has no inverse.

Example

det⁡(4213)=4×3−2×1=10\det \begin{pmatrix} 4 & 2 \\ 1 & 3 \end{pmatrix} = 4 \times 3 - 2 \times 1 = 10

Areas get 10 times bigger.

In code

import numpy as np
print(round(np.linalg.det([[4, 2], [1, 3]]), 6))

Output

10.0

Where it appears in machine learning

Appears in the formula of the multivariate Gaussian and in checking whether a matrix can be inverted.

Related symbols

Learn it properly in the free lesson Matrices, with practice questions that check your answers.