1.1.8Linear Algebra Essentials

Matrix inverse and conditions for invertibility

1,810 words8 min readdifficulty · medium1 backlinks

WHAT is a matrix inverse?

WHY must AA be square? A1A^{-1} must map outputs of dimension nn back to inputs of dimension nn. A non-square map changes dimension, so it can't be exactly undone by another single matrix (only a pseudo-inverse exists).


HOW do we derive the 2×22\times 2 inverse from scratch?

We don't memorize the formula — we build it. Let A=[abcd],A1=[xyzw].A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, \qquad A^{-1} = \begin{bmatrix} x & y \\ z & w \end{bmatrix}.

We demand AA1=IAA^{-1} = I: [abcd][xyzw]=[1001].\begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} x & y \\ z & w \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}.

Why this step? The definition of inverse is exactly this equation — we just write it out and solve.

Column 1 gives: ax+bz=1ax + bz = 1 and cx+dz=0cx + dz = 0. From the second: z=cdxz = -\tfrac{c}{d}x. Substitute: axbcdx=1    xadbcd=1    x=dadbc.ax - \tfrac{bc}{d}x = 1 \implies x\frac{ad-bc}{d} = 1 \implies x = \frac{d}{ad-bc}.

Why this step? We eliminate one unknown to isolate xx. The term adbcad-bc forces itself out — that is the quantity that must be nonzero to divide by.

Doing the same for all four unknowns:

The whole thing blows up if adbc=0ad-bc = 0. That number is the determinant, and it is the gatekeeper of invertibility.


WHY the determinant decides everything

Figure — Matrix inverse and conditions for invertibility

The Invertible Matrix Theorem (equivalent conditions)

WHY #7? If Av=0vA\mathbf{v} = 0\cdot\mathbf{v} for some v0\mathbf{v}\neq 0, then a nonzero vector is sent to 0\mathbf{0} — space collapses, matching #5. And detA=λi\det A = \prod \lambda_i, so a zero eigenvalue forces detA=0\det A = 0.


General formula (adjugate) — derived idea

WHY it works: the identity Aadj(A)=(detA)IA\cdot\operatorname{adj}(A) = (\det A) I is just cofactor expansion in disguise. Divide both sides by detA\det A. In practice for n3n\ge 3 we use Gauss–Jordan ([AI][IA1][A\,|\,I] \to [I\,|\,A^{-1}]), which is far cheaper than adjugates.


Worked Examples


Steel-manned Common Mistakes


Recall Feynman: explain to a 12-year-old

Imagine a machine that takes a photo and scrambles it in a fixed way. The inverse machine unscrambles it back to the original. But if the scrambler ever throws away part of the picture (like painting over half of it), no un-scrambler can bring it back — too much was lost. The determinant is a number that tells you "did the machine throw anything away?" If it's zero, information was lost and there's no undo button. If it's not zero, you can always undo it perfectly.


Flashcards

What equation defines the inverse A1A^{-1}?
AA1=A1A=IAA^{-1} = A^{-1}A = I.
For a 2×22\times2 matrix, what is the inverse formula?
1adbc[dbca]\frac{1}{ad-bc}\begin{bmatrix}d&-b\\-c&a\end{bmatrix}.
A matrix is invertible iff its determinant is…?
nonzero (detA0\det A \neq 0).
Name three conditions equivalent to invertibility.
Full rank, linearly independent columns, trivial null space (also: unique solutions, 0 not an eigenvalue, row-reduces to II).
What is (AB)1(AB)^{-1}?
B1A1B^{-1}A^{-1} (order reverses).
Why can't a non-square matrix have a true inverse?
It changes dimension, so no single matrix maps outputs back one-to-one; only a pseudo-inverse exists.
If detA=0\det A = 0, what does the transformation do geometrically?
Collapses space onto a lower dimension, losing information → no unique undo.
Relation between determinant and eigenvalues?
detA=iλi\det A = \prod_i \lambda_i; a zero eigenvalue ⇒ det=0\det = 0 ⇒ singular.
Why is a tiny determinant risky numerically?
Large condition number amplifies rounding errors; matrix is nearly singular (fix: regularize with +λI+\lambda I).
What does adj(A)\operatorname{adj}(A) equal and how is it used?
The transpose of the cofactor matrix; A1=1detAadj(A)A^{-1} = \frac{1}{\det A}\operatorname{adj}(A).

Connections

Concept Map

inverse undoes it

defined by

must be

else only

has scale factor

2x2 formula

det = 0

det != 0

equivalent to

guarantees

used in

Matrix A as transformation

Inverse A^-1

A A^-1 = I

Square n x n

Pseudo-inverse

Determinant det A

Swap diag negate off divide by det

Singular collapses space

Invertible nonsingular

Full rank = n

Unique solution to Ax = b

Linear regression normal equations

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Socho ek matrix AA ek "machine" hai jo space ko stretch, rotate ya squeeze karti hai. Uska inverse A1A^{-1} wo ulti machine hai jo sab kuch wapas original state mein le aati hai — matlab AA1=IAA^{-1}=I. ML mein yeh important hai kyunki Ax=bA\mathbf{x}=\mathbf{b} solve karna, jaise linear regression ke normal equations, ismein inverse ka concept chhupa hota hai.

Sabse important cheez hai determinant. Yeh number batata hai ki machine ne area/volume kitna scale kiya. Agar detA=0\det A = 0, matlab machine ne space ko ek line ya point pe collapse kar diya — information gum ho gayi, aur jab information gum ho jaye to undo karna impossible hai. Isliye rule: A1A^{-1} tabhi exist karta hai jab detA0\det A \neq 0. 2×22\times2 ke liye formula bahut simple hai: diagonal swap karo, off-diagonal negate karo, aur adbcad-bc se divide kar do.

Ek common galti: log sochte hain (AB)1=A1B1(AB)^{-1}=A^{-1}B^{-1}, lekin sahi answer hai B1A1B^{-1}A^{-1} — order ulta hota hai, bilkul jaise jute pehle utaro phir mozey. Doosri galti: "square matrix hai to invertible hoga" — nahi bhai, square hona zaroori hai par kaafi nahi; full rank aur nonzero determinant bhi chahiye.

Practical tip: agar determinant bahut chhota (nearly zero) hai to numerically inverse bahut unstable ho jata hai — chhoti errors badi ban jati hain (high condition number). Isliye ML mein hum A+λIA+\lambda I add karte hain (ridge regularization) taaki matrix stable rahe. Yaad rakho: sab invertibility conditions ek saath sach ya ek saath jhooth hote hain — ek gira to sab gir gaye.

Test yourself — Linear Algebra Essentials

Connections