Grade by Grade
C. Algebra · Linear and Non-Linear Relations

Finding the Equation of a Line and Using It to Solve Problems

C4.4 C3.2 A1About 75 minutes
Learning goals
  • I can write the equation of a line from its graph.
  • I can write the equation of a linear relation from a table of values, even when it does not start at x = 0.
  • I can write the equation of a line through two points.
  • I can build an equation from measurements of a concrete model and use it to solve problems.

Words to know

substitute
To replace a variable with a number. To find b, substitute a known point (x, y) and the slope into y = mx + b.
verify
To check that an answer is correct, for example by substituting a second point into your equation.
linear model
An equation of a line used to describe and make predictions about a real situation.

Detective work

So far you have started with an equation and drawn the line. Now you will go the other way: you have a graph, a table, two points or a physical model, and you need to find the equation. Once you have the equation, you can answer questions like "How many cups reach the shelf?" or "When will the candle burn out?" without drawing anything.

In every case you need two numbers: the slope m and the y-intercept b.

What do you know aboutthe line?The slope and they-intercept(from a graph or words)A table of valuesTwo pointsWrite y = mx + bdirectlym = change in y ÷change in x;b = y when x = 0m = (y₂ − y₁) ÷ (x₂ − x₁);substitute a pointto find bAlways check: substitute a second point into your equation.
Choosing a method. Every path ends with y = mx + b, and every path ends with a check.
Worked example

Example 1: From a graph

Write the equation of the line in the graph below.

  1. Read the y-intercept: the line crosses the y-axis at (0, −1), so b = −1.
  2. Find a second point where the line crosses grid lines exactly: (2, 3).
  3. Count from (0, −1) to (2, 3): run 2, rise 4, so m = 4 ÷ 2 = 2.
  4. Equation: y = 2x − 1. Check (2, 3): 2(2) − 1 = 3 ✓.

y = 2x − 1

−224−2240xy(0, −1)(2, 3)run 2rise 4
Pick points where the line passes exactly through grid corners. Here the slope triangle from (0, −1) to (2, 3) has run 2 and rise 4, so m = 2.
Worked example

Example 2: From a table that does not start at 0

Find the equation.

x: 2, 4, 6, 8

y: 11, 17, 23, 29

  1. The x-values go up by 2 and the y-values go up by 6. So m = 6 ÷ 2 = 3. (Careful: the slope is not 6.)
  2. The table has no x = 0, so substitute a point to find b. Use (2, 11): 11 = 3(2) + b, so 11 = 6 + b and b = 5.
  3. Check with (8, 29): 3(8) + 5 = 29 ✓.

y = 3x + 5

Worked example

Example 3: From two points

Find the equation of the line through (−2, 9) and (4, −3).

  1. Slope: m = (−3 − 9) ÷ (4 − (−2)) = −12 ÷ 6 = −2.
  2. So y = −2x + b. Substitute (−2, 9): 9 = −2(−2) + b, so 9 = 4 + b and b = 5.
  3. Check with the other point (4, −3): −2(4) + 5 = −8 + 5 = −3 ✓.

y = −2x + 5

From a concrete model: stacking cups

When you stack identical cups, each new cup only adds the height of its rim, because the rest slides inside the cup below. Suppose you measure 2 cups at 13.5 cm and 5 cups at 18 cm.

12 cm1 cup13.5 cm2 cups15 cm3 cupsEach extra cup adds only its rim: 1.5 cm (not to scale)
Stacked cups (not to scale). The first cup is 12 cm tall, and each extra cup adds 1.5 cm, so the heights form a linear pattern: 12, 13.5, 15, ...
Worked example

Example 4: Model and solve

2 cups stack to 13.5 cm and 5 cups stack to 18 cm. (a) Find an equation for the height h of n cups. (b) What do m and b mean? (c) How many cups make a stack exactly 60 cm tall?

  1. (a) Points (2, 13.5) and (5, 18). m = (18 − 13.5) ÷ (5 − 2) = 4.5 ÷ 3 = 1.5. Substitute (2, 13.5): 13.5 = 1.5(2) + b, so b = 13.5 − 3 = 10.5. Equation: h = 1.5n + 10.5.
  2. (b) m = 1.5 cm per cup: the height of one rim. b = 10.5 cm: the part of the bottom cup below its rim (one cup is 1.5 + 10.5 = 12 cm).
  3. (c) Solve 1.5n + 10.5 = 60. Subtract 10.5: 1.5n = 49.5. Divide by 1.5: n = 33.

h = 1.5n + 10.5; a stack of 33 cups is 60 cm tall.

Worked example

Example 5: Solve a problem with a linear model

A candle burns at a steady rate. After 2 hours it is 20 cm tall; after 5 hours it is 14 cm tall. How tall was it at the start, and when will it burn out?

  1. m = (14 − 20) ÷ (5 − 2) = −6 ÷ 3 = −2 cm per hour.
  2. Substitute (2, 20): 20 = −2(2) + b, so b = 24. The equation is h = −2t + 24. The candle started at 24 cm.
  3. Burns out when h = 0: 0 = −2t + 24, so 2t = 24 and t = 12 hours.

It started at 24 cm and burns out after 12 hours.

Just for fun

Two points are all it takes to pin down a straight line. Finding the matching sock in a laundry basket usually takes a lot more than two tries.

Hands-on activity

Cup tower challenge

You need: 5 to 10 identical plastic or paper cups, a ruler or tape measure, paper, a pencil.

  1. Measure the height of a stack of 1, 2, 3, 4 and 5 cups. Record a table.
  2. Find the slope (the rim height) and the y-intercept. Write an equation h = mn + b.
  3. Use your equation to predict the height of 8 cups. If you have 8 cups, test it.
  4. Measure the height of a table or kitchen counter. Use your equation to find how many cups you would need to reach it.

What to look for: your heights should go up by about the same amount each time (a small wobble is measurement error). If your prediction for 8 cups is off by more than a few millimetres, re-measure or recalculate the slope using the first and last points.

Your turn

1

A line crosses the y-axis at 4 and goes down 3 units for every 1 unit to the right. Write its equation.

2

Find the equation.

x: 0, 1, 2, 3

y: −5, −1, 3, 7

3

Find the equation.

x: 1, 2, 3, 4

y: 8, 11, 14, 17

4

Find the equation of the line through (1, 4) and (3, 10).

5

Find the equation of the line through (−1, 6) and (2, −3).

6

Use h = 1.5n + 10.5 (cups). How tall is a stack of 10 cups?

7

A line passes through (0, 2) and (4, 4). Write its equation.

More practice: warm-up

1

Slope 5, passes through (0, 1). Equation?

2

A table has y = 7 when x = 0 and first differences of 2. Equation?

3

Horizontal line through (3, −2). Equation?

4

Line through the origin and (2, 8). Equation?

5

Slope 1/3, y-intercept −6. Equation?

More practice: on your own

1

Find the equation of the line through (2, 7) and (6, 19).

2

Find the equation of the line through (−4, 1) and (4, −5).

3

Find the equation.

x: 0, 5, 10, 15

y: 30, 42, 54, 66

4

A plumber charges $135 for a 1-hour job and $255 for a 3-hour job (a fixed call-out fee plus an hourly rate). Find the equation and the cost of a 5-hour job.

5

An elastic band with 2 washers hanging from it is 14 cm long. With 6 washers it is 20 cm long. Find an equation and explain the y-intercept.

Challenge

1

Find the equation of the line through (3, 5) that is parallel to the line through (0, 1) and (2, 7).

2

A 4 km taxi ride costs $13.20 and a 10 km ride costs $27.60. Find the equation. How far can you ride for $50?

3

An elevator in a tall building moves down at a steady speed. After 4 s it is 52 m above the ground; after 10 s it is 28 m above the ground. Where did it start, and when does it reach ground level?

Check your understanding

Quiz

1.

A line has slope 3 and passes through (0, −2). Its equation is:

2.

x: 1, 2, 3, 4 and y: 6, 10, 14, 18. Which equation matches?

3.

What is the equation of the line through (2, 5) and (4, 9)?

4.

x: 0, 2, 4, 6 and y: 1, 7, 13, 19. What is the slope?

5.

Cups: h = 1.5n + 10.5. What does 1.5 represent?

6.

A candle follows h = −2t + 24. When does it burn out?

For parents and teachers

Big idea: Expectation C4.4 asks students to determine equations of lines from graphs, tables of values and concrete representations, connecting rate of change to slope and initial value to y-intercept, and to use the equations to solve problems.

Common difficulties:

  • Using the y-difference as the slope when x goes up by more than 1 (Example 2).
  • Forgetting to find b when the table or points do not include x = 0. Substitute a point.
  • Sign errors with negative coordinates. Encourage brackets: −2(−2) = +4.
  • Skipping the check. Substituting the second point catches most errors.

How to help: The cup activity works with any identical cups. Ask your child to explain what the slope and y-intercept mean for the cups; a correct explanation shows real understanding.