Matrix Inverse

The matrix that undoes a linear transformation โ€” when it exists, how to find it, and what its non-existence means for a system.

Aโปยน undoes A โ€” applying both in sequence returns the original vector
v(1.20, 0.80)Av(1.16, 1.59)Aโปยน(Av) = v โœ“A[1.30, -0.50][0.75, 0.87]det = 1.50AAโปยน = Ioriginal vAv (transformed)Aโปยน(Av) (recovered)
rotate 30ยฐ
scale x 1.5
Definition

The inverse of a square matrix AA is the matrix Aโˆ’1A^{-1} such that:

AAโˆ’1=Aโˆ’1A=IAA^{-1} = A^{-1}A = I

where II is the identity matrix. Aโˆ’1A^{-1} exists iff AA is invertible (also called nonsingular), which happens iff detโก(A)โ‰ 0\det(A) \neq 0.

2ร—2 formula: for A=(abcd)A = \begin{pmatrix}a&b\\c&d\end{pmatrix} with detโก(A)=adโˆ’bcโ‰ 0\det(A) = ad-bc \neq 0:

Aโˆ’1=1adโˆ’bc(dโˆ’bโˆ’ca)A^{-1} = \frac{1}{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}

Why it matters: Aโˆ’1A^{-1} lets you solve Ax=bA\mathbf{x} = \mathbf{b} as x=Aโˆ’1b\mathbf{x} = A^{-1}\mathbf{b}.

Key properties
  • The inverse, if it exists, is unique โ€” a matrix can't have two different inverses
  • (Aโˆ’1)โˆ’1=A(A^{-1})^{-1} = A โ€” inverting twice returns the original matrix
  • Only square matrices can have a two-sided inverse in this sense
  • Iโˆ’1=II^{-1} = I โ€” the identity is its own inverse
Common mistakes
  • Assuming every square matrix is invertible: detโก(A)=0\det(A) = 0 means no inverse exists, no matter how the matrix looks otherwise
  • Computing Aโˆ’1A^{-1} just to solve Ax=bA\mathbf{x}=\mathbf{b}: this is slower and less numerically accurate than directly solving the system (e.g. solve(A,b) instead of inv(A) @ b) โ€” explicit inversion is rarely the right tool
Solving a system via the inverse

A=(2153)A = \begin{pmatrix}2&1\\5&3\end{pmatrix}, solve Ax=(411)A\mathbf{x} = \begin{pmatrix}4\\11\end{pmatrix}.

detโก(A)=6โˆ’5=1\det(A) = 6-5 = 1. Aโˆ’1=(3โˆ’1โˆ’52)A^{-1} = \begin{pmatrix}3&-1\\-5&2\end{pmatrix}.

x=Aโˆ’1b=(3โˆ’1โˆ’52)(411)=(12)\mathbf{x} = A^{-1}\mathbf{b} = \begin{pmatrix}3&-1\\-5&2\end{pmatrix}\begin{pmatrix}4\\11\end{pmatrix} = \begin{pmatrix}1\\2\end{pmatrix}.

Try it

Find Aโˆ’1A^{-1} for A=(3211)A = \begin{pmatrix}3&2\\1&1\end{pmatrix} and verify AAโˆ’1=IAA^{-1} = I.

Solution

detโก(A)=3โˆ’2=1\det(A) = 3-2 = 1. Aโˆ’1=(1โˆ’2โˆ’13)A^{-1} = \begin{pmatrix}1&-2\\-1&3\end{pmatrix}.

Verify: (3211)(1โˆ’2โˆ’13)=(3โˆ’2โˆ’6+61โˆ’1โˆ’2+3)=(1001)\begin{pmatrix}3&2\\1&1\end{pmatrix}\begin{pmatrix}1&-2\\-1&3\end{pmatrix} = \begin{pmatrix}3-2&-6+6\\1-1&-2+3\end{pmatrix} = \begin{pmatrix}1&0\\0&1\end{pmatrix} โœ“

Related concepts