Gaussian Elimination with back substitution
The following system is relatively easy to solve.
( i ) x + 2y + z = 5
( ii ) y + 2z = 3
( iii ) z = 1
Since ( iii ) tells us that z = 1, we can substitute it back into ( ii ) which only has two unkowns in it. This give us y + 2 = 3 which tells us y = 1. Now putting y =1 and z = 1 into ( i ) gives us
x + 2 + 1 = 5. This implies x = 2. The solution is x =2, y = 1, z =1.
What we've illustrated is the back substitution part of the method of this section.
While many systems don't start out looking like the one we just solved, we can try to use the elementary row operations to transform the system into one in which we can use back subsitution.
This uses the technique called Gaussian elimination. If we start with three linear equations in three variables our goal is to reach
From this form back substitution can be used to find the solution.
Example 1
Use Gaussian elimination with back substitution to solve
( i ) 2x + 4y + 6z = 14
( ii ) -3x + y + 2z = -3
( iii ) 4x - 2y + z = 7
Solution .
The initial augmented matrix is
Get a one where the 2 is in the first column. Use this one to get zeros in the other two rows of the first column. ( i.e eliminate x from equations 2 and 3)
Multiply row 1 by 1/2
Add to row 2 3 times row 1
Add to row 3 -4 times row 1
Now we need a one where the 7 is in the second column. Then we will use this to eliminate y from equation 3.
Multiply row 2 by 1/7
Add to row 3 10 times row 2
Now get a one where the 33/7 is in the third column.
Multiply row 3 by 7/33
At this point we have a triangular system that we can solve by back substitution. The system is
( i )
( ii )
( iii )
Putting z = 1 into ( ii ) gives This
says that y = 1. Putting y =1 and z = 1 into the first equation, we get x + 2 + 3 = 7.
Thus, x = 2. The solution is x = 2, y =1, z =1.
Note: In general Gaussian elimination with back substitution requires fewer multiplications than the Gauss Jordan method.
Example 2
Use Gaussian elimination with back substitution to solve
( i ) x + 2y - 4z = 8
( ii ) -3x - 5y + 14z = -20
( iii ) 2x + 6y - 4z = 24
Solution .
The initial augmented matrix is
Add to row 2 3 times row 1
Add to row 3 -2 times row 1
Add to row 3 -2 times row 2
Since the last row is all zeros, we have an infinite number of solutions.
Note that equation two involves y and z. We will use it to solve for y in terms of z. Since equation one still has all three variables in it, use row two to eliminate y from equation one. This will allow us to find x in terms of z as well. To first eliminate y from equation one, we need to add to row one -2 times row 2.
Add to row 1 -2 times row 2
The equations say that and
Thus
we can write the solution as
,
, where z is any
real number.
Three of the solutions are
Let z = 0. Then x = 0 and y = 4.
Let z = 1. Then x = 8, y = 2.
Let z = 10. Then x = 80, y = -16.
Observations
1. We have worked to get column one into our goal form first. Then worked on column two, etc.
2. When we needed to get a one, we have multiplied the row by the reciprocal of the number currently in the location we want the one in. (i.e. used row operation type two)
3. To get a zero we use row operation type three ( i.e. add to a row a multiple of another row)
4. We did very little with the first row operation (switching rows).