# How do you solve - x+y=6 and -2x+y=7 using matrices?

Feb 9, 2016

$x = - 1 , y = 5$

#### Explanation:

As the equations are already in the form $A x + B y = C$, writing all the coefficients of each equation to form each row of the matrix as below
$M =$$\left[\begin{matrix}- 1 & 1 & | & 6 \\ - 2 & 1 & | & 7\end{matrix}\right]$
Now by row operations change $2 \times 2$ matrix on the left side to identity matrix.

$M =$$\left[\begin{matrix}1 & 0 & | & - 1 \\ - 2 & 1 & | & 7\end{matrix}\right]$
Changed row 1 By subtracting row 2 from row 1

$M =$$\left[\begin{matrix}1 & 0 & | & - 1 \\ 0 & 1 & | & 5\end{matrix}\right]$
Changed row 2 By adding 2 $\times$row 1 to row 2

From right column we obtain the solution as

$x = - 1 , y = 5$