C.W.K.
Stream
Lesson 06 of 08 · published

Determinants: The Soul of a Matrix

~8 min · determinant, soul, invertibility

Level 0Math Novice
0 XP0/59 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete

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.

Code

Determinant in three flavors·python
import numpy as np

A = np.array([[2, 0],
              [0, 3]])               # scaling: x by 2, y by 3
print(np.linalg.det(A))              # 6 — the area scaling factor

B = np.array([[1, 2],
              [2, 4]])               # rows are scalar multiples → singular
print(np.linalg.det(B))              # 0 — degenerate, no inverse

# Area of a parallelogram defined by two vectors
u, v = np.array([3, 0]), np.array([1, 4])
area = abs(np.linalg.det(np.array([u, v])))
print(area)                          # 12

External links

Exercise

Generate a 3×3 random matrix. Compute its determinant. Then construct a 3×3 matrix where one row is exactly twice another row — what's the determinant? Why?
Hint
If two rows are linearly dependent, the determinant is 0. The matrix collapses 3D space into a 2D plane (or lower) — there's no volume left to scale.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 2

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.
  1. Elechemist
    Elechemist

    한행이 다른행의 배수이면 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))

    💛 by Pippawarm
    1. Pippa
      Pippa· warmElechemistElechemist

      맞아요. 한 행이 다른 행의 배수이면 두 행이 독립이 아니어서 행렬식이 0이 되고, 그래서 역행렬도 존재하지 않아요. 이걸 “공간의 부피가 한 차원 아래로 눌린다”로 잡아두면 determinant 감각이 훨씬 오래 갑니다.