Writing Equations in y = mx + b Form
Many lines can be written as y = mx + b. The m is the slope. The b is where the line crosses the y-axis.
What you'll be able to do
- Read the slope and the y-intercept from y = mx + b.
- Write the equation from a story, a point and a slope, or two points.
- Graph a line from its equation.
- Say what m and b mean in a story.
The big idea
The form. In y = mx + b, the number m is the slope. The number b is the y-intercept. That is where the line crosses the y-axis, at (0, b).
A story. A plumber charges $65 to visit, plus $40 an hour. The start is $65, so b = 65. The rate is $40 an hour, so m = 40. The equation is y = 40x + 65.
From two points. First find the slope. Then put one point into y = mx + b and find b.
An example. Take (1, 5) and (4, 14). The slope is 9 ÷ 3 = 3. Then 5 = 3(1) + b, so b = 2. The line is y = 3x + 2.
Watch b. The y-intercept is the value of y when x is 0. A table that starts at x = 1 does not show b. Work back one step to find it.
Graphing. Plot (0, b) first. Then use the slope. For m = −2/3, go right 3 and down 2. Plot that point. Then draw the line.
Other forms. 3x + 2y = 8 is a line too. Get y alone to see m and b: y = −(3/2)x + 4.
Words you need
- Slope
- How steep a line is: the rise divided by the run. In y = mx + b it is m.
- Y-intercept
- Where a line crosses the y-axis. It is the point (0, b).
- X-intercept
- Where a line crosses the x-axis. There, y = 0.
- Slope-intercept form
- A line written as y = mx + b.
- Rate
- How much y changes for each 1 that x goes up.
Reading y = mx + b
| Equation | Slope m | Y-intercept b |
|---|---|---|
| y = 3x + 2 | 3 | 2 |
| y = 3x − 5 | 3 | −5 |
| y = 7 − 2x | −2 | 7 |
| y = 4x | 4 | 0 |
Worked examples
Example 1
A dog walker charges $12 plus $9 an hour. Write an equation for the cost y after x hours.
- The start is $12, so b = 12.
- The rate is $9 an hour, so m = 9.
- The equation is y = 9x + 12.
Answer: y = 9x + 12
Example 2
Write the equation of the line through (1, 5) and (4, 14).
- Slope: (14 − 5) ÷ (4 − 1) = 9 ÷ 3 = 3.
- Put (1, 5) into y = 3x + b: 5 = 3 + b.
- So b = 2. The line is y = 3x + 2.
Answer: y = 3x + 2
Example 3
Graph y = −(2/3)x + 4.
- Plot the y-intercept, (0, 4).
- The slope is −2/3. Go right 3, then down 2. That lands on (3, 2).
- Do it again to reach (6, 0).
- Draw the line through the points.
Answer: (0, 4), (3, 2), (6, 0)
Common mistakes
Reading the sign of b wrong. y = 3x − 5 crosses the y-axis at (0, −5), not (0, 5).
Using the first point's y as b. b is the value of y when x = 0. If the first point is (2, 18), work back to x = 0.
Reading the first number as the slope. In y = 7 − 2x, the slope is −2. It is the number with x.
Losing a sign when getting y alone. 3x + 2y = 8 gives 2y = −3x + 8, so y = −(3/2)x + 4.
Practice: 23 questions
12 of 23 are word problems. For a word problem, sketch it first and mark what you know.
Tier 1 Foundations Use the rule directly
- In y = 7 − 2x, what is the slope? What is the y-intercept?
- A plumber charges a $65 visit fee plus $40 an hour. Write an equation for the cost y after x hours. Word problem
- Ali says y = 3x − 5 crosses the y-axis at (0, 5). Find his mistake.
- A line crosses the y-axis at (0, −3). It goes through (4, −1). Write its equation.
- A gift card starts with $50. Each coffee costs $3.75. Write an equation for the money y left after x coffees. Word problem
- To graph y = 2x − 3, which point do you plot first? Which two whole-number points come next, to the right?
Tier 2 Intermediate One more step to think through
- A line has slope −2. It goes through (3, 1). Write its equation.
- A taxi ride costs $11 for 2 miles. It costs $18.50 for 5 miles. Write an equation for the cost y of x miles. Word problem
- Write 3x + 2y = 8 in y = mx + b form. To graph it, which point do you plot first? Which whole-number point comes next, to the right?
- A candle is 18 cm tall after 2 hours. It is 12 cm tall after 5 hours. Rosa writes y = −2x + 18. Find her mistake. Word problem
- A plant is 7 cm tall at week 1, 11 cm at week 3 and 13 cm at week 4. Write an equation for its height y at week x. How tall was it at week 0? Word problem
Tier 3 Advanced Several steps - find the hidden structure
- Write the equation of the line through (−6, 1) and (3, 7).
- A line goes through (2, 2) and (6, 0). Is (12, −5) on the line?
- A tank drains at a steady rate. It has 210 liters left after 5 minutes and 168 liters after 12 minutes. Write an equation for the liters y after x minutes. When is it empty? Word problem
- A balloon's height is y = −12x + 900 meters after x minutes. Sam says it starts at 12 m and drops 900 m each minute. Find his mistake. Word problem
- After 2 hours of driving, a car has 41 liters of fuel. After 5 hours, it has 26.6 liters. Write an equation for the fuel y after x hours. Word problem
- A phone plan costs y = 15x + 20 dollars after x months. Your graph's y-axis goes up $10 a square. Which points do you plot for 0, 2 and 4 months? How many squares up is each? Word problem
Tier 4 Challenge Stretch problems, some above grade level
- Is y = 2(x − 3) + 5 the same line as the line through (4, 7) and (−1, −3)?
- Line L goes through (−2, 5). It has the same y-intercept as y = 4x − 1. Write the equation of L.
- Candle A is 24 cm tall and burns 3 cm each hour. Candle B is 16 cm tall. It burns at a steady rate, and both burn out at the same time. Write an equation for Candle B's height y after x hours. Word problem
- A spring stretches the same amount for each kilogram. With a 3 kg weight, it is 28 cm long. Adding 4 more kg makes it longer by exactly its no-weight length. Write an equation for its length y with x kg. Word problem
- Graph 4x − 3y = 12 without rewriting it. Which two points, one on each axis, do you plot?
- A tile pattern has 7 tiles in step 1, 11 in step 2 and 15 in step 3. Write an equation for the tiles y in step x. How many tiles are in step 50? Word problem Above grade level
Answers
Tier 1 Foundations
- Slope −2, y-intercept 7. The slope is the number with x, so m = −2. The y-intercept is 7, the value of y when x = 0.
- y = 40x + 65. The rate is the slope, m = 40. The starting value is the y-intercept, b = 65.
- It crosses the y-axis at (0, −5). Ali dropped the minus sign. The y-intercept is −5, so the line crosses at (0, −5). The rate is the slope, m = 3. The starting value is the y-intercept, b = −5.
- y = (1/2)x − 3. The slope is m = 1/2. Then b = y − mx = −3, the value of y when x = 0.
- y = −3.75x + 50. The rate is the slope, m = −3.75. The starting value is the y-intercept, b = 50.
- (0, −3), (1, −1), (2, 1). y = 2x − 3: start at the y-intercept (0, −3). The slope is 2, so go up 2 and right 1 each time: (1, −1), then (2, 1).
Tier 2 Intermediate
- y = −2x + 7. The slope is m = −2. Then b = y − mx = 7, the value of y when x = 0.
- y = (5/2)x + 6. The slope is m = 5/2. Then b = y − mx = 6, the value of y when x = 0.
- (0, 4), (2, 1). Subtract 3x from both sides: 2y = −3x + 8. Divide by 2: y = −(3/2)x + 4. Plot (0, 4). Then go right 2 and down 3 to (2, 1).
- y = −2x + 22. Rosa used 18 as b. But 18 cm is the height at hour 2, not hour 0. The candle was 22 cm tall at the start. The slope is m = −2. Then b = y − mx = 22, the value of y when x = 0.
- y = 2x + 5. It was 5 cm tall at week 0. It grows 2 cm a week, so m = 2. Work back from week 1 to week 0: 7 − 2 = 5. So b = 5, and it was 5 cm tall at week 0.
Tier 3 Advanced
- y = (2/3)x + 5. The slope is (7 − 1) ÷ (3 − (−6)) = 6/9 = 2/3. Put in (−6, 1): 1 = (2/3)(−6) + b = −4 + b. So b = 5.
- No, (12, −5) is not on the line. The line is y = −(1/2)x + 3. At x = 12, y = −6 + 3 = −3. That is not −5, so the point is not on the line.
- y = −6x + 240. It is empty after 40 minutes. The slope is (168 − 210) ÷ (12 − 5) = −6. Then 210 = −6(5) + b, so b = 240. It is empty when 0 = −6x + 240, so after 40 minutes.
- It starts at 900 m and drops 12 m each minute. Sam swapped m and b. The start is b = 900 m. The rate is m = −12, so it drops 12 m each minute. The rate is the slope, m = −12. The starting value is the y-intercept, b = 900.
- y = −4.8x + 50.6. The slope is m = −4.8. Then b = y − mx = 50.6, the value of y when x = 0.
- (0, 20), (2, 50), (4, 80). At 0, 2 and 4 months the cost is $20, $50 and $80. Each square is $10, so the points are 2, 5 and 8 squares up.
Tier 4 Challenge
- Yes, both are y = 2x − 1. Multiply out: y = 2x − 6 + 5 = 2x − 1. The line through the points has slope 10 ÷ 5 = 2 and b = 7 − 8 = −1. Both are y = 2x − 1, so yes.
- y = −3x − 1. The y-intercept of y = 4x − 1 is the point (0, −1). So L goes through (−2, 5) and (0, −1). Its slope is 6 ÷ (−2) = −3. So y = −3x − 1.
- y = −2x + 16. Find when Candle A reaches 0: 24 ÷ 3 = 8 hours. Candle B goes from 16 cm to 0 cm in 8 hours. Its slope is −16 ÷ 8 = −2, so y = −2x + 16.
- y = 4x + 16. Call the stretch per kg m and the no-weight length b. Then 3m + b = 28. Adding 4 kg adds 4m, and that equals b. So 7m = 28, m = 4 and b = 16. So 3m + 4m = 28, which gives m = 4 and b = 16.
- (3, 0) and (0, −4). On the x-axis, y = 0: 4x = 12, so x = 3. On the y-axis, x = 0: −3y = 12, so y = −4. Plot (3, 0) and (0, −4) and join them.
- y = 4x + 3. Step 50 has 203 tiles. Each step adds 4 tiles, so m = 4. Step 1 has 7, so step 0 would have 7 − 4 = 3. So y = 4x + 3. Step 50 has 4(50) + 3 = 203 tiles.
Stuck on this topic?
Trouble here often traces back to an earlier skill. Our free check-in finds the exact gap. A tutor then works on it with your child.
Find gaps free More practice