0 / 34
Lesson 21

Inverse & Determinant

linalg module:

np.linalg.det(A)  # determinant
np.linalg.inv(A)  # inverse
A @ inv(A) โ‰ˆ I
Why this matters

Determinants and inverses tell you whether a linear system is well-posed. Near-singular matrices blow up solutions; in practice you often use solve or least-squares instead of explicit invโ€”but you still need the vocabulary.

Understanding when inv is the wrong tool saves hours of mysterious numerical noise.

ResourcesDocs, references & more โ€” opens in a new tab
๐ŸŽฏ Your Task

A = [[2,1],[5,3]]. Compute det and A_inv. Verify with np.round(A @ A_inv).

np.linalg.det(A), np.linalg.inv(A)
exercise.py
โŒ˜โŽ run ยท โŒ˜โ† โ†’ nav
โ–ถ Output
Run your code to see output here.