How do you solve using gaussian elimination or gauss-jordan elimination, x+3y+z=7, x+y+4z=18, -x-y+z=7?

Jan 18, 2016

$x = - 4$
$y = 2$
$z = 5$

Explanation:

Initial Augmented Matrix:
[ ( 1.00, 3.00, 1.00, 7.00), ( 1.00, 1.00, 4.00, 18.00), ( -1.00, -1.00, 1.00, 7.00) ]

Pivot Action $n$
pivot row = n; pivot column = n; pivot entry augmented matrix entry at (n,n)

$$1. convert pivot n row so pivot entry = 1
2. adjust non-pivot rows so entries in pivot column = 0


Pivot 1
Pivot Row 1 reduced by dividing all entries by 1.00 so pivot entry = 1
[ ( 1.00, 3.00, 1.00, 7.00), ( 1.00, 1.00, 4.00, 18.00), ( -1.00, -1.00, 1.00, 7.00) ]

$$Non-pivot rows reduced for pivot column
by subtracting appropriate multiple of pivot row 1 from each non-pivot row


[ ( 1.00, 3.00, 1.00, 7.00), ( 0.00, -2.00, 3.00, 11.00), ( 0.00, 2.00, 2.00, 14.00) ]

Pivot 2
Pivot Row 2 reduced by dividing all entries by -2.00 so pivot entry = 1
[ ( 1.00, 3.00, 1.00, 7.00), ( 0.00, 1.00, -1.50, -5.50), ( 0.00, 2.00, 2.00, 14.00) ]

$$Non-pivot rows reduced for pivot column
by subtracting appropriate multiple of pivot row 2 from each non-pivot row


[ ( 1.00, 0.00, 5.50, 23.50), ( 0.00, 1.00, -1.50, -5.50), ( 0.00, 0.00, 5.00, 25.00) ]

Pivot 3
Pivot Row 3 reduced by dividing all entries by 5.00 so pivot entry = 1
[ ( 1.00, 0.00, 5.50, 23.50), ( 0.00, 1.00, -1.50, -5.50), ( 0.00, 0.00, 1.00, 5.00) ]

$$Non-pivot rows reduced for pivot column
by subtracting appropriate multiple of pivot row 3 from each non-pivot row


[ ( 1.00, 0.00, 0.00, -4.00), ( 0.00, 1.00, 0.00, 2.00), ( 0.00, 0.00, 1.00, 5.00) ]

Feb 8, 2016

An alternate way to word the explanation follows a similar logic in solving for the row echelon form:

1. Use elementary row operations to achieve $0$'s below all leading entries in each row. i.e. switch two rows, add scaled row to another row, or scale a row.
2. Each leading entry should be a $1$, and each new row's leading $1$ must be at least one column to the right of that from the previous row.
3. Any rows with all zeroes must be at the bottom. If one such row exists, then consider checking whether there is one, infinite, or no solutions.

(reduced row echelon form would ask for $0$'s above all leading $1$'s as well.)

The augmented matrix is:

$\left[\begin{matrix}1 & 3 & 1 & | & 7 \\ 1 & 1 & 4 & | & 18 \\ - 1 & - 1 & 1 & | & 7\end{matrix}\right]$

Now, operating on it, where the second indicated row number is the one that the operation is applied to, we get:

$\stackrel{{R}_{2} + {R}_{3} \text{ }}{\to} \left[\begin{matrix}1 & 3 & 1 & | & 7 \\ 1 & 1 & 4 & | & 18 \\ 0 & 0 & 5 & | & 25\end{matrix}\right]$

$\stackrel{- {R}_{1} + {R}_{2} \text{ }}{\to} \left[\begin{matrix}1 & 3 & 1 & | & 7 \\ 0 & - 2 & 3 & | & 11 \\ 0 & 0 & 5 & | & 25\end{matrix}\right]$

At this point we know enough to back-substitute via the Gaussian Elimination method.

$5 z = 25 \to \textcolor{b l u e}{z = 5}$

$- 2 y + 3 z = 11 \to - 2 y + 15 = 11 \to \textcolor{b l u e}{y = 2}$

$x + 3 y + z = 7 \to x + 6 + 5 = 7 \to \textcolor{b l u e}{x = - 4}$

Therefore, this method also gives you $\textcolor{b l u e}{\text{("-4,2,5")}}$.