How do you solve using gaussian elimination or gauss-jordan elimination, #-x+y-z=1#, #-x+3y+z=3#, #x+2y+4z=2#?
1 Answer
First, let's convert this to an augmented matrix form because I find it faster to write out.
#[(-1,1,-1,|,1),(-1,3,1,|,3),(1,2,4,|,2)]#
Each number is a coefficient in the original system of equations, except for the last column, which contains the answers to the equalities.
I've done an answer already where I showed Gauss-Jordan elimination, but this time let's do Gaussian elimination, which we just perform elementary row operations until we get row echelon form instead of reduced-row echelon form. Essentially, it's fewer steps, but is still solvable (if and only if there is one solution).
The goal for row echelon form is to get the first nonzero entry in each row to be a
(For reduced-row echelon form, go further and achieve
The notation I will use is that the rightmost row in the step is the one operated upon.
Here we go!
#stackrel(-R_1" ")(->)[(1,-1,1,|,-1),(-1,3,1,|,3),(1,2,4,|,2)]#
#stackrel(R_3 + R_2" ")(->)[(1,-1,1,|,-1),(0,5,5,|,5),(1,2,4,|,2)]#
#stackrel(1/5R_2" ")(->)[(1,-1,1,|,-1),(0,1,1,|,1),(1,2,4,|,2)]#
#stackrel(-R_1 + R_3" ")(->)[(1,-1,1,|,-1),(0,1,1,|,1),(0,3,3,|,3)]#
Oh boy. Yeah, this has infinite solutions. Why? Because at this point,
#stackrel(-3R_2 + R_3" ")(->)[(1,-1,1,|,-1),(0,1,1,|,1),(0,0,0,|,0)]#
We lost an equation, so we have three variables and two equations. Not good. When you turn this back to algebraic form, you get:
#x - y + z = -1#
#y + z = 1#
If I attempt to solve this, I get:
#y = 1 - z#
#x - (1 - z) + z = -1#
#x - 1 + 2z = -1#
#color(red)(z = -x/2)#
#color(red)(y = 1 + x/2)#
But