In this example, it is shown how to use the inverse of a matrix to find the solution to a system of equations. Consider the following system of equations. Use the inverse of a suitable matrix to give the solutions to this system.
\begin{equation*}
\begin{pmatrix}
x + z = 1\\
x - y + z = 3\\
x + y - z = 2
\end{pmatrix}.
\end{equation*}
The system of equations can be written in terms of matrices as
\begin{equation}
\begin{pmatrix}
1 & 0 & 1\\
1 & -1 & 1\\
1 & 1 & -1
\end{pmatrix}
\begin{pmatrix}
x \\
y \\
z
\end{pmatrix}
= \begin{pmatrix}
1 \\
3 \\
2 \\
\end{pmatrix}.\tag{11.3.4}
\end{equation}
More simply, this is of the form \(A\mathbf{x} = \mathbf{b}\text{.}\) Suppose you find the inverse of the matrix \(A^{-1}\) . Then you could multiply both sides of this equation by \(A^{-1}\) to obtain
\begin{equation*}
\mathbf{x} = (A^{-1}A)\mathbf{x} = A^{-1}(A\mathbf{x}) = A^{-1}\mathbf{b}.
\end{equation*}
This gives the solution as \(\mathbf{x} = A^{-1} \mathbf{b}\text{.}\) Note that once you have found the inverse, you can easily get the solution for different right hand sides without any effort. It is always just \(A^{-1} \mathbf{b}\text{.}\) In the given example, the inverse of the matrix is
\begin{equation*}
\begin{pmatrix}
0 & \frac{1}{2} & \frac{1}{2} \\
1 & -1 & 0\\
1 & -\frac{1}{2} & -\frac{1}{2}
\end{pmatrix}.
\end{equation*}
This was shown above in
Example 11.3.8. Therefore, from what was just explained, the solution to the given system is
\begin{equation*}
\begin{pmatrix}
x \\
y \\
z
\end{pmatrix}
= \begin{pmatrix}
0 & \frac{1}{2} & \frac{1}{2} \\
1 & -1 & 0\\
1 & -\frac{1}{2} & -\frac{1}{2}
\end{pmatrix}
\begin{pmatrix}
1 \\
3 \\
2 \\
\end{pmatrix} =
\begin{pmatrix}
\frac{5}{2} \\
-2 \\
-\frac{3}{2}\\
\end{pmatrix}
.
\end{equation*}
What if the right side of
(11.3.4) had been
\begin{equation*}
\begin{pmatrix}
0 \\
1 \\
3 \\
\end{pmatrix}?
\end{equation*}
What would be the solution to
\begin{equation*}
\begin{pmatrix}
1 & 0 & 1\\
1 & -1 & 1\\
1 & 1 & -1
\end{pmatrix}
\begin{pmatrix}
x \\
y \\
z
\end{pmatrix}
= \begin{pmatrix}
0 \\
1 \\
3 \\
\end{pmatrix}?
\end{equation*}
By the above discussion, it is just
\begin{equation*}
\begin{pmatrix}
x \\
y \\
z
\end{pmatrix}
= \begin{pmatrix}
0 & \frac{1}{2} & \frac{1}{2} \\
1 & -1 & 0\\
1 & -\frac{1}{2} & -\frac{1}{2}
\end{pmatrix}
\begin{pmatrix}
0 \\
1 \\
3 \\
\end{pmatrix} =
\begin{pmatrix}
2 \\
-1 \\
-2\\
\end{pmatrix}
.
\end{equation*}
This illustrates why once you have found the inverse of a given matrix, you can use it to solve many different systems easily.