For numbers, dividing by $5$ is multiplying by $\frac{1}{5}$, the number that undoes $5$. Matrices have no division, but many square matrices have an inverse that undoes them. Whether it exists depends on the determinant.
Key idea
$A^{-1}$ is the matrix with $AA^{-1} = A^{-1}A = I$ (the identity). It exists exactly when $\det A \ne 0$. 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}.$$ For larger matrices, row-reduce $[A \mid I]$ until it becomes $[I \mid A^{-1}]$.
Why it works
Multiply to check: $$\begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix} = \begin{bmatrix} ad - bc & 0 \\ 0 & ad - bc \end{bmatrix} = (ad - bc)I.$$ Dividing by $ad - bc$ gives exactly $I$, which is possible only if $ad - bc \ne 0$. For row reduction: the row operations that turn $A$ into $I$ amount to multiplying by $A^{-1}$, so doing the same operations to $I$ produces $A^{-1}$.
Worked examples
Worked example: Determinant one
Find the inverse of $\begin{bmatrix} 3 & 1 \\ 5 & 2 \end{bmatrix}$.
- $\det = 3 \cdot 2 - 1 \cdot 5 = 1$.
- Swap the diagonal, negate the other two, divide by $1$: $\begin{bmatrix} 2 & -1 \\ -5 & 3 \end{bmatrix}$.
- Check: $$\begin{bmatrix} 3 & 1 \\ 5 & 2 \end{bmatrix}\begin{bmatrix} 2 & -1 \\ -5 & 3 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}.$$ ✓
Answer: $\begin{bmatrix} 2 & -1 \\ -5 & 3 \end{bmatrix}$
Worked example: Fractions
Find the inverse of $\begin{bmatrix} 4 & 2 \\ 3 & 1 \end{bmatrix}$.
- $\det = 4 - 6 = -2$.
- $-\frac{1}{2}\begin{bmatrix} 1 & -2 \\ -3 & 4 \end{bmatrix}$.
Answer: $\begin{bmatrix} -\frac{1}{2} & 1 \\ \frac{3}{2} & -2 \end{bmatrix}$
Worked example: No inverse
Does $\begin{bmatrix} 2 & 4 \\ 1 & 2 \end{bmatrix}$ have an inverse?
- $\det = 4 - 4 = 0$.
- The second column is twice the first, so the matrix squashes the plane onto a line.
Answer: No
Common mistake
Inverting each entry, writing $\begin{bmatrix} \frac{1}{3} & 1 \\ \frac{1}{5} & \frac{1}{2} \end{bmatrix}$ for the inverse of $\begin{bmatrix} 3 & 1 \\ 5 & 2 \end{bmatrix}$. Multiply it back and you will not get $I$. Always check: $AA^{-1}$ must be the identity.