# How do you solve using gaussian elimination or gauss-jordan elimination, x+y+z=1, 3x+y-3z=5 and x-2y-5z=10?

Feb 13, 2016

$\left(\begin{matrix}x \\ y \\ z\end{matrix}\right) = \left(\begin{matrix}6 \\ - 7 \\ 2\end{matrix}\right)$

#### Explanation:

The linear equation:
$x + y + z = 1$
$3 x + y - 3 z = 5$
$x - 2 y - 5 z = 10$
can be written in Matrix form as:
$\left(x , y , z\right) \left(\begin{matrix}1 & 1 & 1 \\ 3 & 1 & - 3 \\ 1 & - 2 & - 5\end{matrix}\right) = \left(\begin{matrix}1 \\ 5 \\ 10\end{matrix}\right)$
Let's now use gauss elimination:
$\left(\begin{matrix}1 & 1 & 1 & | & 1 \\ 3 & 1 & - 3 & | & 5 \\ 1 & - 2 & - 5 & | & 10\end{matrix}\right)$

$\textcolor{red}{{R}_{2} = - 3 {R}_{1} + {R}_{2}}$ $\left(\begin{matrix}1 & 1 & 1 & | & 1 \\ 0 & - 2 & - 6 & | & 2 \\ 1 & - 2 & - 5 & | & 10\end{matrix}\right)$

$\textcolor{red}{{R}_{3} = - {R}_{1} + {R}_{3}}$ $\left(\begin{matrix}1 & 1 & 1 & | & 1 \\ 0 & - 2 & - 6 & | & 2 \\ 0 & - 3 & - 6 & | & 9\end{matrix}\right)$

$\textcolor{red}{{R}_{3} = - \frac{3}{2} {R}_{2} + {R}_{3}}$ $\left(\begin{matrix}1 & 1 & 1 & | & 1 \\ 0 & - 2 & - 6 & | & 2 \\ 0 & 0 & 3 & | & 6\end{matrix}\right)$
Now what we have is:
$x + y + z = 1$ --------------------------------------------------------- (1)
$\text{ } - 2 y - 6 z = 2$ ---------------------------------------------------------(2)
$\text{ } 3 z = 6$; $z = 2$ substitute this into (2) above solve for y
$y = - 7$ sub for y and z into (1) $x = 6$