# How do you solve 2x + y = 5 and 3x + y = 6 using matrices?

Sep 1, 2016

$x = 1 \text{; } y = 3$

#### Explanation:

Write as
$\text{ "x" "y" answer}$

$\left(\begin{matrix}2 & 1 & | & 5 \\ 3 & 1 & | & 6\end{matrix}\right)$
$\textcolor{b r o w n}{\text{ } R o w \left[2\right] - R o w \left[1\right]}$
$\textcolor{w h i t e}{\frac{2}{2}} \textcolor{b r o w n}{\text{ } \downarrow}$

$\left(\begin{matrix}2 & 1 & | & 5 \\ 1 & 0 & | & 1\end{matrix}\right)$
$\textcolor{b r o w n}{\text{ } R o w \left[1\right] - 2 R o w \left[2\right]}$
$\textcolor{w h i t e}{\frac{2}{2}} \textcolor{b r o w n}{\text{ } \downarrow}$

$\left(\begin{matrix}0 & 1 & | & 3 \\ 1 & 0 & | & 1\end{matrix}\right)$
$\textcolor{b r o w n}{\text{ swap the rows arround}}$
$\textcolor{w h i t e}{\frac{2}{2}} \textcolor{b r o w n}{\text{ } \downarrow}$

$\left(\begin{matrix}1 & 0 & | & 1 \\ 0 & 1 & | & 3\end{matrix}\right)$
$\textcolor{g r e e n}{\text{This is called 'row echelon form'}}$

$x = 1 \text{; } y = 3$