topic badge
Standard Level

4.07 Solving linear systems in three unknowns

Lesson

A system of equations is a set of $2$2 or more equations. We call it a system when maybe the equations are related by context or purpose, kind of like that the system is working together.  The individual equations can be linear, quadratic or indeed take any form but for now we will concentrate on just the linear ones.  There are two useful features about systems of equations, the first is the solution to the system and the second relates to regions within the system.

Solution to the systems

The solution to a system is the point where all the equations are satisfied.  When we had $2$2 linear equations in $2$2 unknowns the solution was the intersection of the two lines because at this point both lines are satisfied.

An equation in $3$3 unknowns takes us up a dimension.  No longer are we working in $2$2 dimensions of the $x$x and $y$y axis, but in $3$3 dimensions with the $x,y$x,y and $z$z axis. This is the $3$3 dimensional Cartesian plane.  You can see the $x$x and $y$y axis in red and green, and the $3$3rd dimension is $z$z, which is in blue.

The line $y=x$y=x appears in the $3$3 dimensions in what we call a plane.  It is a surface.  It is still taking on the familiar $y=x$y=x shape, but the third dimension gives us this shape.  It is similar to imagining holding up a piece of paper.  

The equation $x+y+z=1$x+y+z=1, produces another plane surface. 

 

The following applet will allow you to create different planes using the sliders for different values of $x,y,z$x,y,z.  

So now we know what an equation in $3$3 dimensions produces.  

Let's have a brief look at the behaviour of planes.

 

Planes can be parallel

For example here we have pictured $x+y+z=1,x+y+z=-3$x+y+z=1,x+y+z=3 and $x+y+z=5$x+y+z=5

Planes can intersect 

Here we have pictured $x+y+z=1$x+y+z=1 and $-2x+y+5z=1$2x+y+5z=1.

We can see here that we don't have a single point of intersection, but we have a line. 

 

With three planes intersecting we end up with a point. It's at this point that the solution to the system of $3$3 equations and $3$3 unknowns provides us.

This image shows the line that was created by the intersection of $x+y+z=1$x+y+z=1 and $-2x+y+5z=1$2x+y+5z=1 and also the plane created by $3x+0.5y-0.5z=1$3x+0.5y0.5z=1.  We can see that these intersect at just the one point. The place where the line passes through the plane.

 

Here is the original image of the $3$3 planes.

The point of intersection for this set is $(0.29,0.5,0.21)$(0.29,0.5,0.21).

 

Solving systems of equations in three unknowns.

Now we know what we are finding, (the intersection of the planes), then we need to set about doing it.

The good news is, we use all the tools we have already gained solving systems in $2$2 unknowns.  We can use substitution, elimination or as above; a graphical approach using technology. 

Let's do one together.

Worked example

example 1

Solve the system of equations

$2x+y-z$2x+yz $=$= $9$9 $(1)$(1)
$x-3y+z$x3y+z $=$= $-2$2 $(2)$(2)
$-x+y+3z$x+y+3z $=$= $-8$8 $(3)$(3)

Think: To solve this let's use elimination and eliminate the variable $z$z, first on equations $1$1 and $2$2

$2x+y-z$2x+yz $=$= $9$9 $(1)$(1)
$x-3y+z$x3y+z $=$= $-2$2 $(2)$(2)
$3x-2y$3x2y $=$= $7$7 $(1)+(2)->(4)$(1)+(2)>(4)

and a similar operation to eliminate $z$z with equations $1$1 and $3$3.

$2x+y-z$2x+yz $=$= $9$9 $(1)$(1)
$-x+y+3z$x+y+3z $=$= $-8$8 $(3)$(3)
$6x+3y-3z$6x+3y3z $=$= $27$27 $3\times(1)->(5)$3×(1)>(5)
$5x+4y$5x+4y $=$= $19$19 $(5)+(3)->(6)$(5)+(3)>(6)

Do: Now we have this smaller system in $2$2 unknowns that we can solve for $x$x and $y$y.

$3x-2y$3x2y $=$= $7$7 $(4)$(4)
$5x+4y$5x+4y $=$= $19$19 $(6)$(6)
$11x$11x $=$= $33$33 $(6)+2\times(4)$(6)+2×(4)
$x$x $=$= $3$3  

So $x=3$x=3, which means that 

$3x-2y$3x2y $=$= $7$7
$3\cdot3-2y$3·32y $=$= $7$7
$9-2y$92y $=$= $7$7
$-2y$2y $=$= $-2$2
$y$y $=$= $1$1

Substituting back into (1), $2x+y-z=9$2x+yz=9 we discover that $2\times(3)+1-z=9$2×(3)+1z=9, which means that $z=-2$z=2

So our final solution is that 

$x=3$x=3, $y=1$y=1 and $z=-2$z=2.  We can write this as an ordered triple of $(3,1,-2)$(3,1,2).

Reflect: The great thing about systems of equations is that you can always substitute back in and check your answer. 

Is this the solution?

We can check that a point (in $3$3 dimensions we call this point an ordered triple) is a solution by substituting into each of the equations.  If the values for $x,y$x,y and $z$z satisfy ALL three equations, then the ordered triple is a solution. 

Practice question

question 1

We want to determine if the ordered triple $\left(-9,-7,4\right)$(9,7,4) is a solution of the following system of equations.

$-2x$2x $+$+ $5y$5y $-$ $3z$3z $=$= $-29$29
$-3x$3x $+$+ $y$y $+$+ $4z$4z $=$= $38$38
$-4x$4x $+$+ $2y$2y $+$+ $3z$3z $=$= $34$34
  1. Find the missing values by substituting in the ordered triple $\left(-9,-7,4\right)$(9,7,4).

    $-2x$2x $+$+ $5y$5y $-$ $3z$3z $=$= $\editable{}$
    $-3x$3x $+$+ $y$y $+$+ $4z$4z $=$= $\editable{}$
    $-4x$4x $+$+ $2y$2y $+$+ $3z$3z $=$= $\editable{}$
  2. Is the ordered triple $\left(-9,-7,4\right)$(9,7,4) a solution of the system of equations?

    Yes

    A

    No

    B

 

Types of solutions

No solutions

We already eluded to a special case of systems of equations in $3$3 unknowns, when they are all parallel.  If the solution to a system is the point (or line) that occurs on their intersection, then what happens when there are no intersections?  

In the case of parallel lines, the system is what we call inconsistent.  When you try to solve a system that is parallel, you end up with what we call contradictions.  Take our parallel line example from earlier.  

For example here we have pictured $x+y+z=1,x+y+z=-3$x+y+z=1,x+y+z=3 and $x+y+z=5$x+y+z=5

See how $x+y+z$x+y+z is $1$1, but it is also $-3$3 and $5$5.  Clearly, there is not a set of numbers that when we add them together we can have three different answers.  So this is the contradiction, and it is what indicates parallel lines. 

Consistent or inconsistent?

A system is inconsistent if it has no solutions, otherwise it is consistent.

 

Infinite solutions

Infinite solutions result when one of the equations ends up being (through some kind of algebraic manipulation) the same as one of the other equations.  This means we really only have two unique equations in three unknowns so we are not actually able to solve it. . 

For example, this system has infinite solutions as equation $(1)$(1) and equation $(3)$(3) are actually multiples of each other. 

$3x-2y+z=5$3x2y+z=5 $1$1

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

$-3x+2y-z=-5$3x+2yz=5 $3$3

If a system has infinite solutions we say that the system is dependent.  

One solution

If a system has one solution, then we say that the system is independent.  

 

Dependent or Independent?

A system is dependent if it has infinite solutions, and independent if it has one.

 

Final summary

Remember!
  Consistent Inconsistent
Dependent Infinite Solutions (identical equations) No solution (contradictive equations)
Independent $1$1 solution N/A

 

Practice questions

QUESTION 2

Solve the following system.

$5x$5x $+$+ $3y$3y $+$+ $2z$2z $=$= $13$13 ----- equation $1$1
$4x$4x $+$+ $3y$3y     $=$= $0$0

----- equation $2$2

    $-3y$3y $-$ $6z$6z $=$= $-18$18

----- equation $3$3

  1. Subtract equation $2$2 from equation $1$1.

    $\editable{}x+2z$x+2z $=$= $\editable{}$ ----- equation $4$4

    Add equation $3$3 to equation $1$1.

    $5x-\editable{}z$5xz $=$= $\editable{}$ ----- equation $5$5

    Multiply equation $4$4 by $2$2.

    $\editable{}x+4z$x+4z $=$= $\editable{}$ ----- equation $6$6

    Add equation $6$6 to equation $5$5, and find a value for $x$x.

    $\editable{}x$x $=$= $\editable{}$
    $x$x $=$= $\editable{}$
  2. Substitute $x=3$x=3 into equation $2$2, and find a value for $y$y.

  3. Substitute $x=3$x=3 and $y=-4$y=4 into equation $1$1, and find a value for $z$z.

  4. $x$x $=$= $\editable{}$
    $y$y $=$= $\editable{}$
    $z$z $=$= $\editable{}$

QUESTION 3

Solve the following system.

$3x$3x $+$+ $2y$2y $-$ $z$z $=$= $-9$9 ----- equation $1$1
$6x$6x $-$ $4y$4y $+$+ $z$z $=$= $-20$20

----- equation $2$2

$3x$3x $+$+ $6y$6y $+$+ $4z$4z $=$= $5$5

----- equation $3$3

  1. Add equation $1$1 to equation $2$2 in order to eliminate the $z$z term.

    $\editable{}x$x $-$ $\editable{}y$y $=$= $\editable{}$

    ----- equation $4$4

    Multiply equation $1$1 by $4$4 so we can use the elimination method again.

    $3x\times\editable{}$3x× $+$+ $2y\times\editable{}$2y× $-$ $z\times\editable{}$z× $=$= $-9\times\editable{}$9×  
    $\editable{}x$x $+$+ $\editable{}y$y $-$ $\editable{}z$z $=$= $\editable{}$

    ----- equation $5$5

    Add equation $5$5 to equation $3$3 in order to eliminate the $z$z term again.

    $\editable{}x$x $+$+ $\editable{}y$y $=$= $\editable{}$

    ----- equation $6$6

  2. Multiply equation $4$4 by $7$7 so we can use the elimination method again.

    $9x$9x $-$ $2y$2y $=$= $-29$29

    ----- equation $4$4

    $9x\times\editable{}$9x× $-$ $2y\times\editable{}$2y× $=$= $-29\times\editable{}$29×
    $\editable{}x$x $-$ $\editable{}y$y $=$= $\editable{}$

    ----- equation $7$7

  3. Add equation $6$6 to equation $7$7, so we can eliminate $y$y, and find a value for $x$x.

    $15x$15x $+$+ $14y$14y $=$= $-31$31

    ----- equation $6$6

    $63x$63x $-$ $14y$14y $=$= $-203$203

    ----- equation $7$7

  4. Substitute $x=-3$x=3 into equation $6$6.

    $15x$15x $+$+ $14y$14y $=$= $-31$31

    ----- equation $6$6

  5. Substitute $x=-3$x=3 and $y=1$y=1 into equation $2$2, and find a value for $z$z.

    $6x$6x $-$ $4y$4y $+$+ $z$z $=$= $-20$20

    ----- equation $2$2

  6. $x$x $=$= $\editable{}$
    $y$y $=$= $\editable{}$
    $z$z $=$= $\editable{}$

We've now covered how to solve linear systems of equations in three unknowns. We can solve by elimination where we can multiply/divide any equation and add/subtract equations. Or also solve by substitution where we sub one equation into another. Alternatively, we can look at systems of equations graphically as regions or curves in space (for three unknowns) and curves on the plane (for two unknowns).

Now it's time to apply these concepts to certain situations. For any problem involving systems of equations, just remember to follow this three-step process.

1) IDENTIFY - Read the question carefully and identify the equations you will need.

2) CONSTRUCT - Construct the system of equations. Try to line up your variables to make solving them easier.

3) SOLVE - Choose a method and solve the system.

Worked example

EXAMPLE 2

At a local cinema, there are different ticket prices for adults, students and children. Three families come in to see a movie.

The first family consists of $4$4 adults, $1$1 student and $3$3 children. They pay $\$131$$131 all together.

The second family consists of $2$2 adults, $2$2 students and $2$2 children. They pay $\$94$$94 all together.

The third family consists of $2$2 adults, $3$3 students and $1$1 child. They pay currency $\$97$$97 all together.

What are the ticket prices at the cinema?

Think: After reading the question carefully, we can see that our three unknowns are the ticket prices for adults, students and children, which we can label $x$x, $y$y and $z$z respectively. We want three equations with these variables.

Do: Let's look at the first family. They have $4$4 adults, so they paid $4x$4x worth of adult tickets. Similarly, they paid $y$y worth of student tickets and $3z$3z worth of child tickets. If they paid $\$131$$131 all together, we can come up with this equation.

$4x+y+3z=131$4x+y+3z=131 ... (1)

In the same way, we get the following equations for the other two families.

$2x+2y+2z=94$2x+2y+2z=94 ... (2)

$2x+3y+z=97$2x+3y+z=97 ... (3)

Now that we have our equations, we need to line them up in a system and choose a method for solving them. For this particular system, let's use elimination.

$4x$4x $+$+ $y$y $+$+ $3z$3z $=$= $131$131 ... (1)
$2x$2x $+$+ $2y$2y $+$+ $2z$2z $=$= $94$94 ... (2)
$2x$2x $+$+ $3y$3y $+$+ $z$z $=$= $97$97 ... (3)

Noticing that equations (2) and (3) both have $2x$2x at the start, so let's subtract them to eliminate $x$x altogether.

$2x$2x $+$+ $3y$3y $+$+ $z$z $=$= $97$97 ... (3)
$2x$2x $+$+ $2y$2y $+$+ $2z$2z $=$= $94$94 ... (2)
                 
    $y$y $-$ $z$z $=$= $3$3 ...

(3)$-$(2)$=$=(4)

Now we have an equation in $y$y and $z$z only. To solve fully, we're going to need another equation in $y$y and $z$z. We will have eliminate $x$x somewhere else too.

To get this, we could multiply equation (2) by $2$2 to get $4x$4x at the start, then subtract equation (1) from this.

$4x$4x $+$+ $4y$4y $+$+ $4z$4z $=$= $188$188 ... (2) $\times$×$2$2
$4x$4x $+$+ $y$y $+$+ $3z$3z $=$= $131$131 ... (1)
                 
    $3y$3y $+$+ $z$z $=$= $57$57 ...

(2)$\times$×$2$2$-$(1)$=$=(5)

Now, in these new equations (4) and (5) that we've derived, notice that the signs are opposite, so if we add these equations together, $z$z should vanish, leaving $y$y ready to solve.

$y$y $-$ $z$z $=$= $3$3 ... (4)
$3y$3y $+$+ $z$z $=$= $57$57 ... (5)
             
$4y$4y     $=$= $60$60 ... (4)$+$+(5)$=$=6

And after dividing both sides by $4$4, we finally get:

$y=15$y=15

Now it's time to use this to retrieve $x$x and $z$z. We can substitute backwards like dominoes to get our remaining solutions.

Substituting $y=15$y=15 into equation (4) gives:

$y=15$y=15     →     $\left(15\right)-z=3$(15)z=3     →     $z=12$z=12

And substituting $y=15$y=15 and $z=12$z=12 into equation (2) gives:

$y=15$y=15, $z=12$z=12     →     $2x+2\times\left(15\right)+2\times\left(12\right)=94$2x+2×(15)+2×(12)=94     →     $2x+54=94$2x+54=94     →     $x=20$x=20

And so we have our solutions:

$x=20$x=20
$y=15$y=15
$z=12$z=12

Which means the cinema charges the following prices:

Adults $\$20$$20
Students $\$15$$15
Children $\$12$$12

Reflect: Elimination is not the only method we could have used, so it will be up to you to identify a method that you think will be efficient.

Practice questions

Question 4

Hartman Rent-A-Car are about to spend $\$2008000$$2008000 buying a fleet of new vehicles. The fleet is made up of hatchbacks, sedans and SUVs. Hatchbacks cost $\$10000$$10000 each, sedans cost $\$13000$$13000 each and SUVs cost $\$17000$$17000 each.

Hartman Rent-A-Car will purchase twice as many hatchbacks as sedans and the total number of cars to be bought is $152$152.

  1. Let $x$x be the number of hatchbacks, $y$y be the number of sedans, and $z$z be the number of SUVs.

    Complete the following system of equations:

    $x$x $+$+ $y$y $+$+ $z$z $=$= $\editable{}$
    $\editable{}$$x$x $+$+ $\editable{}$$y$y $+$+ $\editable{}$$z$z $=$= $\editable{}$
            $x$x $=$= $\editable{}$$y$y
  2. Below is one approach to solving the system of equations using the elimination method:

    $x$x $+$+ $y$y $+$+ $z$z $=$= $152$152 ----- equation $1$1
    $10000x$10000x $+$+ $13000y$13000y $+$+ $17000z$17000z $=$= $2008000$2008000 ----- equation $2$2
    $x$x $=$= $2y$2y ----- equation $3$3

    Equation $3$3 gives us a value of $x$x in terms of $y$y. This means we can make a substitution in place of $x$x in equation $1$1.

    Step 1: Substitute equation $3$3 into equation $1$1.

    $\editable{}$ $+$+ $y$y $+$+ $z$z $=$= $152$152 ----- equation $1$1
    $\editable{}$$y$y $+$+ $z$z $=$= $152$152 ----- equation $4$4

    Using the same tactic as we did in step 1, we can make a substitution in place of $x$x in equation $2$2.

    Step 2: Substitute equation $3$3 into equation $2$2.

    $10000$10000$\times$×$\editable{}$ $+$+ $13000y$13000y $+$+ $17000z$17000z $=$= $2008000$2008000 ----- equation $2$2
    $\editable{}$$y$y $+$+ $17000z$17000z $=$= $2008000$2008000 ----- equation $5$5

    Now we have two linear equations in two unknowns ($y$y and $z$z).

    We would like to use the elimination method here, so we need both of the equations to have the same coefficient for one of the unknowns. Let's make the $z$z coefficient the same by multiplying every term in equation $4$4 by $17000$17000.

    Step 3: Multiply equation $4$4 by $17000$17000 so we can use the elimination method.

    $3y$3y $+$+ $z$z $=$= $152$152 ----- equation $4$4
    $\editable{}\times3y$×3y $+$+ $\editable{}\times z$×z $=$= $\editable{}\times152$×152
    $\editable{}y$y $+$+ $\editable{}z$z $=$= $\editable{}$ ----- equation $6$6

    Now that equation $5$5 and equation $6$6 have the same $z$z coefficient we can subtract one from the other to get an equation with only one unknown.

    Step 4: Subtract equation $5$5 from equation $6$6. Begin by re-writing equation $6$6 and equation $5$5.

    $\editable{}y$y $+$+ $\editable{}z$z $=$= $\editable{}$ ----- equation $6$6
    $\editable{}y$y $+$+ $\editable{}z$z $=$= $\editable{}$ ----- equation $5$5
    $\editable{}y$y $=$= $\editable{}$
    $y$y $=$= $\editable{}$

    We now have a value for $y$y. Let's substitute this value in place of $y$y in equation $4$4.

    Step 5: Substitute the value of $y$y into equation $4$4.

    $3\times\editable{}$3× $+$+ $z$z $=$= $152$152

    ----- equation $4$4

    $z$z $=$= $\editable{}$

    We now have a value for $z$z and $y$y. Let's substitute these values in equation $4$4.

    Step 6: Substitute the value of $y$y and the value of $z$z into equation $1$1.

    $x$x $+$+ $\editable{}$ $+$+ $\editable{}$ $=$= $152$152

    ----- equation $1$1

    $x$x $=$= $\editable{}$
  3. Deduce the number of:

    Hatchbacks = $\editable{}$.

    Sedans = $\editable{}$.

    SUVs = $\editable{}$.

Question 5

Paul has made three different investments. In the last financial year he earned $7%$7% interest on his savings account, $1%$1% interest on his mutual funds investment, and $2%$2% interest on his money market investment. Paul earned a total of $\$45600$$45600 in interest from the investments.

Paul has twice as much money invested in the money market than he has in his savings account. Further, he earned half as much from his money market investment than he did from his mutual funds investment.

  1. Let $x$x be the amount of money Paul has in his saving accounts, $y$y the amount he has invested in mutual funds, and $z$z the amount he has invested in the money market.

    Complete the following system of equations:

    $\editable{}x$x $+$+ $\editable{}y$y $+$+ $\editable{}z$z $=$= $\editable{}$
    $z$z $=$= $\editable{}x$x
    $y$y $=$= $\editable{}z$z
  2. Work through the following approach to solving the system of equations:

    $0.07x$0.07x $+$+ $0.01y$0.01y $+$+ $0.02z$0.02z $=$= $45600$45600 ----- equation $1$1
            $z$z $=$= $2x$2x ----- equation $2$2
            $y$y $=$= $4z$4z ----- equation $3$3

    Step 1: Substitute equation $2$2 into equation $3$3.

            $y$y $=$= $4z$4z

    ----- equation $3$3

            $y$y $=$= $4\times\editable{}$4×  
            $y$y $=$= $\editable{}$ ----- equation $4$4

    Step 2: Substitute equation $2$2 and equation $4$4 into equation $1$1.

    $0.07x$0.07x $+$+ $0.01y$0.01y $+$+ $0.02z$0.02z $=$= $45600$45600 ----- equation $1$1
    $0.07x$0.07x $+$+ $0.01\times\editable{}$0.01× $+$+ $0.02\times\editable{}$0.02× $=$= $45600$45600  
    $0.07x$0.07x $+$+ $\editable{}$ $+$+ $\editable{}$ $=$= $45600$45600  
            $\editable{}x$x $=$= $45600$45600  
            $x$x $=$= $\editable{}$  

    Step 3: Substitute the value of $x$x into equation $2$2.

            $z$z $=$= $2x$2x

    ----- equation $2$2

            $z$z $=$= $2\times\editable{}$2×  
            $z$z $=$= $\editable{}$  

    Step 4: Substitute the value of $z$z into equation $3$3.

            $y$y $=$= $4z$4z

    ----- equation $3$3

            $y$y $=$= $4\times\editable{}$4×  
            $y$y $=$= $\editable{}$  
  3. As a result of the above, enter the amounts Paul has invested in the following places:

    Saving account: $\editable{}$ dollars.

    Mutual funds: $\editable{}$ dollars.

    Money market: $\editable{}$ dollars.

What is Mathspace

About Mathspace