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)
โโ run ยท โโ โ nav
โถ Output
Run your code to see output here.