Skip to main content
Logo image

Section 1.7 Matrix Inverses

Consider the equation \(75x = 2\text{.}\) We can solve this quite easily for \(x\) by dividing both sides by \(75\text{,}\) or equivalently, multiplying both sides of the equation by \(frac{1}{75} = 75^{-1}\text{.}\) \(75^{-1}\) is the multiplicative inverse of the number \(75\text{,}\) and so when multiplied to it we are left with only the number \(1\text{.}\) We want to do the same with the matrix equation \(A\vb{x} = \vb{b}\text{;}\) that is, we want to find an inverse matrix \(A^{-1}\) that, when multiplied to \(A\text{,}\) leaves only the identity matrix.

Definition 1.7.1. Invertible Matrices.

An \(n\times n\) matrix \(A\) is said to be invertible (or nonsingular) if there exists a matrix \(A^{-1}\) such that \(A^{-1}A = AA^{-1} = I_{n}\text{.}\) We call \(A^{-1}\) the inverse of \(A\text{.}\) If a matrix is not invertible, then we say that it is singular.
Note that if \(A\) is a square matrix and \(C\) is another square matrix such that either \(AC = I\) or \(CA = I\text{,}\) then \(C = A^{-1}\text{.}\)

Example 1.7.2. Confirming a Matrix Inverse.

Let
\begin{equation*} A = \mqty[1 & 0 & -2 \\ -3 & 1 & 4 \\ 2 & -3 & 4]. \end{equation*}
  1. Show that the matrix
    \begin{equation*} C = \mqty[8 & 3 & 1 \\ 10 & 4 & 1 \\ \frac{7}{2} & \frac{3}{2} & \frac{1}{2}] \end{equation*}
    is the inverse of \(A\text{.}\)
  2. Let
    \begin{equation*} \vb{b} = \mqty[1 \\ 1 \\ 1]. \end{equation*}
    Solve \(A\vb{x} = \vb{b}\text{.}\)
Solution.
  1. All we need to do is to show that \(AC = I\text{.}\) This can be done quickly using Octave as in the code cell below.
  2. The solution is \(\vb{x} = A^{-1}\vb{b}\text{.}\) Given that we now know \(A^{-1}\text{,}\) we can solve this quickly.

Example 1.7.3. Inverse of an Orthogonal Matrix.

Let \(U\) be an orthogonal matrix. What is \(U^{-1}\text{?}\)
Solution.
\(U^{-1} = U^{T}\text{.}\) So it is very easy to find the inverse of an orthogonal matrix.
An important property about determinants is that they say precisely when a matrix is invertible. If \(A\) is an \(n\times n\) matrix, then \(A\) has an inverse if and only if \(\det A \neq 0\text{.}\)
To prove this statement we must show two things:
  1. \(A^{-1}\vb{b}\) is a solution.
  2. \(A^{-1}\vb{b}\) is the only solution.
We start with the first item. To check that \(A^{-1}\vb{b}\) is a solution of \(A\vb{x} = \vb{b}\text{,}\) we just plug it in for \(\vb{x}\) and simplify:
\begin{equation*} A(A^{-1}\vb{b}) = I\vb{b} = \vb{b}. \end{equation*}
Hence this is a solution.
To show that this is the only solution, suppose that \(\vb{u}\) is some other solution of \(A\vb{x} = \vb{b}\text{.}\) We must show that \(\vb{u} = A^{-1}\vb{b}\text{.}\) Since \(\vb{u}\) is assumed to be a solution, we have
\begin{equation*} \vb{u} = \vb{b}\Rightarrow \vb{u} = A^{-1}\vb{b}. \end{equation*}
Hence \(A^{-1}\vb{b}\) is the only solution.

Subsection Computing the Inverse of a Matrix

For \(2\times 2\) matrices, we have a simple formula for the inverse.
The quantity \(ad-bc\) in Theorem 1.7.5 can also be recognized as the determinant of the matrix \(A\text{.}\) See Definition 1.6.1.

Example 1.7.6.

Show that the system
\begin{align*} 9x_{1}+3x_{2} &= -9\\ -6x_{1}-3x_{2} &= 4 \end{align*}
is consistent and then find the solution.
Solution.
We can rewrite this as the matrix equation \(A\vb{x} = \vb{b}\text{,}\) where
\begin{equation*} A = \mqty[9 & 3 \\ -6 & -3],\qq{}\vb{x} = \mqty[x_{1} \\ x_{2}]\qq{and} \vb{b} = \mqty[-9 \\ 4]. \end{equation*}
We can show that the system is consistent by computing \(\det A\text{:}\) since \(\det A = -9\neq0\text{,}\) \(A^{-1}\) exists. And since \(A^{-1}\) exists, the system must be solvable.
To solve it, we use the above formula to compute \(A^{-1}\text{:}\)
\begin{equation*} A^{-1} = -\frac{1}{9}\mqty[-3 & -3 \\ 6 & 9] = \mqty[\frac{1}{3} & \frac{1}{3} \\ -\frac{2}{3} & -1 ]. \end{equation*}
So the (unique) solution is
\begin{equation*} \vb{x} = A^{-1}\vb{b} = \mqty[\frac{1}{3} & \frac{1}{3} \\ -\frac{2}{3} & -1 ]\mqty[-9 \\ 4]. \end{equation*}

Subsection The Invertible Matrix Algorithm

We can now find the inverse of a \(2\times2\) matrix; we need to determine how to find the inverse of a larger matrix. To do this, we will use elementary matrices.

Definition 1.7.8. Elementary Matrices.

An elementary matrix is a matrix obtained by performing a single elementary row operation on the identity matrix.

Example 1.7.9.

The matrices
\begin{equation*} E_{1} = \mqty[2 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1],E_{2} = \mqty[1 & 5 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1]\text{ and } E_{3} = \mqty[0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0] \end{equation*}
are elementary matrices. The first corresponds to scaling the first row by \(2\text{;}\) the second corresponds to adding five times the second row to the first row; and the third corresponds to switching rows one and three.
The important fact about elementary matrices is that multiplying them to any matrix has the same effect as performing the corresponding elementary row operation on the matrix.

Example 1.7.10.

Let
\begin{equation*} A = \mqty[1 & 2 & 9 \\ 0 & 3 & 3 \\ 4 & 4 & 1]. \end{equation*}
Use elementary matrices to perform the following row operations:
  1. Add two times row three to row two.
  2. Scale row three by \(-3\text{.}\)
  3. Swap row two with row one and then add five times row three to row one.
Solution.
For each case, we only need to determine the elementary matrix corresponding to each row operation. The elementary matrix for the first operation is
\begin{equation*} E_{1} = \mqty[1 & 0 & 0 \\ 0 & 1 & 2 \\ 0 & 0 & 1]. \end{equation*}
To perform this operation on \(A\text{,}\) we just multiply \(E_{1}\) and \(A\text{:}\)
\begin{align*} A &\rowop{2R_{3}+R_{2}} E_{1}A \\ &= \mqty[1 & 2 & 9 \\ 8 & 11 & 5 \\ 4 & 4 & 1] \end{align*}
which matches with the matrix we would have obtained just using a row operation.
The elementary matrix we need for the next operation is
\begin{equation*} E_{2} = \mqty[1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -3] \end{equation*}
and so
\begin{equation*} A\rowop{-3R_{3}} E_{2}A. \end{equation*}
Finally, we have two elementary row operations here, so we can't just use a single elementary matrix. We'll need to use two; one for each row operation:
\begin{equation*} E_{3} = \mqty[0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1]\qq{and} E_{4} = \mqty[1 & 0 & 5 \\ 0 & 1 & 0 \\ 0 & 0 & 1]. \end{equation*}
So
\begin{equation*} A\rowop[R_{1}\leftrightarrow R_{2}]{5R_{3}+R_{1}} E_{4}E_{3}A. \end{equation*}
So row operations on a matrix can be viewed as multiplications by elementary matrices. And since row operations are invertible, elementary matrices are invertible as well. To find the inverse of an elementary matrix \(E\text{,}\) just write down the elementary matrix corresponding to the row operation that transforms \(E\) back into \(I\text{.}\)

Example 1.7.11. Inverse of an Elementary Matrix.

Let \(E_{1},E_{2}\) and \(E_{4}\) be as above. Find the inverse of each matrix.
Solution.
We have
\begin{equation*} E_{1}^{-1} = \mqty[1 & 0 & 0 \\ 0 & 1 & -2 \\ 0 & 0 & 1],\qq{}E_{2}^{-1} = \mqty[1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -\frac{1}{3}]\qq{and}E_{4}^{-1} = \mqty[1 & 0 & -5 \\ 0 & 1 & 0 \\ 0 & 0 & 1]. \end{equation*}
Suppose that \(A\) is row equivalent to the identity matrix \(I\text{.}\) Then we can find elementary matrices \(E_{1},E_{2},\ldots,E_{p}\) such that
\begin{equation*} I = E_{p}E_{p-1}\cdots E_{2}E_{1}A. \end{equation*}
Since elementary matrices are invertible, their product must be as well. So we can write
\begin{equation*} (E_{p}\cdots E_{1})^{-1} = A. \end{equation*}
Since \(A\) is the inverse of an invertible matrix, it must itself be invertible and furthermore
\begin{equation*} A^{-1} = E_{p}\cdots E_{1}. \end{equation*}
The above theorem tells us that the sequence of row operations that reduces \(A\) to \(I\) also turns \(I\) into \(A^{-1}\text{.}\) This gives us an algorithm for finding the inverse of a matrix. We show this with an example.

Example 1.7.13.

Let
\begin{equation*} A = \mqty[-1 & -7 & -3 \\ 2 & 15 & 6 \\ 1 & 3 & 2]. \end{equation*}
Compute \(A^{-1}\text{.}\)
Solution.
We set up the augmented matrix \(\mqty[A& I]\text{.}\) The algorithm works by finding the reduced echelon form; the resulting augmented matrix is then \(\mqty[I& A^{-1}]\text{.}\)
\begin{align*} \mqty[-1 & -7 & -3 & 1 & 0 & 0 \\ 2 & 15 & 6 & 0 & 1 & 0 \\ 1 & 3 & 2 & 0 & 0 & 1] &\sim\mqty[1 & 7 & 3 & -1 & 0 & 0 \\ 2 & 15 & 6 & 0 & 1 & 0 \\ 1 & 3 & 2 & 0 & 0 & 1]\\ &\rowop[-2R_{1}+R_{2}]{-R_{1}+R_{3}}\mqty[1 & 7 & 3 & -1 & 0 & 0 \\ 0 & 1 & 0 & 2 & 1 & 0 \\ 0 & -4 & -1 & 1 & 0 & 1]\\ &\rowop{4R_{2}+R_{3}}\mqty[1 & 7 & 3 & -1 & 0 & 0 \\ 0 & 1 & 0 & 2 & 1 & 0 \\ 0 & 0 & -1 & 9 & 4 & 1]\\ &\rowop{3R_{3}+R_{1}}\mqty[1 & 7 & 0 & 26 & 12 & 3 \\ 0 & 1 & 0 & 2 & 1 & 0 \\ 0 & 0 & -1 & 9 & 4 & 1]\\ &\rowop[-7R_{2}+R_{1}]{-R_{3}}\mqty[1 & 0 & 0 & 12 & 5 & 3 \\ 0 & 1 & 0 & 2 & 1 & 0 \\ 0 & 0 & 1 & -9 & -4 & -1] \end{align*}
So
\begin{equation*} A^{-1} = \mqty[12 & 5 & 3 \\ 2 & 1 & 0 \\ -9 & -4 & -1]. \end{equation*}

Example 1.7.14.

A square matrix \(A\) of size \(10\times10\text{.}\) Suppose that \(A\) has rank \(9\text{.}\) Is \(A\) invertible?
Solution.
No! This is because \(A\) does not have a pivot in each row (since \(\rank A = 9\text{,}\) \(A\) only has \(9\) pivots). Therefore we can't row reduce \(A\) to get \(I\text{.}\) Since \(A\) is not row equivalent to the identity matrix, \(A\) cannot be invertible.