# Solve the system of equations  2x + 3y = 5  and  x + y = 1  using matrices?

Sep 22, 2017

$x = - 2$ and $y = 3$

#### Explanation:

We have:

$2 x + 3 y = 5$
$x + y = 1$

Which we can write in vector matrix form:

$\left(\begin{matrix}2 & 3 \\ 1 & 1\end{matrix}\right) \left(\begin{matrix}x \\ y\end{matrix}\right) = \left(\begin{matrix}5 \\ 1\end{matrix}\right)$

Or:

$\boldsymbol{A} \boldsymbol{\underline{x}} = \boldsymbol{\underline{b}} \implies \boldsymbol{\underline{x}} = {\boldsymbol{A}}^{- 1} \boldsymbol{\underline{b}}$

Where

$\boldsymbol{A} = \left(\begin{matrix}2 & 3 \\ 1 & 1\end{matrix}\right)$; $\boldsymbol{\underline{x}} = \left(\begin{matrix}x \\ y\end{matrix}\right)$; $\boldsymbol{\underline{b}} \left(\begin{matrix}5 \\ 1\end{matrix}\right)$

We can find ${\boldsymbol{A}}^{- 1}$, using matrix inversion:

Method 2 - Matrix Inversion

A matrix, $\boldsymbol{A}$, is invertible if and only if its determinant $\left\mid \boldsymbol{A} \right\mid \ne 0$. There are several ways to invert a matrix inclining finding the adjoint, row reduction or even a calculator. I will use the adjoint method, which has several steps;

• Calculating the Matrix of Minors,
• Form the Matrix of Cofactors, $c o f \left(\boldsymbol{A}\right)$
• Form the adjoint matrix, $a \mathrm{dj} \left(\boldsymbol{A}\right)$
• Multiply $a \mathrm{dj} \left(\boldsymbol{A}\right)$ by $\frac{1}{\left\mid \boldsymbol{A} \right\mid}$ to form the inverse ${\boldsymbol{A}}^{-} 1$

At some point we need to calculate $\left\mid \boldsymbol{A} \right\mid$, or $\det \left(\boldsymbol{A}\right)$, and this can also be used to test if the matrix is actually invertible so I prefer to do this first;

$\boldsymbol{A} = \left(\begin{matrix}2 & 3 \\ 1 & 1\end{matrix}\right)$

If we expand about the first row;

$\left\mid \boldsymbol{A} \right\mid = \left(2\right) \left(1\right) - \left(1\right) \left(3\right)$
$\setminus \setminus \setminus \setminus \setminus = 2 - 3$
$\setminus \setminus \setminus \setminus \setminus = - 1$

As $\left\mid \boldsymbol{A} \right\mid \ne 0 \implies \boldsymbol{A}$ is invertible, so we now calculate the matrix of minors by systematically working through each element in the matrix and "strike out" that row and columns and form the determinant of the remaining elements, as follows:

$\text{minors} \left(\boldsymbol{A}\right) = \left(\begin{matrix}1 & 1 \\ 3 & 2\end{matrix}\right)$

We now form the matrix of cofactors, $c o f \left(A\right)$, by taking the above matrix of minors and applying the alternating sign matrix as in

$\left(\begin{matrix}+ & - \\ - & +\end{matrix}\right)$

Where we change the sign of those elements with the minus sign to get;

$c o f \left(\boldsymbol{A}\right) = \left(\begin{matrix}1 & - 1 \\ - 3 & 2\end{matrix}\right)$

Then we form the adjoint matrix by transposing the matrix of cofactors, $c o f \left(A\right)$, so;

$a \mathrm{dj} \left(A\right) = c o f {\left(A\right)}^{T}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = {\left(\begin{matrix}1 & - 1 \\ - 3 & 2\end{matrix}\right)}^{T}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \left(\begin{matrix}1 & - 3 \\ - 1 & 2\end{matrix}\right)$

And then finally we multiply by the reciprocal of the determinant to get:

${\boldsymbol{A}}^{-} 1 = \frac{1}{\left\mid \boldsymbol{A} \right\mid} a \mathrm{dj} \left(\boldsymbol{A}\right)$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus = \left(1. \left(- 1\right)\right) \left(\begin{matrix}1 & - 3 \\ - 1 & 2\end{matrix}\right)$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus = \left(\begin{matrix}- 1 & 3 \\ 1 & - 2\end{matrix}\right)$

So then we get the solution the linear equations as:

$\boldsymbol{\underline{x}} = {\boldsymbol{A}}^{- 1} \boldsymbol{\underline{b}}$ ..... $\left[\star\right]$

$\therefore \left(\begin{matrix}x \\ y\end{matrix}\right) = \left(\begin{matrix}- 1 & 3 \\ 1 & - 2\end{matrix}\right) \left(\begin{matrix}5 \\ 1\end{matrix}\right)$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \left(\begin{matrix}\left(- 1\right) \left(5\right) + \left(3\right) \left(1\right) \\ \left(1\right) \left(5\right) + \left(- 2\right) \left(1\right)\end{matrix}\right)$

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \left(\begin{matrix}- 5 + 3 \\ 5 - 2\end{matrix}\right)$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \left(\begin{matrix}- 2 \\ 3\end{matrix}\right)$

Thus we have a unique solution:

$x = - 2 , y = 3$