# How do you solve the system x-4y-z=-3, x+2y+z=5, and 3x-7y-2z=-6?

Feb 19, 2018

x=0.5; y=-0.5; z=5.5

#### Explanation:

Add first two expressions to eliminate
the z
$x - 4 y - z + x + 2 y + z = - 3 + 5$
$2 x - 2 y = 2$

Multiply the first expression by -2, then add to the third expression to eliminate the z again
$- 2 x + 8 y + 2 z = 6$
$- 2 x + 8 y + 2 z + 3 x - 7 y - 2 z = 6 - 6$
$x + y = 0$

Multiply this answer by 2, then add to the first result to eliminate the y.
$2 x + 2 y = 0$
$2 x + 2 y + 2 x - 2 y = 0 + 2$
$4 x = 2$
$x = 0.5$

Substitute the x-value into one of the result formulae and solve for y
$0.5 + y = 0$
$y = - 0.5$

Substitute the x-value and the y-value into one of the original formulae and solve for z
$0.5 - 1 + z = 5$
$z = 5.5$

$0.5 + 2 - 5.5 = - 3. T r u e$
$1.5 + 3.5 - 11 = - 6. T r u e$

Feb 19, 2018

$x = \frac{1}{2}$, $y = - \frac{1}{2}$ and $z = \frac{11}{2}$

#### Explanation:

Perform the Gauss Jordan elimination on the augmented matrix

$A = \left(\begin{matrix}1 & - 4 & - 1 & | & - 3 \\ 1 & 2 & 1 & | & 5 \\ 3 & - 7 & - 2 & | & - 6\end{matrix}\right)$

I have written the equations not in the sequence as in the question in order to get $1$ as pivot.

Perform the folowing operations on the rows of the matrix

$R 2 \leftarrow R 1 - R 2$; $R 3 \leftarrow R 3 - 3 R 1$

$A = \left(\begin{matrix}1 & - 4 & - 1 & | & - 3 \\ 0 & 6 & 2 & | & 8 \\ 0 & 5 & 1 & | & 3\end{matrix}\right)$

$R 2 \leftarrow \frac{R 2}{2}$

$A = \left(\begin{matrix}1 & - 4 & - 1 & | & - 3 \\ 0 & 3 & 1 & | & 4 \\ 0 & 5 & 1 & | & 3\end{matrix}\right)$

$R 2 \leftarrow R 2 - R 3$

$A = \left(\begin{matrix}1 & - 4 & - 1 & | & - 3 \\ 0 & - 2 & 0 & | & 1 \\ 0 & 5 & 1 & | & 3\end{matrix}\right)$

$R 2 \leftarrow \frac{R 2}{- 2}$

$A = \left(\begin{matrix}1 & - 4 & - 1 & | & - 3 \\ 0 & 1 & 0 & | & - \frac{1}{2} \\ 0 & 5 & 1 & | & 3\end{matrix}\right)$

R1larrR1+4R2; R3-5R2

$A = \left(\begin{matrix}1 & 0 & - 1 & | & - 5 \\ 0 & 1 & 0 & | & - \frac{1}{2} \\ 0 & 0 & 1 & | & \frac{11}{2}\end{matrix}\right)$

$R 1 \leftarrow R 1 + R 3$

$A = \left(\begin{matrix}1 & 0 & 0 & | & \frac{1}{2} \\ 0 & 1 & 0 & | & - \frac{1}{2} \\ 0 & 0 & 1 & | & \frac{11}{2}\end{matrix}\right)$

Thus, $x = \frac{1}{2}$, $y = - \frac{1}{2}$ and $z = \frac{11}{2}$