# 20. Inverses

## 20. Inverses

In the next few videos, we're going to answer the question: can you divide by a matrix?

Theorem:

If $M=\begin{pmatrix}a&b\\ c&d\end{pmatrix}$ is a 2-by-2 matrix with $ad-bc\neq 0$ then the matrix $M^{-1}=\frac{1}{ad-bc}\begin{pmatrix}d&-b\\ -c&a\end{pmatrix}$ satisfies $M^{-1}M=MM^{-1}=I$ . We say that $M^{-1}$ is the inverse of $M$ .

This is the analogue of the reciprocal $x^{-1}=1/x$ of a number: the equation $M^{-1}M=I$ is the analogue of $x^{-1}x=1$ .

Let's just check $M^{-1}M=I$ (check the other equality for yourself). $\frac{1}{ad-bc}\begin{pmatrix}d&-b\\ -c&a\end{pmatrix}\begin{pmatrix}a&b\\ c&d\end{pmatrix}=\frac{1}{ad-bc}\begin{pmatrix}da-bc&db-bd\\ -ca+ac&-cb+ad\end{pmatrix}=\begin{pmatrix}1&0\\ 0&1\end{pmatrix}=I.$

We can use this to "divide" by a matrix: if we have a matrix equation $AB=C$ then we can multiply both sides on the left by $A^{-1}$ to get $A^{-1}AB=A^{-1}C$ , and since $A^{-1}A=I$ this means $B=A^{-1}C$ .

With great power comes great responsibility: you should never write $\frac{B}{A}$ for matrices $A,B$ ! It's not clear if you're doing $A^{-1}B$ or $BA^{-1}$ (and these are different because $A^{-1}$ and $B$ might not commute).

We can use inverses to solve simultaneous equations. For example: $x-y=-1,\qquad x+y=3$ is equivalent to $Av=b$ where $A=\begin{pmatrix}1&-1\\ 1&1\end{pmatrix}$ and $b=\begin{pmatrix}-1\\ 3\end{pmatrix}$ . We can compute $A^{-1}=\frac{1}{2}\begin{pmatrix}1&1\\ -1&1\end{pmatrix}$ , so $v=A^{-1}b=\frac{1}{2}\begin{pmatrix}1&1\\ -1&1\end{pmatrix}\begin{pmatrix}-1\\ 3\end{pmatrix}=\begin{pmatrix}1\\ 2\end{pmatrix},$ and this coincides with the solution $x=1$ , $y=2$ we found earlier.

### Bigger matrices

We'd like to generalise the notion of inverse to bigger matrices.

Definition:

Let $A$ be an $n$ -by-$n$ matrix. We say that $A$ is invertible if there exists a matrix $B$ such that $AB=BA=I$ . (Here $I$ is the $n$ -by-$n$ identity matrix). If such a $B$ exists, then it's unique, so we're justified in calling it the inverse of $A$ and writing it as $A^{-1}$ .

To see that the inverse is unique when it exists, suppose you had two inverses $B,C$ for $A$ : $AB=AC=I,\qquad BA=CA=I.$ Now evaluate $BAC$ in two ways:

• $BAC=(BA)C=IC=C,$

• $BAC=B(AC)=BI=B,$

so $C=BAC=B$ .

Lemma:

If $A,B$ are invertible matrices then $AB$ is invertible with inverse $(AB)^{-1}=B^{-1}A^{-1}$ .

we have $(AB)(B^{-1}A^{-1})=A(BB^{-1})A^{-1}=AIA^{-1}=AA^{-1}=I$ and $(B^{-1}A^{-1})(AB)=B^{-1}(A^{-1}A)B=B^{-1}IB=B^{-1}B=I,$ so $B^{-1}A^{-1}$ is an inverse for $AB$ .

Had we tried to use $A^{-1}B^{-1}$ instead, we would have obtained $ABA^{-1}B^{-1}$ , and we couldn't have cancelled anything because the various terms don't commute.

We saw for 2-by-2 matrices that a matrix is invertible if $ad-bc\neq 0$ . Even more basically, a 1-by-1 matrix $(x)$ is invertible if and only if $x\neq 0$ . We'll see in a few videos' time that there is an analogous quantity (the determinant) $\det(A)$ which is nonzero precisely when $A$ is invertible. First though, we're going to explain how to calculate inverses of $n$ -by-$n$ matrices.