One Number That Tells You Everything Important
The determinant of a square matrix is a single number that encodes the matrix's most important property: does it preserve space, or does it collapse it?
- → matrix is invertible, transformation preserves dimensions, system has a unique solution.
- → matrix is singular, transformation collapses space, system has zero or infinite solutions.
- → the volume scaling factor of the transformation. Determinant 2 means the transformation doubles areas/volumes; 0.5 means halves them.
- sign of → whether the transformation preserves orientation (positive) or flips it (negative, like a mirror).
Don't Compute By Hand. Ever.
For 2×2 it's . Doable. For 3×3 it's the cofactor expansion. Tedious. For 10×10 with float32 entries it's a numerical nightmare and even mathematicians punt to NumPy. np.linalg.det(A) takes microseconds. Use it.
Where Determinants Show Up
- Invertibility check — before solving ,
det(A) != 0. - Geometry — area of a parallelogram defined by vectors and is .
- Stability analysis — small determinant ≈ near-singular ≈ small input changes cause huge output changes (numerical instability).
- Change of variables in calculus — when you transform coordinates, the determinant of the Jacobian rescales the integral.
The determinant is the matrix's volume-scaling fingerprint. Zero means the matrix squishes the world flat. You don't usually need it day-to-day in deep learning — but when you do, you really do.
한행이 다른행의 배수이면 singular 기 때문에 역행렬이 존재하지 않는다
import numpy as np
rng = np.random.default_rng(7) A = rng.standard_normal((3, 3)) print('A =') print(A) print('det(A) =', np.linalg.det(A))
B = np.array([[1., 2., 3.], [2., 4., 6.], [0., 1., 5.]]) print('B =') print(B) print('det(B) =', np.linalg.det(B))