Lesson Objectives
- Demonstrate an understanding of how to set up an augmented matrix
- Demonstrate an understanding of how to place an augmented matrix in row echelon form
- Demonstrate an understanding of how to place an augmented matrix in reduced-row echelon form
- Learn how to solve a linear system in three variables using matrix methods
How to Solve a Linear System in Three Variables Using Gaussian Elimination
In the last lesson, we learned how to solve a linear system in two variables using Gaussian Elimination. In this lesson, we will look at some additional examples of this method with linear systems in three variables. Recall that our goal is to place the augmented matrix in row echelon form. This form gives us "1's" down the diagonal and "0's" below: $$\left[ \begin{array}{ccc|c}1&a&b&c\\ 0&1&d&e\\ 0&0&1&f\\ \end{array}\right] $$ We use "elementary row operations" to achieve our desired row echelon form.
Example 1: Solve each linear system using Gaussian Elimination $$-x + 4y - 2z=-15$$ $$-4x + 6y + z=-5$$ $$-6x - 6y - 2z=-10$$ Let's begin by writing our augmented matrix: $$\left[ \begin{array}{ccc|c}-1&4&-2&-15\\ -4&6&1&-5\\ -6&-6&-2&-10\\ \end{array}\right] $$ We work column by column, starting with the leftmost column. We want a 1 as the first element in the leftmost column. We can achieve this by multiplying the top row by -1: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ -4&6&1&-5\\ -6&-6&-2&-10\\ \end{array}\right] $$ Next, we will work on the second element in the leftmost column. Since we want this to be a 0, we can multiply row 1 by 4 and add the result to row 2: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ 0&-10&9&55\\ -6&-6&-2&-10\\ \end{array}\right] $$ Next, we will work on the third element in the leftmost column. Since we want this to be a 0, we can multiply row 1 by 6 and add the result to row 3: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ 0&-10&9&55\\ 0&-30&10&80\\ \end{array}\right] $$ Now that the first or leftmost column is complete, we move one column to the right. We will start by changing the second element of the middle column into a 1. We can achieve this by multiplying row 2 by -1/10: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ 0&1&-9/10&-55/10\\ 0&-30&10&80\\ \end{array}\right] $$ Next, we will work on the third element in the middle column. Since we want this to be a 0, we can multiply row 2 by 30 and add the result to row 1: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ 0&1&-9/10&-55/10\\ 0&0&-17&-85\\ \end{array}\right] $$ Now that the middle column is complete, we move on to the last or rightmost column. We only need to change the third element into a 1. We can achieve this by multiplying row 3 by -1/17: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ 0&1&-9/10&-55/10\\ 0&0&1&5\\ \end{array}\right] $$ Our augmented matrix is in row echelon form. We can now use substitution to find the solutions for the system. Let's translate the numerical information from the augmented matrix back into equation format: $$1x - 4y + 2z=15$$ $$0x + 1y - \frac{9}{10}z=-\frac{55}{10}$$ $$0x + 0y + 1z=5$$ At this point, we know that z is 5, let's plug this into equation 2 and find the value for y: $$y - \frac{9}{10}(5)=-\frac{55}{10}$$ $$y - \frac{45}{10}=-\frac{55}{10}$$ $$y=-\frac{55}{10}+ \frac{45}{10}$$ $$y=-\frac{10}{10}$$ $$y=-1$$ Lastly, we can find x by substituting in a 5 for z and a -1 for y in equation 1: $$1x - 4(-1) + 2(5)=15$$ $$1x + 4 + 10=15$$ $$x + 14=15$$ $$x=1$$ Our solution is the ordered triple: (1,-1,5)
Let's check our solution.
-x + 4y - 2z = -15
-(1) + 4(-1) - 2(5) = -15
-1 - 4 - 10 = -15
-15 = -15 ✔
-4x + 6y + z = -5
-4(1) + 6(-1) + (5) = -5
-4 - 6 + 5 = -5
-10 + 5 = -5
-5 = -5 ✔
-6x - 6y - 2z = -10
-6(1) - 6(-1) - 2(5) = -10
-6 + 6 - 10 = -10
-10 = -10 ✔
Example 2: Solve each linear system using Gauss-Jordan Elimination $$9x-4y+9z=27$$ $$-8x-y+10z=-19$$ $$-10x+y+8z=-35$$ Let's begin by writing our augmented matrix: $$\left[ \begin{array}{ccc|c}9&-4&9&27\\ -8&-1&10&-19\\ -10&1&8&-35 \end{array}\right] $$ We begin by obtaining a 1 as the first element in the first column. When we say first column, we are referring to the leftmost column. Since we have a 9 in this position, we can multiply row 1 by 1/9: $$\left[ \begin{array}{ccc|c}1&-4/9&1&3\\ -8&-1&10&-19\\ -10&1&8&-35 \end{array}\right] $$ Now we will work on the second element of the first column. Since we want this to be a zero, we can multiply row 1 by 8 and add the result to row 2: $$\left[ \begin{array}{ccc|c}1&-4/9&1&3\\ 0&-41/9&18&5\\ -10&1&8&-35 \end{array}\right] $$ Now we will work on the third element of the first column. Since we want this to be a 0, we can multiply row 1 by 10 and add the result to row 3: $$\left[ \begin{array}{ccc|c}1&-4/9&1&3\\ 0&-41/9&18&5\\ 0&-31/9&18&-5 \end{array}\right] $$ Now that the first column is finished, we will move on to the second column. First, we want to change the second element into a 1. Since we currently have -41/9, we can multiply row 2 by -9/41: $$\left[ \begin{array}{ccc|c}1&-4/9&1&3\\ 0&1&-162/41&-45/41\\ 0&-31/9&18&-5 \end{array}\right] $$ Now we will work on the first element of the second column. Let's multiply row 2 by 4/9 and add the result to row 1: $$\left[ \begin{array}{ccc|c}1&0&-31/41&103/41\\ 0&1&-162/41&-45/41\\ 0&-31/9&18&-5 \end{array}\right] $$ Now we will work on the third element of the second column. Let's multiply row 2 by 31/9 and add the result to row 3: $$\left[ \begin{array}{ccc|c}1&0&-31/41&103/41\\ 0&1&-162/41&-45/41\\ 0&0&180/41&-360/41 \end{array}\right] $$ Now that the second column is finished, we will move on to the third and final column. First, we want to change the third element into a 1. Since we currently have 180/41, we can multiply row 3 by 41/180: $$\left[ \begin{array}{ccc|c}1&0&-31/41&103/41\\ 0&1&-162/41&-45/41\\ 0&0&1&-2 \end{array}\right] $$ Now we will work on the first element of the third column. Let's multiply row 3 by 31/41 and add the result to row 1: $$\left[ \begin{array}{ccc|c}1&0&0&1\\ 0&1&-162/41&-45/41\\ 0&0&1&-2 \end{array}\right] $$ For our final step, we will work on the second element of the third column. Let's multiply row 3 by 162/41 and add the result to row 2: $$\left[ \begin{array}{ccc|c}1&0&0&1\\ 0&1&0&-9\\ 0&0&1&-2 \end{array}\right] $$ Now our augmented matrix is in reduced-row echelon form. We can obtain the solution directly from the augmented matrix without the need for substitution: $$1x + 0y + 0z=1$$ $$0x + 1y + 0z=-9$$ $$0x + 0y + 1z=-2$$ This tells us that x is 1, y is -9, and z is -2.
We can write this as the ordered triple: (1,-9,-2)
Let's check our answer in each original equation of the system:
9x - 4y + 9z = 27
9(1) - 4(-9) + 9(-2) = 27
9 + 36 - 18 = 27
27 = 27 ✔
-8x - y + 10z = -19
-8(1) - (-9) + 10(-2) = -19
-8 + 9 - 20 = -19
-19 = -19 ✔
-10x + y + 8z = -35
-10(1) + (-9) + 8(-2) = -35
-10 - 9 - 16 = -35
-35 = -35 ✔
Elementary Row Operations
- We can interchange any two rows
- We can multiply any row by a non-zero number
- We can multiply a row by a real number and add this to the corresponding elements of any other row
Example 1: Solve each linear system using Gaussian Elimination $$-x + 4y - 2z=-15$$ $$-4x + 6y + z=-5$$ $$-6x - 6y - 2z=-10$$ Let's begin by writing our augmented matrix: $$\left[ \begin{array}{ccc|c}-1&4&-2&-15\\ -4&6&1&-5\\ -6&-6&-2&-10\\ \end{array}\right] $$ We work column by column, starting with the leftmost column. We want a 1 as the first element in the leftmost column. We can achieve this by multiplying the top row by -1: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ -4&6&1&-5\\ -6&-6&-2&-10\\ \end{array}\right] $$ Next, we will work on the second element in the leftmost column. Since we want this to be a 0, we can multiply row 1 by 4 and add the result to row 2: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ 0&-10&9&55\\ -6&-6&-2&-10\\ \end{array}\right] $$ Next, we will work on the third element in the leftmost column. Since we want this to be a 0, we can multiply row 1 by 6 and add the result to row 3: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ 0&-10&9&55\\ 0&-30&10&80\\ \end{array}\right] $$ Now that the first or leftmost column is complete, we move one column to the right. We will start by changing the second element of the middle column into a 1. We can achieve this by multiplying row 2 by -1/10: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ 0&1&-9/10&-55/10\\ 0&-30&10&80\\ \end{array}\right] $$ Next, we will work on the third element in the middle column. Since we want this to be a 0, we can multiply row 2 by 30 and add the result to row 1: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ 0&1&-9/10&-55/10\\ 0&0&-17&-85\\ \end{array}\right] $$ Now that the middle column is complete, we move on to the last or rightmost column. We only need to change the third element into a 1. We can achieve this by multiplying row 3 by -1/17: $$\left[ \begin{array}{ccc|c}1&-4&2&15\\ 0&1&-9/10&-55/10\\ 0&0&1&5\\ \end{array}\right] $$ Our augmented matrix is in row echelon form. We can now use substitution to find the solutions for the system. Let's translate the numerical information from the augmented matrix back into equation format: $$1x - 4y + 2z=15$$ $$0x + 1y - \frac{9}{10}z=-\frac{55}{10}$$ $$0x + 0y + 1z=5$$ At this point, we know that z is 5, let's plug this into equation 2 and find the value for y: $$y - \frac{9}{10}(5)=-\frac{55}{10}$$ $$y - \frac{45}{10}=-\frac{55}{10}$$ $$y=-\frac{55}{10}+ \frac{45}{10}$$ $$y=-\frac{10}{10}$$ $$y=-1$$ Lastly, we can find x by substituting in a 5 for z and a -1 for y in equation 1: $$1x - 4(-1) + 2(5)=15$$ $$1x + 4 + 10=15$$ $$x + 14=15$$ $$x=1$$ Our solution is the ordered triple: (1,-1,5)
Let's check our solution.
-x + 4y - 2z = -15
-(1) + 4(-1) - 2(5) = -15
-1 - 4 - 10 = -15
-15 = -15 ✔
-4x + 6y + z = -5
-4(1) + 6(-1) + (5) = -5
-4 - 6 + 5 = -5
-10 + 5 = -5
-5 = -5 ✔
-6x - 6y - 2z = -10
-6(1) - 6(-1) - 2(5) = -10
-6 + 6 - 10 = -10
-10 = -10 ✔
Solving Linear Systems in Three Variables using Gauss-Jordan Elimination
In the last lesson, we also learned about Gauss-Jordan Elimination. With this method, we place the augmented matrix in reduced-row echelon form. This gives us "1's" down the diagonal and "0's" above and below. $$\left[ \begin{array}{ccc|c}1&0&0&a\\ 0&1&0&b\\ 0&0&1&c \end{array}\right] $$ When the augmented matrix is in reduced-row echelon form, the solutions can be obtained directly from the matrix. This means no substitution is needed.Gauss-Jordan Three-Variable System
- Obtain a 1 as the first element in the first column
- Use the first row to transform the remaining elements in the first column into zeros
- Obtain a 1 as the second element in the second column
- Use the second row to transform the remaining elements in the second column into zeros
- Obtain a 1 as the third element in the third column
- Use the third row to transform the remaining elements in the third column into zeros
Example 2: Solve each linear system using Gauss-Jordan Elimination $$9x-4y+9z=27$$ $$-8x-y+10z=-19$$ $$-10x+y+8z=-35$$ Let's begin by writing our augmented matrix: $$\left[ \begin{array}{ccc|c}9&-4&9&27\\ -8&-1&10&-19\\ -10&1&8&-35 \end{array}\right] $$ We begin by obtaining a 1 as the first element in the first column. When we say first column, we are referring to the leftmost column. Since we have a 9 in this position, we can multiply row 1 by 1/9: $$\left[ \begin{array}{ccc|c}1&-4/9&1&3\\ -8&-1&10&-19\\ -10&1&8&-35 \end{array}\right] $$ Now we will work on the second element of the first column. Since we want this to be a zero, we can multiply row 1 by 8 and add the result to row 2: $$\left[ \begin{array}{ccc|c}1&-4/9&1&3\\ 0&-41/9&18&5\\ -10&1&8&-35 \end{array}\right] $$ Now we will work on the third element of the first column. Since we want this to be a 0, we can multiply row 1 by 10 and add the result to row 3: $$\left[ \begin{array}{ccc|c}1&-4/9&1&3\\ 0&-41/9&18&5\\ 0&-31/9&18&-5 \end{array}\right] $$ Now that the first column is finished, we will move on to the second column. First, we want to change the second element into a 1. Since we currently have -41/9, we can multiply row 2 by -9/41: $$\left[ \begin{array}{ccc|c}1&-4/9&1&3\\ 0&1&-162/41&-45/41\\ 0&-31/9&18&-5 \end{array}\right] $$ Now we will work on the first element of the second column. Let's multiply row 2 by 4/9 and add the result to row 1: $$\left[ \begin{array}{ccc|c}1&0&-31/41&103/41\\ 0&1&-162/41&-45/41\\ 0&-31/9&18&-5 \end{array}\right] $$ Now we will work on the third element of the second column. Let's multiply row 2 by 31/9 and add the result to row 3: $$\left[ \begin{array}{ccc|c}1&0&-31/41&103/41\\ 0&1&-162/41&-45/41\\ 0&0&180/41&-360/41 \end{array}\right] $$ Now that the second column is finished, we will move on to the third and final column. First, we want to change the third element into a 1. Since we currently have 180/41, we can multiply row 3 by 41/180: $$\left[ \begin{array}{ccc|c}1&0&-31/41&103/41\\ 0&1&-162/41&-45/41\\ 0&0&1&-2 \end{array}\right] $$ Now we will work on the first element of the third column. Let's multiply row 3 by 31/41 and add the result to row 1: $$\left[ \begin{array}{ccc|c}1&0&0&1\\ 0&1&-162/41&-45/41\\ 0&0&1&-2 \end{array}\right] $$ For our final step, we will work on the second element of the third column. Let's multiply row 3 by 162/41 and add the result to row 2: $$\left[ \begin{array}{ccc|c}1&0&0&1\\ 0&1&0&-9\\ 0&0&1&-2 \end{array}\right] $$ Now our augmented matrix is in reduced-row echelon form. We can obtain the solution directly from the augmented matrix without the need for substitution: $$1x + 0y + 0z=1$$ $$0x + 1y + 0z=-9$$ $$0x + 0y + 1z=-2$$ This tells us that x is 1, y is -9, and z is -2.
We can write this as the ordered triple: (1,-9,-2)
Let's check our answer in each original equation of the system:
9x - 4y + 9z = 27
9(1) - 4(-9) + 9(-2) = 27
9 + 36 - 18 = 27
27 = 27 ✔
-8x - y + 10z = -19
-8(1) - (-9) + 10(-2) = -19
-8 + 9 - 20 = -19
-19 = -19 ✔
-10x + y + 8z = -35
-10(1) + (-9) + 8(-2) = -35
-10 - 9 - 16 = -35
-35 = -35 ✔
Skills Check:
Example #1
Solve each system. $$-x + 3y + 4z=-27$$ $$-x + 3y - 4z=5$$ $$2x - 2y - 2z=18$$
Please choose the best answer.
A
$$(2,-3,-4)$$
B
$$(-5,0,5)$$
C
$$(-6,3,-2)$$
D
$$(-4,2,-3)$$
E
No Solution
Example #2
Solve each system. $$6x + 3y + 3z=3$$ $$4x + 2y + 2z=-12$$ $$-4x + 3y + 3z=-10$$
Please choose the best answer.
A
$$(3,6,-5)$$
B
No Solution
C
$$(6,5,3)$$
D
$$(6,3,-5)$$
E
$$(1,0,-8)$$
Example #3
Solve each system. $$-x - 5y + z=-8$$ $$-x + 5y + 5z=-10$$ $$-x - 5y - 3z=4$$
Please choose the best answer.
A
$$(1,6,-6)$$
B
$$(1,-3,0)$$
C
$$(0,1,-3)$$
D
$$(4,-2,5)$$
E
No Solution
Congrats, Your Score is 100%
Better Luck Next Time, Your Score is %
Try again?
Ready for more?
Watch the Step by Step Video Lesson Take the Practice Test