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

[Maple Math]

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

[Maple Math]

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

[Maple Math]

Add to row 2 3 times row 1

[Maple Math]

Add to row 3 -4 times row 1

[Maple Math]

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

[Maple Math]

Add to row 3 10 times row 2

[Maple Math]

Now get a one where the 33/7 is in the third column.

Multiply row 3 by 7/33

[Maple Math]

At this point we have a triangular system that we can solve by back substitution. The system is

( i ) [Maple Math]

( ii ) [Maple Math]

( iii ) [Maple Math]

Putting z = 1 into ( ii ) gives [Maple Math] 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

[Maple Math]

Add to row 2 3 times row 1

[Maple Math]

Add to row 3 -2 times row 1

[Maple Math]

Add to row 3 -2 times row 2

[Maple Math]

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

[Maple Math]

The equations say that [Maple Math] and [Maple Math] Thus we can write the solution as

[Maple Math] , [Maple Math] , 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).