Math Core

Lesson 1.3 · Functions and Linear Systems

Systems of equations in three variables

In Algebra 1 you solved systems with two unknowns, using two equations. Plenty of problems have three unknowns: the prices of three kinds of tickets, the amounts of three ingredients in a mix, or the three coefficients aa, bb and cc of a parabola. To pin down three unknowns you generally need three equations, and the elimination method you already know extends to handle them.

What a solution looks like

A linear equation in three variables has the form ax+by+cz=dax + by + cz = d. A solution of one such equation is a set of three numbers, one for each variable.

Definition

Ordered triple

An ordered triple (x,y,z)(x, y, z) lists values for three variables in order. A solution of a system in three variables is an ordered triple that makes every equation true.

For example, check whether (2,−1,3)(2, -1, 3) solves this system:

x+y+z=42x−y+z=8x+3y−2z=−7\begin{aligned} x + y + z &= 4 \\ 2x - y + z &= 8 \\ x + 3y - 2z &= -7 \end{aligned}

Substitute x=2x = 2, y=−1y = -1, z=3z = 3: the first equation gives 2−1+3=42 - 1 + 3 = 4, the second 4+1+3=84 + 1 + 3 = 8, and the third 2−3−6=−72 - 3 - 6 = -7. All three are true, so (2,−1,3)(2, -1, 3) is a solution.

A picture. The graph of a linear equation in two variables is a line. The graph of a linear equation in three variables is a flat plane in space. Three planes can meet at a single point (one solution), have no point common to all three (no solution), or share an entire line (infinitely many solutions). Most systems you'll see have exactly one solution, but the other two cases do happen.

Solving by elimination

The plan is to turn a 3×33 \times 3 system into a 2×22 \times 2 system you already know how to solve.

Elimination with three variables

  1. Choose one variable to eliminate.
  2. Use two different pairs of equations to eliminate that same variable. You get two new equations in the other two variables.
  3. Solve that 2×22 \times 2 system.
  4. Substitute both values back into an original equation to find the third variable.
  5. Check the triple in all three original equations.

Worked example: A full elimination

Solve the system.

x+y+z=2(1)2x−y+3z=−7(2)3x+2y−z=11(3)\begin{aligned} x + y + z &= 2 &\quad (1)\\ 2x - y + 3z &= -7 &\quad (2)\\ 3x + 2y - z &= 11 &\quad (3) \end{aligned}

Step 1. The variable zz has coefficients 11, 33 and −1-1, so it's easy to eliminate.

Step 2. Pair (1) with (3). Adding them cancels zz:

(x+y+z)+(3x+2y−z)=2+11⟹4x+3y=13.(4)(x + y + z) + (3x + 2y - z) = 2 + 11 \quad\Longrightarrow\quad 4x + 3y = 13. \quad (4)

Now pair (1) with (2). Multiply (1) by 33 and subtract (2):

(3x+3y+3z)−(2x−y+3z)=6−(−7)⟹x+4y=13.(5)(3x + 3y + 3z) - (2x - y + 3z) = 6 - (-7) \quad\Longrightarrow\quad x + 4y = 13. \quad (5)

Step 3. Solve (4) and (5). From (5), x=13−4yx = 13 - 4y. Substitute into (4):

4(13−4y)+3y=1352−13y=13y=3\begin{aligned} 4(13 - 4y) + 3y &= 13 \\ 52 - 13y &= 13 \\ y &= 3 \end{aligned}

Then x=13−4(3)=1x = 13 - 4(3) = 1.

Step 4. From (1): 1+3+z=21 + 3 + z = 2, so z=−2z = -2.

Step 5. Check in (2): 2−3−6=−72 - 3 - 6 = -7. Check in (3): 3+6+2=113 + 6 + 2 = 11. The solution is (1,3,−2)(1, 3, -2).

Common mistake

Eliminate the same variable from both pairs. If you eliminate zz from one pair and xx from the other, the two new equations still have three variables between them, and you haven't made progress. Also make sure the two pairs are different: using (1) and (3) twice gives no new information.

Solving by substitution

When one or more equations already have a variable by itself, substitution is often faster.

Worked example: Substitution

Solve the system.

x+2y+z=10y=3x−4z=x+y\begin{aligned} x + 2y + z &= 10 \\ y &= 3x - 4 \\ z &= x + y \end{aligned}

First write zz in terms of xx alone: z=x+(3x−4)=4x−4z = x + (3x - 4) = 4x - 4.

Now substitute both expressions into the first equation:

x+2(3x−4)+(4x−4)=10x+6x−8+4x−4=1011x−12=10x=2\begin{aligned} x + 2(3x - 4) + (4x - 4) &= 10 \\ x + 6x - 8 + 4x - 4 &= 10 \\ 11x - 12 &= 10 \\ x &= 2 \end{aligned}

Then y=3(2)−4=2y = 3(2) - 4 = 2 and z=2+2=4z = 2 + 2 = 4. Check: 2+4+4=102 + 4 + 4 = 10. The solution is (2,2,4)(2, 2, 4).

Systems with no solution or infinitely many

Sometimes every variable disappears during elimination. What's left tells you which case you're in.

  • A false statement such as 0=20 = 2 means the system has no solution (it is inconsistent).
  • A true statement such as 0=00 = 0 means the equations are dependent, and the system has infinitely many solutions.

Worked example: An inconsistent system

Solve the system.

x+2y−z=4(1)2x−y+z=3(2)3x+y=9(3)\begin{aligned} x + 2y - z &= 4 &\quad (1)\\ 2x - y + z &= 3 &\quad (2)\\ 3x + y &= 9 &\quad (3) \end{aligned}

Equation (3) has no zz, so eliminate zz from (1) and (2). Adding them gives 3x+y=73x + y = 7.

Now the 2×22 \times 2 system is 3x+y=73x + y = 7 and 3x+y=93x + y = 9. Subtracting one from the other:

0=20 = 2

That's false, so no ordered triple satisfies all three equations. The system has no solution.

If equation (3) had been 3x+y=73x + y = 7 instead, subtracting would give 0=00 = 0, and the system would have infinitely many solutions.

Application: a parabola through three points

Two points determine a line. Three points (not on one line, with different xx-values) determine a parabola y=ax2+bx+cy = ax^2 + bx + c. Each point gives one linear equation in aa, bb and cc.

Worked example: Finding a quadratic model

Find the parabola y=ax2+bx+cy = ax^2 + bx + c that passes through (1,0)(1, 0), (2,3)(2, 3) and (−1,6)(-1, 6).

Substitute each point:

(1,0):a+b+c=0(1)(2,3):4a+2b+c=3(2)(−1,6):a−b+c=6(3)\begin{aligned} (1, 0):&\quad a + b + c = 0 &\quad (1)\\ (2, 3):&\quad 4a + 2b + c = 3 &\quad (2)\\ (-1, 6):&\quad a - b + c = 6 &\quad (3) \end{aligned}

Subtract (3) from (1): 2b=−62b = -6, so b=−3b = -3.

Put b=−3b = -3 into (1) and (2): a+c=3a + c = 3 and 4a+c=94a + c = 9. Subtracting, 3a=63a = 6, so a=2a = 2 and c=1c = 1.

The parabola is y=2x2−3x+1y = 2x^2 - 3x + 1.

y = 2x^2 - 3x + 1(1, 0)(2, 3)(-1, 6)Open in grapher →

Check (−1,6)(-1, 6): 2(1)−3(−1)+1=2+3+1=62(1) - 3(-1) + 1 = 2 + 3 + 1 = 6.

Tip

Always check your triple in all three original equations, not just the one you used last. The final equation you used is guaranteed to work; an arithmetic slip earlier will only show up in the others.

Practice

Practice 1

Which ordered triple is a solution of the system below?

x+y+z=6x−y+z=22x+y−z=1\begin{aligned} x + y + z &= 6 \\ x - y + z &= 2 \\ 2x + y - z &= 1 \end{aligned}
Practice 2

Solve the system. Enter your answer as (x,y,z)(x, y, z).

x−y+z=10y+2z=5z=4\begin{aligned} x - y + z &= 10 \\ y + 2z &= 5 \\ z &= 4 \end{aligned}

Enter a point like (2, -3)

Practice 3

Solve the system. Enter your answer as (x,y,z)(x, y, z).

x+y+z=4x−y+2z=92x+y−z=0\begin{aligned} x + y + z &= 4 \\ x - y + 2z &= 9 \\ 2x + y - z &= 0 \end{aligned}

Enter a point like (2, -3)

Practice 4

Solve the system. Enter your answer as (x,y,z)(x, y, z).

x+y+z=13y=2xz=x−3\begin{aligned} x + y + z &= 13 \\ y &= 2x \\ z &= x - 3 \end{aligned}

Enter a point like (2, -3)

Practice 5

Solve the system. Enter your answer as (x,y,z)(x, y, z).

2x+3y−z=−13x−2y+2z=3x+y+3z=16\begin{aligned} 2x + 3y - z &= -1 \\ 3x - 2y + 2z &= 3 \\ x + y + 3z &= 16 \end{aligned}

Enter a point like (2, -3)

Practice 6

How many solutions does this system have?

x+y+z=5x−y+z=12x+2z=6\begin{aligned} x + y + z &= 5 \\ x - y + z &= 1 \\ 2x + 2z &= 6 \end{aligned}
Practice 7

A school play sold 200200 tickets for a total of $1,950. Adult tickets cost $12, student tickets cost $8, and child tickets cost $5. Twice as many student tickets as child tickets were sold. How many adult, student and child tickets were sold? Enter your answer as (adult, student, child).

Enter a point like (2, -3)

Practice 8

The parabola y=ax2+bx+cy = ax^2 + bx + c passes through (0,5)(0, 5), (1,2)(1, 2) and (3,2)(3, 2). Find aa, bb and cc. Enter your answer as (a,b,c)(a, b, c).

Enter a point like (2, -3)