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

Nov 30, 2016

The solution is $\left(x , y , z\right) = \left(- 4 , \text{ "4," } \frac{2}{3}\right)$.

#### Explanation:

Write the coefficients in an augmented matrix:
$\left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 2 & - 1 & 3 & | & - 10 \\ 3 & - 2 & 3 & | & - 18\end{matrix}\right]$

Our goal is to change this into a matrix that is upper-right triangular; that is, where everything below the diagonal is a zero. We do this by adding linear combinations of the rows together to create new rows (that replace the current ones) and by multiplying rows by constants. Remember: this does not change the information implied by the augmented matrix, it just presents it in a new (and hopefully more beneficial) way.

(Brief notation recap: ${R}_{1}$, ${R}_{2}$, and ${R}_{3}$ mean "row 1", "row 2", and "row 3" respectively.)

Let's start with the first cell in row 2. Its value is $2$, which is $\frac{2}{1} = 2$ times as much as the $1$ above it. If we want the $2$ to become a $0$, we need to subtract $2 {R}_{1} - {R}_{2}$:

$2 \times \left[\left(1 , 4 , \text{-"6,|,8" }\right)\right]$
ul("    "-[(2,"-"1,3,|,"-"10)])
"=    "[(0,9,"-"15,|,26)]

This new row represents a new valid equation (that is, $0 x + 9 y - 15 z = 26$) which can replace one of the two rows used in forming it. Choosing to keep row 1 the same, we replace row 2:

$\left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ \textcolor{red}{0} & \textcolor{red}{9} & \textcolor{red}{- 15} & | & \textcolor{red}{26} \\ 3 & - 2 & 3 & | & - 18\end{matrix}\right]$

A similar linear combination is then used to replace row 3—that combination is $3 {R}_{1} - {R}_{3}$, and the following shorthand is used to indicate what row operation has been done to form a new row:

$\implies \textcolor{w h i t e}{\begin{matrix}\null \\ \null \\ \textcolor{b l a c k}{3 {R}_{1} - {R}_{3}}\end{matrix}} \left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 0 & 9 & - 15 & | & 26 \\ \textcolor{red}{0} & \textcolor{red}{14} & \textcolor{red}{- 21} & | & \textcolor{red}{42}\end{matrix}\right]$

All the coefficients in ${R}_{3}$ are multiples of 7, so let's reduce:

$\implies \textcolor{w h i t e}{\begin{matrix}\null \\ \null \\ \textcolor{b l a c k}{\frac{1}{7} \cdot {R}_{3}}\end{matrix}} \left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 0 & 9 & - 15 & | & 26 \\ 0 & 2 & - 3 & | & 6\end{matrix}\right]$

$\implies \textcolor{w h i t e}{\begin{matrix}\null \\ \null \\ \textcolor{b l a c k}{9 {R}_{3} - 2 {R}_{2}}\end{matrix}} \left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 0 & 9 & - 15 & | & 26 \\ 0 & 0 & 3 & | & 2\end{matrix}\right]$

Our newest ${R}_{3}$ says $3 z = 2$, which means that $z = \frac{2}{3}$. And since the equation directly above ${R}_{3}$ only involves one additional unknown (that is, $y$), we can plug this solved value for $z$ into it to solve for $y$:

$9 y - 15 z = 26$
$\implies 9 y - 15 \left(\frac{2}{3}\right) = 26$
$\implies 9 y - 10 = 26$
$\implies 9 y = 36$
$\implies y = 4$

With the matrix in the upper-triangular form, solving for variables is like falling dominoes. Knowing $z$ gives us $y$, and knowing $z$ & $y$ gives us $x$:

$x + 4 y - 6 z = 8$
$\implies x + 4 \left(4\right) - 6 \left(\frac{2}{3}\right) = 8$
$\implies x + 16 - 4 = 8$
$\implies x = \text{-} 4$

Our final solution is $\left(x , y , z\right) = \left(- 4 , \text{ "4," } \frac{2}{3}\right)$.
(It is best to check your solution to make sure it works; I will save that as an exercise.)

## Note:

Many teachers will encourage you to reduce each new row you create so that the leading coefficients are $1$. This is perfectly fine, and you'll get the same solutions. It just means your matrix will likely have fractions in it. I chose not to reduce my rows for the sake of making the matrices easier to read.

Nov 30, 2016

Here is an alternate approach that turns the coefficient matrix into the identity matrix, thus making the augmented column the solution.

#### Explanation:

$\text{ } \left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 2 & - 1 & 3 & | & - 10 \\ 3 & - 2 & 3 & | & - 18\end{matrix}\right]$

$\implies \textcolor{w h i t e}{\begin{matrix}\null \\ \textcolor{b l a c k}{2 {R}_{1} - {R}_{2}} \\ \null\end{matrix}} \left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 0 & 9 & - 15 & | & 26 \\ 3 & - 2 & 3 & | & - 18\end{matrix}\right]$

$\implies \text{ } \textcolor{w h i t e}{\begin{matrix}\null \\ \textcolor{b l a c k}{\frac{1}{9} \cdot {R}_{2}} \\ \null\end{matrix}} \left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 0 & 1 & - \frac{5}{3} & | & \frac{26}{9} \\ 3 & - 2 & 3 & | & - 18\end{matrix}\right]$

$\implies \textcolor{w h i t e}{\begin{matrix}\null \\ \null \\ \textcolor{b l a c k}{3 {R}_{1} - {R}_{3}}\end{matrix}} \left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 0 & 1 & - \frac{5}{3} & | & \frac{26}{9} \\ 0 & 14 & - 21 & | & 42\end{matrix}\right]$

$\implies \text{ } \textcolor{w h i t e}{\begin{matrix}\null \\ \null \\ \textcolor{b l a c k}{\frac{1}{7} \cdot {R}_{3}}\end{matrix}} \left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 0 & 1 & - \frac{5}{3} & | & \frac{26}{9} \\ 0 & 2 & - 3 & | & 6\end{matrix}\right]$

$\implies \textcolor{w h i t e}{\begin{matrix}\null \\ \null \\ \textcolor{b l a c k}{{R}_{3} - 2 {R}_{2}}\end{matrix}} \left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 0 & 1 & - \frac{5}{3} & | & \frac{26}{9} \\ 0 & 0 & \frac{1}{3} & | & \frac{2}{9}\end{matrix}\right]$

$\implies \text{ } \textcolor{w h i t e}{\begin{matrix}\null \\ \null \\ \textcolor{b l a c k}{3 \cdot {R}_{3}}\end{matrix}} \left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 0 & 1 & - \frac{5}{3} & | & \frac{26}{9} \\ 0 & 0 & 1 & | & \frac{2}{3}\end{matrix}\right]$

$\implies \textcolor{w h i t e}{\begin{matrix}\null \\ \textcolor{b l a c k}{{R}_{2} + \frac{5}{3} {R}_{1}} \\ 3 \cdot {R}_{3}\end{matrix}} \left[\begin{matrix}1 & 4 & - 6 & | & 8 \\ 0 & 1 & 0 & | & 4 \\ 0 & 0 & 1 & | & \frac{2}{3}\end{matrix}\right]$

$\implies \textcolor{w h i t e}{\begin{matrix}\textcolor{b l a c k}{{R}_{1} - 4 {R}_{2}} \\ \null \\ 3 \cdot {R}_{3}\end{matrix}} \left[\begin{matrix}1 & 0 & - 6 & | & - 8 \\ 0 & 1 & 0 & | & 4 \\ 0 & 0 & 1 & | & \frac{2}{3}\end{matrix}\right]$

$\implies \textcolor{w h i t e}{\begin{matrix}\textcolor{b l a c k}{{R}_{1} + 6 {R}_{3}} \\ \null \\ 3 \cdot {R}_{3}\end{matrix}} \left[\begin{matrix}1 & 0 & 0 & | & - 4 \\ 0 & 1 & 0 & | & 4 \\ 0 & 0 & 1 & | & \frac{2}{3}\end{matrix}\right]$

These equations now say

$x \text{ "="-} 4$
$\text{ "y" } = 4$
$\text{ } z = 2 / 3$

So our answer is as before.