Section 9.2 Finding \(A^{-1}\) and using it to solve equations
Example 9.2.1.
We can reformulate this procedure for finding the inverse of a matrix. For the sake of convenience, suppose that \(A\) is a \(2\times2\) invertible matrix with inverse \(B=\begin{bmatrix} \bvec_1 \amp \bvec_2 \end{bmatrix}\text{.}\) Rather than solving the equations
\begin{equation*}
A\bvec_1 = \twovec10,~~~
A\bvec_2 = \twovec01
\end{equation*}
separately, we can solve them at the same time by augmenting \(A\) by both vectors \(\twovec10\) and \(\twovec01\) and finding the reduced row echelon form.
For example, if \(A =
\begin{bmatrix}
1 \amp 2 \\
1 \amp 1 \\
\end{bmatrix}\text{,}\) we form
\begin{equation*}
\left[
\begin{array}{rr|rr}
1 \amp 2 \amp 1 \amp 0 \\
1 \amp 1 \amp 0 \amp 1 \\
\end{array}
\right]
\sim
\left[
\begin{array}{rr|rr}
1 \amp 0 \amp -1 \amp 2 \\
0 \amp 1 \amp 1 \amp -1 \\
\end{array}
\right].
\end{equation*}
This shows that the matrix \(B =
\begin{bmatrix}
-1 \amp 2 \\
1 \amp 1 \\
\end{bmatrix}\) is the inverse of \(A\text{.}\)
In other words, beginning with \(A\text{,}\) we augment by the identify and find the reduced row echelon form to determine \(A^{-1}\text{:}\)
\begin{equation*}
\left[
\begin{array}{r|r}
A \amp I \\
\end{array}
\right]
\sim
\left[
\begin{array}{r|r}
I \amp A^{-1} \\
\end{array}
\right].
\end{equation*}
Proposition 9.2.2.
The matrix \(A\) is invertible if and only if the reduced row echelon form of \(A\) is the identity matrix: \(A\sim I\text{.}\) In addition, we can find the inverse by augmenting \(A\) by the identity and finding the reduced row echelon form:
\begin{equation*}
\left[
\begin{array}{r|r}
A \amp I \\
\end{array}
\right]
\sim
\left[
\begin{array}{r|r}
I \amp A^{-1} \\
\end{array}
\right].
\end{equation*}
It is important to remember that the product of two matrices depends on the order in which they are multiplied. That is, if \(C\) and \(D\) are matrices, then it sometimes happens that \(CD \neq DC\text{.}\) However, something fortunate happens when we consider invertibility. It turns that if \(A\) is an \(n\times n\) matrix and that \(AB=I\text{,}\) then it is also true that \(BA=I\text{.}\) This leads to the following proposition.
Proposition 9.2.3.
If \(A\) is a \(n\times n\) invertible matrix with inverse \(B\text{,}\) then \(BA=I\text{,}\) which tells us that \(B\) is invertible with inverse \(A\text{.}\) In other words,
\begin{equation*}
(A^{-1})^{-1} = A.
\end{equation*}
If \(A\) is an invertible matrix, then the solution to \(A\xvec = \bvec\) is \(\xvec = A^{-1}\bvec\text{.}\)
Proposition 9.2.4. Properties of invertible matrices.
An \(n\times n\) matrix \(A\) is invertible if and only if \(A\sim I\text{.}\)
If \(A\) is invertible, then the solution to the equation \(A\xvec = \bvec\) is given by \(\xvec =
A^{-1}\bvec\text{.}\)
We can find \(A^{-1}\) by finding the reduced row echelon form of \(\left[\begin{array}{r|r} A \amp I
\end{array}\right]\text{;}\) namely,
\begin{equation*}
\left[\begin{array}{r|r} A \amp I \end{array}\right]
\sim
\left[\begin{array}{r|r} I \amp A^{-1} \end{array}\right]\text{.}
\end{equation*}
If \(A\) and \(B\) are two invertible \(n\times
n\) matrices, then their product \(AB\) is also invertible and \((AB)^{-1} = B^{-1}A^{-1}\text{.}\)
There is a simple formula for finding the inverse of a \(2\times2\) matrix:
\begin{equation*}
\left[\begin{array}{rr}
a \amp b \\
c \amp d \\
\end{array}\right]^{-1}
=
\frac{1}{ad-bc}
\left[\begin{array}{rr}
d \amp -b \\
-c \amp a \\
\end{array}\right]\text{.}
\end{equation*}
Activity 9.2.1.
We’ll begin by considering the square matrix
\begin{equation*}
A = \begin{bmatrix}
1 \amp 0 \amp 2 \\
2 \amp 2 \amp 1 \\
1 \amp 1 \amp 1 \\
\end{bmatrix}.
\end{equation*}
Describe the solution space to the equation
\(A\xvec
= \threevec343\) by augmenting
\(A\) and finding the reduced row echelon form.
I=identity_matrix(3) will make a
\(3 \times 3\) identity matrix in Sage and
A.augment(I).rref() will find the reduced row echelon form of
\(\left[\begin{array}{r|r} A \amp I \end{array}\right]\text{.}\)
Now use the inverse to solve the equation \(A\xvec =
\threevec343\) and verify that your result agrees with what you found in part a.
If you have defined a matrix B in Sage, you can find it’s inverse as B.inverse() or B^-1. Use Sage to find the inverse of the matrix
\begin{equation*}
B = \left[\begin{array}{rrr}
1 \amp -2 \amp -1 \\
-1 \amp 5 \amp 6 \\
5 \amp -4 \amp 6 \\
\end{array}\right]
\end{equation*}
and use it to solve the equation
\(B\xvec =
\threevec83{36}\text{.}\)
If \(A\) and \(B\) are the two matrices defined in this activity, find their product \(AB\) and verify that it is invertible.
Compute the products \(A^{-1}B^{-1}\) and \(B^{-1}A^{-1}\text{.}\) Which one agrees with \((AB)^{-1}\text{?}\)
Explain your finding by considering the product
\begin{equation*}
(AB)(B^{-1}A^{-1})
\end{equation*}
and using associativity to regroup the products so that the middle two terms are multiplied first.
Solution.
Constructing the augmented matrix, we see that
\begin{equation*}
\left[\begin{array}{rrr|r}
1 \amp 0 \amp 2 \amp 3 \\
2 \amp 2 \amp 1 \amp 4 \\
1 \amp 1 \amp 1 \amp 3
\end{array}\right]
\sim
\left[\begin{array}{rrr|r}
1 \amp 0 \amp 0 \amp -1 \\
0 \amp 1 \amp 0 \amp 2 \\
0 \amp 0 \amp 1 \amp 2
\end{array}\right],
\end{equation*}
which says that there is a unique solution \(\xvec =
\threevec{-1}22\text{.}\)
Our work in part a shows that \(A\sim I\) from which we conclude that \(A\) is invertible. To find the inverse,
\begin{equation*}
\left[\begin{array}{rrr|rrr}
1 \amp 0 \amp 2 \amp 1 \amp 0 \amp 0 \\
2 \amp 2 \amp 1 \amp 0 \amp 1 \amp 0 \\
1 \amp 1 \amp 1 \amp 0 \amp 0 \amp 1
\end{array}\right]
\sim
\left[\begin{array}{rrr|rrr}
1 \amp 0 \amp 0 \amp 1 \amp 2 \amp -4 \\
0 \amp 1 \amp 0 \amp -1 \amp -1 \amp 3 \\
0 \amp 0 \amp 1 \amp 0 \amp -1 \amp 2
\end{array}\right],
\end{equation*}
which says that
\begin{equation*}
A^{-1} = \begin{bmatrix}
1 \amp 2 \amp -4 \\
-1 \amp -1 \amp 3 \\
0 \amp -1 \amp 2 \\
\end{bmatrix}.
\end{equation*}
We see that \(A^{-1}\threevec343 = \threevec{-1}22\text{.}\)
Sage tells us that \(B^{-1}\threevec{8}3{36} =
\threevec4{-1}2\text{.}\)
Sage helps us see that \((AB)\sim I\text{,}\) which tells us that \(AB\) is invertible.
We find that \((AB)^{-1} = B^{-1}A^{-1}\text{.}\)
We see that
\begin{equation*}
(AB)(B^{-1}A^{-1}) = A(BB^{-1})A^{-1} = AIA^{-1} =
AA^{-1} = I.
\end{equation*}