Linear AlgebraVectors and Matrix Equations

Inverses by Gauss–Jordan

Row-reduce A next to I until A becomes I; then I has become A⁻¹.

Not started Jump to practice

Numbers have reciprocals: $5 \cdot \frac{1}{5} = 1$. Some square matrices have something similar. You met inverses in precalculus; here we see why the row-reduction method works and how inverses combine. We use reduced echelon form and matrix products.

An $n \times n$ matrix $A$ is invertible if there is a matrix $A^{-1}$ with $AA^{-1} = I$ and $A^{-1}A = I$, where $I$ is the identity matrix. Then $A\mathbf{x} = \mathbf{b}$ has exactly one solution, $\mathbf{x} = A^{-1}\mathbf{b}$, for every $\mathbf{b}$.

For a $2 \times 2$ matrix: $$\begin{bmatrix} a & b \\ c & d \end{bmatrix}^{-1} = \frac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}, \quad \text{provided } ad - bc \neq 0.$$ If $ad - bc = 0$ the matrix has no inverse.

Gauss–Jordan: row reduce [ A | I ]

Why it works

Column $j$ of $A^{-1}$ is the vector $\mathbf{x}_j$ with $A\mathbf{x}_j = \mathbf{e}_j$ (because $AA^{-1} = I$). Solving all $n$ of these systems at once means row reducing $A$ with all the $\mathbf{e}_j$ attached: $[\,A \mid I\,]$. If $A$ reduces to $I$, each system has its unique solution sitting on the right: $[\,I \mid A^{-1}\,]$. If $A$ does not reduce to $I$, some system has no solution or a free variable, and $A$ has no inverse.

Worked example: A 3 × 3 inverse

Find $A^{-1}$ for $A = \begin{bmatrix} 1 & 2 & 0 \\ 2 & 5 & 1 \\ 0 & 2 & 1 \end{bmatrix}$.
  1. Start with $[\,A \mid I\,]$ $= \left[\begin{array}{ccc|ccc} 1 & 2 & 0 & 1 & 0 & 0 \\ 2 & 5 & 1 & 0 & 1 & 0 \\ 0 & 2 & 1 & 0 & 0 & 1 \end{array}\right]$.
  2. $R_{2} \to R_{2} - 2R_{1}$, then $R_{3} \to R_{3} - 2R_{2}$: $\left[\begin{array}{ccc|ccc} 1 & 2 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & -2 & 1 & 0 \\ 0 & 0 & -1 & 4 & -2 & 1 \end{array}\right]$
  3. $R_{3} \to -R_{3}$ makes the last pivot $1$: $\left[\begin{array}{ccc|ccc} 1 & 2 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & -2 & 1 & 0 \\ 0 & 0 & 1 & -4 & 2 & -1 \end{array}\right]$
  4. $R_{2} \to R_{2} - R_{3}$, then $R_{1} \to R_{1} - 2R_{2}$: $\left[\begin{array}{ccc|ccc} 1 & 0 & 0 & -3 & 2 & -2 \\ 0 & 1 & 0 & 2 & -1 & 1 \\ 0 & 0 & 1 & -4 & 2 & -1 \end{array}\right]$
  5. The left half is $I$, so the right half is $A^{-1}$. Check one entry of $AA^{-1}$: row 1 of $A$ times column 1 of $A^{-1}$ is $(1)(-3) + (2)(2) + (0)(-4)$ $= 1$. ✓

Answer: $A^{-1} = \begin{bmatrix} -3 & 2 & -2 \\ 2 & -1 & 1 \\ -4 & 2 & -1 \end{bmatrix}$

Worked example: A 2 × 2 inverse and a system

Solve $3x + 5y = 1$, $x + 2y = 0$ using an inverse.
  1. $A = \begin{bmatrix} 3 & 5 \\ 1 & 2 \end{bmatrix}$, and $ad - bc = 6 - 5 = 1$.
  2. $A^{-1} = \begin{bmatrix} 2 & -5 \\ -1 & 3 \end{bmatrix}$.
  3. $\mathbf{x}$ $= A^{-1}\mathbf{b}$ $= \begin{bmatrix} 2 & -5 \\ -1 & 3 \end{bmatrix}\begin{bmatrix} 1 \\ 0 \end{bmatrix}$ $= \begin{bmatrix} 2 \\ -1 \end{bmatrix}$.
  4. Check: $3(2) + 5(-1) = 1$ ✓ and $2 + 2(-1) = 0$ ✓.

Answer: $(x, y) = (2, -1)$

Inverses of products

If $A$ and $B$ are invertible, so is $AB$, with $$(AB)^{-1} = B^{-1}A^{-1}.$$ Check: $(AB)(B^{-1}A^{-1})$ $= A(BB^{-1})A^{-1}$ $= AIA^{-1}$ $= AA^{-1}$ $= I$. Also $(A^{-1})^{-1} = A$ and $(A^{T})^{-1} = (A^{-1})^{T}$.

Common mistake

Writing $(AB)^{-1} = A^{-1}B^{-1}$. To undo "do $B$, then $A$", you undo $A$ first and $B$ second, just as you take off your shoes before your socks. Check by multiplying: $(AB)(A^{-1}B^{-1})$ does not collapse, because $B$ and $A^{-1}$ are not next to each other.
An invertible matrix moves the grid without collapsing it (area factor $\neq 0$), so every point can be traced back. Try the "Squash" preset: the plane flattens onto a line, and no inverse can undo that.

Key idea

$A^{-1}$ undoes $A$. Row reduce $[\,A \mid I\,]$: if the left side becomes $I$, the right side is $A^{-1}$; if not, $A$ is not invertible. Products invert in reverse order: $(AB)^{-1} = B^{-1}A^{-1}$.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • Margalit and Rabinoff, Interactive Linear Algebra (Georgia Tech), §3.5 Matrix Inverses
  • MIT OpenCourseWare 18.06 Linear Algebra (Gilbert Strang, Spring 2010), Lecture 3: Multiplication and Inverse Matrices
@teddyrookbook GitHub