### 1 Solving a system of two equations using the inverse matrix

If we have one linear equation

$\phantom{\rule{2em}{0ex}}ax=b$

in which the unknown is $x$ and $a$ and $b$ are constants and $a\ne 0$ then $x=\frac{b}{a}={a}^{-1}b$ .

What happens if we have more than one equation and more than one unknown? In this Section we copy the algebraic solution $x={a}^{-1}b$ used for a single equation to solve a system of linear equations. As we shall see, this will be a very natural way of solving the system if it is first written in matrix form.

Consider the system

$\begin{array}{rcll}2{x}_{1}+3{x}_{2}& =& 5& \text{}\\ {x}_{1}-2{x}_{2}& =& -1.\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}& \text{}\end{array}$

In matrix form this becomes

If ${A}^{-1}$ exists then the solution is

Given the matrix $A=\left[\begin{array}{cc}\hfill 2& \hfill 3\\ \hfill 1& \hfill -2\end{array}\right]$ find its determinant. What does this tell you about ${A}^{-1}$ ?

$\left|A\right|=2×\left(-2\right)-1×3=-7$

since $\left|A\right|\ne 0$ then ${A}^{-1}$ exists.

Now find ${A}^{-1}$

${A}^{-1}=\frac{1}{\left(-7\right)}\left[\begin{array}{cc}\hfill -2& \hfill -3\\ \hfill -1& \hfill 2\end{array}\right]=\frac{1}{7}\left[\begin{array}{cc}\hfill 2& \hfill 3\\ \hfill 1& \hfill -2\end{array}\right]$

Solve the system $AX=B$ where $A=\left[\begin{array}{cc}\hfill 2& \hfill 3\\ \hfill 1& \hfill -2\end{array}\right]$ and $B$ is   $\left[\begin{array}{c}\hfill 5\\ \hfill -1\end{array}\right]$ .

$X={A}^{-1}B=\frac{1}{7}\left[\begin{array}{cc}\hfill 2& \hfill 3\\ \hfill 1& \hfill -2\end{array}\right]\left[\begin{array}{c}\hfill 5\\ \hfill -1\end{array}\right]=\frac{1}{7}\left[\begin{array}{c}\hfill 7\hfill \\ \hfill 7\hfill \end{array}\right]=\left[\begin{array}{c}\hfill 1\hfill \\ \hfill 1\hfill \end{array}\right]$ . Hence ${x}_{1}=1,\phantom{\rule{1em}{0ex}}{x}_{2}=1.$

Use the inverse matrix method to solve

$\phantom{\rule{2em}{0ex}}2{x}_{1}+3{x}_{2}=3$

$\phantom{\rule{2em}{0ex}}5{x}_{1}+4{x}_{2}=11$

$AX=B$ is $\phantom{\rule{1em}{0ex}}\left[\begin{array}{cc}\hfill 2\hfill & \hfill 3\hfill \\ \hfill 5\hfill & \hfill 4\hfill \end{array}\right]\left[\begin{array}{c}\hfill {x}_{1}\hfill \\ \hfill {x}_{2}\hfill \end{array}\right]=\left[\begin{array}{c}\hfill 3\hfill \\ \hfill 11\hfill \end{array}\right]$

$\phantom{\rule{2em}{0ex}}\left|A\right|=2×4-3×5=-7$   and   ${A}^{-1}=-\frac{1}{7}\left[\begin{array}{cc}\hfill 4\hfill & \hfill -3\hfill \\ \hfill -5\hfill & \hfill 2\hfill \end{array}\right]$

Using $X={A}^{-1}B$ :

$\phantom{\rule{2em}{0ex}}X=\left[\begin{array}{c}\hfill {x}_{1}\hfill \\ \hfill {x}_{2}\hfill \end{array}\right]=-\frac{1}{7}\left[\begin{array}{cc}\hfill 4\hfill & \hfill -3\hfill \\ \hfill -5\hfill & \hfill 2\hfill \end{array}\right]\left[\begin{array}{c}\hfill 3\hfill \\ \hfill 11\hfill \end{array}\right]=-\frac{1}{7}\left[\begin{array}{c}\hfill 4×3-3×11\hfill \\ \hfill -5×3+2×11\hfill \end{array}\right]=-\frac{1}{7}\left[\begin{array}{c}\hfill -21\hfill \\ \hfill 7\hfill \end{array}\right]=\left[\begin{array}{c}\hfill 3\hfill \\ \hfill -1\hfill \end{array}\right]$

So ${x}_{1}=3,\phantom{\rule{1em}{0ex}}{x}_{2}=-1$