Section 2.3 Matrix Inverses and Two Variable Systems
We have been learning how to perform arithmetic with matrices, including matrix multiplication. Now we learn how matrix multiplication connects to linear systems and how to solve two variable linear systems using the inverse of a matrix.
Subsection Prepare
Letβs start by seeing how a two-variable linear system can viewed in terms of matrix multiplication.
Consider the linear system
\begin{align*}
x_1+x_2 \amp=-1 \\
2x_1-3x_2 \amp=8 \text{.}
\end{align*}
Previously, we would have solved this system by forming an augmented matrix with the coefficients and constants, row reduce, and interpret the solutions from the reduced row echelon form.
However, now that we know about matrix multiplication, letβs try something different. Form a matrix from the coefficients,
\begin{equation*}
A=\begin{bmatrix} 1 \amp 1 \\ 2 \amp -3 \end{bmatrix}\text{,}
\end{equation*}
a column matrix from the variables,
\begin{equation*}
X=\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}\text{,}
\end{equation*}
and a column matrix from the constants,
\begin{equation*}
B=\begin{bmatrix} -1 \\ 8 \end{bmatrix}\text{.}
\end{equation*}
Notice what we get when we multiply \(AX\text{:}\)
\begin{equation*}
AX=\begin{bmatrix} 1 \amp 1 \\ 2 \amp -3 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}
=\begin{bmatrix}x_1+x_2 \\ 2x_1-3x_2 \end{bmatrix}\text{.}
\end{equation*}
Recall that two matrices are equal exactly when they are the same size and their corresponding entries are equal. So the matrix equation \(AX=B\) is
\begin{equation*}
\begin{bmatrix}x_1+x_2 \\ 2x_1-3x_2 \end{bmatrix}=\begin{bmatrix} -1 \\ 8 \end{bmatrix}\text{,}
\end{equation*}
and setting the first entries equal to each other and the second entries equal to each other gives
\begin{align*}
x_1+x_2 \amp=-1 \\
2x_1-3x_2 \amp=8 \text{.}
\end{align*}
But this is precisely the linear system we started with! This result is not an coincidence: we can always rewrite linear systems using matrix multiplication. Letβs practice.
Writing linear systems in terms of matrix multiplication raises a new question: how can we solve a linear system that is written in the form \(AX=B\text{?}\)
We take our inspiration from the usual algebra of numbers. If \(a, b\) and \(x\) are numbers and \(a\neq 0\text{,}\) then we solve the equation \(ax=b\) by dividing both sides by \(a\) and get
\begin{equation*}
x = \frac{b}{a}\text{.}
\end{equation*}
We do this precisely because \(\frac{1}{a}\cdot a=1\text{,}\) so writing out more details would give us
\begin{align*}
ax \amp= b \\
\frac{1}{a}\cdot ax \amp= \frac{1}{a}\cdot b \\
1x \amp= \frac{1}{a}\cdot b \\
x \amp= \frac{1}{a}\cdot b = \frac{b}{a}\text{.}
\end{align*}
The key feature is that \(\frac{1}{a}\) is the thing we multiply by \(a\) to get \(1\text{;}\) to solve a linear system \(AX=B\text{,}\) weβll want to do something analogous for matrices. We sometimes call \(\frac{1}{a}\) the multiplicative inverse of \(a\text{,}\) and we know that \(\frac{1}{a}=a^{-1}\) if written as an exponent. We will use this same language and notation for matrices as well.
In Worksheet ExerciseΒ 2, we learned about the identity matrix \(I\) that acts like the number \(1\) for square matrices. For example, the identity matrix of size \(3\) is \(\begin{bmatrix}1 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \\ 0 \amp 0 \amp 1 \end{bmatrix}\text{,}\) and then if \(A\) is any \(3\times 3\) matrix, then
\begin{equation*}
I A = A I = A\text{.}
\end{equation*}
Similarly for the identity matrix of size \(2\text{,}\) which is \(\begin{bmatrix} 1 \amp 0 \\ 0 \amp 1 \end{bmatrix}\) and any \(2\times 2\) matrix.
If we had a matrix \(A^{-1}\) such that \(A^{-1} A= I\text{,}\) then by analogy to our algebra example above it seems like we might be able to solve the linear system \(A X = B\) for \(X\) by multiplying both sides of the equation by \(A^{-1}\text{.}\) That is,
\begin{align*}
AX \amp= B \amp \amp \\
A^{-1} AX \amp= A^{-1} B \amp \amp \amp \amp \text{multiply both sides on the left by }A^{-1} \\
(A^{-1} A)X \amp= A^{-1} B \amp \amp \amp \amp\text{matrix multiplication is associative} \\
IX \amp= A^{-1}B \amp \amp \amp \amp\text{because }A^{-1}A=I\\
X \amp= A^{-1}B \amp \amp \amp \amp\text{because }IX=X\text{.}
\end{align*}
It seems that we might be able to solve linear systems using matrix multiplication and inverses instead of row reducing.
Of course, there are some differences between matrix multiplication and number multiplication, as we explored throughout Matrix Multiplication Participate, and one consequence is that we arenβt guaranteed that a matrix acting like \(A^{-1}\) exists for every square matrix \(A\text{.}\) For the \(2\times 2\) matrices that arise from two-variable linear systems, it is straightforward to tell when \(A^{-1}\) exists.
Definition 2.3.2. Invertible Matrices and the Inverse of A.
Let \(A\) be an \(n\times n\) matrix. If there exists an \(n\times n\) matrix \(C\) such that \(A C = I = C A\text{,}\) then
-
\(A\) is invertible.
-
\(C\) is the multiplicative inverse, or just inverse, of \(A\text{,}\) denoted by \(A^{-1}\text{.}\)
-
Furthermore, if \(A\) is a \(2 \times 2\) matrix\begin{equation*} A = \left[\begin{array}{cc} a\amp b\\c\amp d \end{array} \right]\text{,} \end{equation*}the matrix \(A^{-1}\) exists precisely when \(ad-bc\neq 0\) and then\begin{equation*} A^{-1} = \frac{1}{ad-bc}\left[\begin{array}{cc} d\amp -b\\-c\amp a \end{array} \right]\text{.} \end{equation*}
Note that there are many matrices \(A\) where there is no matrix that can be multiplied by \(A\) to get the identity matrix; in this case, we say that \(A\) is not invertible.
Example 2.3.3. A Matrix Without An Inverse.
Recall Worksheet ExerciseΒ 3, where
\begin{equation*}
A = \left[\begin{array}{cc} 1\amp 2\\-2\amp -4 \end{array} \right]\text{.}
\end{equation*}
Here, \(ad-bc = 1(-4) - 2(-2) = 0\) and so \(A\) doesnβt have an inverse.
This is why multiplying by \(A\) in that exercise didnβt act like multiplying by a number does; every nonzero number \(a\) has an inverse \(\frac{1}{a}\text{.}\)
Activity 2.3.4. Identifying Key Parts for an Inverse.
The formula for the inverse of any \(2\times 2\) matrix depends on viewing the matrix in the form \(\begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix}\text{.}\) Let
\begin{equation*}
A=\begin{bmatrix} 1 \amp 2 \\ 3 \amp 4 \end{bmatrix}\text{.}
\end{equation*}
(a)
- For a matrix described by \(\begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix}\text{,}\) the entry \(a\) is the entry in the top left and \(d\) is the entry in the bottom right.
- Correct!
- For a matrix described by \(\begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix}\text{,}\) the entry \(a\) is the entry in the top left and \(d\) is the entry in the bottom right.
- For a matrix described by \(\begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix}\text{,}\) the entry \(a\) is the entry in the top left and \(d\) is the entry in the bottom right.
(b)
- For a matrix described by \(\begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix}\text{,}\) the entry \(b\) is the entry in the top right and \(c\) is the entry in the bottom left.
- For a matrix described by \(\begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix}\text{,}\) the entry \(b\) is the entry in the top right and \(c\) is the entry in the bottom left.
- Correct!
- Donβt multiply them by \(-1\) like in the inverse, just identify what \(b\) and \(c\) are to start with.
(c)
- \(-2\)
- Correct! \(a=1\text{,}\) \(d=4\text{,}\) \(b=2\text{,}\) and \(c=3\text{,}\) so\begin{equation*} ad-bc=1\cdot 4 - 2\cdot 3 = 4-6 = -2 \end{equation*}
- \(2\)
- \(a=1\text{,}\) \(d=4\text{,}\) \(b=2\text{,}\) and \(c=3\text{,}\) so\begin{equation*} ad-bc=1\cdot 4 - 2\cdot 3 \end{equation*}
- \(10\)
- \(a=1\text{,}\) \(d=4\text{,}\) \(b=2\text{,}\) and \(c=3\text{,}\) so\begin{equation*} ad-bc=1\cdot 4 - 2\cdot 3 \end{equation*}
- \(\frac{-1}{2}\)
- \(a=1\text{,}\) \(d=4\text{,}\) \(b=2\text{,}\) and \(c=3\text{,}\) so\begin{equation*} ad-bc=1\cdot 4 - 2\cdot 3 \end{equation*}
(d)
Which matrix below is \(\begin{bmatrix} d \amp -b \\ -c \amp a \end{bmatrix}\) for the matrix \(A\text{?}\)
- \(\begin{bmatrix} -1 \amp 3 \\ 2 \amp -4 \end{bmatrix}\)
- To calculate \(\begin{bmatrix} d \amp -b \\ -c \amp a \end{bmatrix}\text{,}\) you swap entries \(a\) and \(d\) and multiply entries \(b\) and \(c\) by negative 1.
- \(\begin{bmatrix} -4 \amp -2 \\ -3 \amp -1 \end{bmatrix}\)
- To calculate \(\begin{bmatrix} d \amp -b \\ -c \amp a \end{bmatrix}\text{,}\) you swap entries \(a\) and \(d\) and multiply entries \(b\) and \(c\) by negative 1.
- \(\begin{bmatrix} 4 \amp -2 \\ -3 \amp 1 \end{bmatrix}\)
- Correct!
- \(\begin{bmatrix} 4 \amp -3 \\ -2 \amp 1 \end{bmatrix}\)
- To calculate \(\begin{bmatrix} d \amp -b \\ -c \amp a \end{bmatrix}\text{,}\) you swap entries \(a\) and \(d\) and multiply entries \(b\) and \(c\) by negative 1.
(e)
Which of the matrices below is \(A^{-1}\text{?}\)
- \(\begin{bmatrix} -2 \amp 1 \\ \frac{3}{2} \amp \frac{-1}{2} \end{bmatrix}\)
- Correct!
- \(\begin{bmatrix} 4 \amp -2 \\ -3 \amp 1 \end{bmatrix}\)
- Donβt forget to multiply by \(\frac{1}{ad-bc}\text{.}\)
- \(\frac{-1}{2}\begin{bmatrix} 4 \amp -2 \\ -3 \amp 1 \end{bmatrix}\)
- Correct!
- \(-2\begin{bmatrix} 4 \amp -2 \\ -3 \amp 1 \end{bmatrix}\)
- Multiply by \(\frac{1}{ad-bc}\text{,}\) not \(ad-bc\text{.}\)
Letβs see another example.
Example 2.3.5. Using the formula for \(2\times 2\) inverses.
Calculate the inverse, if it exists, of
\begin{equation*}
A = \left[\begin{array}{cc} 3 \amp 2\\-1 \amp 9 \end{array} \right]\text{.}
\end{equation*}
If \(A^{-1}\) exists, use it to solve the linear system
\begin{align*}
3x + 2y \amp= 29 \\
-x + 9y \amp= -29
\end{align*}
Solution.
Since \(ad-bc = 29 \neq 0\text{,}\) we know \(A^{-1}\) exists and we calculate
\begin{align*}
A^{-1} \amp = \frac{1}{3(9)-2(-1)}\left[\begin{array}{cc} 9\amp -2\\
1\amp 3\end{array}\right]\\
\amp = \frac{1}{29}\left[\begin{array}{cc} 9\amp -2\\
1\amp 3\end{array}\right]
\end{align*}
We can leave our answer in this form, or we could multiply it out and get
\begin{equation*}
A^{-1} = \frac{1}{29}\left[\begin{array}{cc} 9\amp -2\\1\amp 3 \end{array} \right] = \left[\begin{array}{cc} 9/29 \amp -2/29\\1/29 \amp 3/29 \end{array} \right]\text{.}
\end{equation*}
To solve the system
\begin{align*}
3x + 2y \amp= 29 \\
-x + 9y \amp= -29 \text{,}
\end{align*}
we write
\begin{align*}
\left[\begin{array}{cc} 3 \amp 2\\-1 \amp 9 \end{array} \right] \begin{bmatrix}x \\ y \end{bmatrix} \amp = \begin{bmatrix} 29 \\ -29 \end{bmatrix} \amp \amp \text{rewrite as a matrix equation} \\
A \begin{bmatrix}x \\ y \end{bmatrix} \amp = \begin{bmatrix} 29 \\ -29 \end{bmatrix} \amp \amp \text{the matrix of coefficients is }A \\
A^{-1}A \begin{bmatrix}x \\ y \end{bmatrix} \amp = A^{-1}\begin{bmatrix} 29 \\ -29 \end{bmatrix} \amp \amp \text{multiply on the left by }A^{-1}\\
\begin{bmatrix}x \\ y \end{bmatrix} \amp = \left[\begin{array}{cc} 9/29 \amp -2/29\\1/29 \amp 3/29 \end{array} \right]\begin{bmatrix} 29 \\ -29 \end{bmatrix} \amp \amp \text{use what we calculated for } A^{-1} \\
\begin{bmatrix}x \\ y \end{bmatrix} \amp = \begin{bmatrix} 11 \\ -2 \end{bmatrix} \amp \amp \text{multiply the matrices together}\text{.}
\end{align*}
We check that
\begin{align*}
3\cdot 11 + 2(-2) \amp= 29 \\
-11 + 9(-2) \amp= -29
\end{align*}
and see that \(x=11\text{,}\) \(y=-2\) is indeed a solution to the given linear system.
Reading Questions Reading Questions
1. Invertible or Not?
2. What Are Inverses, Anyway?
In your own words, explain what you understand about the relationship between the identity matrix, the inverse of a square matrix if the inverse exists, and the solution to a linear system of equations.
3. Reflection.
(a)
(b)
Ask a question about the material. What additional information do you think someone would need to become more confident in their understanding?
Worksheet Participate
Objectives
-
Calculate the inverse of a \(2\times 2\) matrix or say why an inverse doesnβt exist.
-
Use the inverse and matrix multiplication to solve a 2-variable system of linear equations.
1.
Let \(A=\begin{bmatrix} 2 \amp 1 \\ 7 \amp 4 \end{bmatrix}\text{.}\)
(a)
Calculate \(A^{-1}\text{.}\)
(b)
(c)
Whatβs the size of the matrix product \(A^{-1}\begin{bmatrix} 1 \\ 3 \end{bmatrix}\text{?}\) Is the matrix product \(\begin{bmatrix} 1 \\ 3 \end{bmatrix}A^{-1}\) defined? Why or why not?
(d)
Use \(A^{-1}\) to solve the system
\begin{align*}
2x_1 + x_2 \amp = 1\\
7x_1+4x_2 \amp = 3
\end{align*}
(e)
Use \(A^{-1}\) to solve the system
\begin{align*}
2x_1 + x_2 \amp = 4\\
7x_1+4x_2 \amp = 14.5
\end{align*}
2.
Let \(D=\begin{bmatrix} 4 \amp -1 \\ -2 \amp 0 \end{bmatrix}\) and \(M=\begin{bmatrix} 1 \amp -2 \\ -1 \amp 2 \end{bmatrix}\text{.}\)
(a)
Calculate \(D^{-1}\text{.}\)
(b)
Say why we canβt calculate \(M^{-1}\text{.}\)
(c)
Use matrix multiplication and the matrix \(A\) defined in ExerciseΒ 1 to calculate both \(AD\) and \((AD)^{-1}\text{.}\)
(d)
Use matrix multiplication and the matrix \(A\) defined in ExerciseΒ 1 to calculate both \(A^{-1}D^{-1}\) and \(D^{-1}A^{-1}\text{.}\) What do you notice?
Summary.
-
Linear systems can be rewritten in terms of matrix multiplication, \(AX=B\text{.}\)
-
Some square matrices have multiplicative inverses, denoted \(A^{-1}\text{,}\) and there is a formula for calculating \(A^{-1}\) when \(A\) is \(2\times 2\text{.}\)
-
We can solve linear systems \(AX=B\) when \(A\) is invertible by calculating \(X=A^{-1}B\text{.}\)
Subsection Practice
Exercise 2.3.1. Is a Matrix Invertible?
Exercise 2.3.2. Multiply to Obtain Identity.
Exercise 2.3.3. Condition for Invertibility.
The matrix \(\left[\begin{array}{cc}
4 \amp 1\cr
-9 \amp k\cr
\end{array}\right]\) is invertible if and only if \(k\ne\) .
Exercise 2.3.4. Solve Two Systems with the Inverse.
Consider the following two systems.
(a)
\begin{equation*}
\left\{ \begin{array}{ccc}
- x - 3 y \amp =\amp -1 \\
- x - 9 y \amp =\amp 2
\end{array} \right.
\end{equation*}
(b)
\begin{equation*}
\left\{ \begin{array}{ccc}
- x - 3 y \amp =\amp 3 \\
- x - 9 y \amp =\amp 2
\end{array} \right.
\end{equation*}
(i) Find the inverse of the (common) coefficient matrix of the two systems.
(ii) Find the solutions to the two systems by using the inverse, i.e. by evaluating \(A^{-1} B\) where \(B\) represents the right hand side (i.e. \(B = \left[ \begin{array}{c} -1 \\ 2 \end{array} \right]\) for system (a) and \(B = \left[ \begin{array}{c} 3 \\ 2 \end{array} \right]\) for system (b)).
Exercise 2.3.5. Solve a System with the Inverse.
Exercises Additional Practice
Exercise Group.
1.
\(\left[\begin{array}{cc} 1\amp 5\\ -5\amp -24 \end{array} \right]\)
2.
\(\left[\begin{array}{cc} 1\amp -4\\ 1\amp -3 \end{array} \right]\)
3.
\(\left[\begin{array}{cc} 3\amp 0\\ 0\amp 7 \end{array} \right]\)
4.
\(\left[\begin{array}{cc} 2\amp 5\\ 3\amp 4 \end{array} \right]\)
5.
\(\left[\begin{array}{cc} 1\amp -3\\ -2\amp 6 \end{array} \right]\)
6.
\(\left[\begin{array}{cc} 3\amp 7\\ 2\amp 4 \end{array} \right]\)
7.
\(\left[\begin{array}{cc} 1\amp 0\\ 0\amp 1 \end{array} \right]\)
8.
\(\left[\begin{array}{cc} 0\amp 1\\ 1\amp 0 \end{array} \right]\)
Exercise Group.
In the following exercises, a coefficient matrix \(A\) and column matrix \(B\) are given. Solve the equation \(A X = B\text{.}\)
9.
\(A = \left[\begin{array}{cc} 3\amp 5\\ 2\amp 3 \end{array} \right]\text{,}\) \(B = \left[\begin{array}{c} 21\\ 13 \end{array} \right]\)
10.
\(A = \left[\begin{array}{cc} 1\amp -4\\ 4\amp -15 \end{array} \right]\text{,}\) \(B =\left[\begin{array}{c} 21\\ 77 \end{array} \right]\)
11.
\(A = \left[\begin{array}{cc} 9\amp 70\\ -4\amp -31 \end{array} \right]\text{,}\) \(B =\left[\begin{array}{c} -2\\ 1 \end{array} \right]\)
12.
\(A = \left[\begin{array}{cc} 10\amp -57\\ 3\amp -17 \end{array} \right]\text{,}\) \(B =\left[\begin{array}{c} -14\\ -4 \end{array} \right]\)