Math Core

Lesson 5.1 · Linear Functions

Slope and rate of change

Some quantities change at a steady pace: a phone plan adds the same charge every month, a hiker climbs the same number of feet every hour. When a quantity changes at a constant rate, its graph is a straight line, and the number that measures that rate is the line's slope. Slope is the single most important idea in this unit.

Rate of change

Suppose a pool is being filled with a hose. You record the water level every 22 minutes.

time (min), xx00224466
depth (in.), yy1010131316161919

Every time xx goes up by 22, yy goes up by 33. So the depth rises 32=1.5\dfrac{3}{2} = 1.5 inches per minute. That number is the rate of change:

rate of change=change in ychange in x.\text{rate of change} = \frac{\text{change in } y}{\text{change in } x}.

Because the rate is the same between every pair of rows, this relationship is linear. In the last unit you saw the same pattern in arithmetic sequences: a constant difference. Slope is that constant difference, measured per one unit of xx.

Slope on a graph

On a graph, the change in yy is how far you move up or down, called the rise. The change in xx is how far you move left or right, called the run. Pick any two points on a line, draw the little right triangle between them, and divide.

From (1, 1) to (3, 5) the line rises 4 while it runs 2, so its slope is 4 ÷ 2 = 2.Open in grapher →

Going from (1,1)(1, 1) to (3,5)(3, 5), the line rises 44 and runs 22, so the slope is 42=2\dfrac{4}{2} = 2. Pick two different points on the same line and you'll get a bigger or smaller triangle, but the ratio is still 22. That's what makes a line a line: its slope is the same everywhere.

Definition

Slope

The slope mm of the line through (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is

m=riserun=y2−y1x2−x1,x1≠x2.m = \frac{\text{rise}}{\text{run}} = \frac{y_2 - y_1}{x_2 - x_1}, \qquad x_1 \ne x_2.

The letter mm is the traditional name for slope. The little numbers are subscripts: x1x_1 just means "the xx-coordinate of the first point." They are labels, not exponents.

Worked example: Slope from two points

Find the slope of the line through (−2,5)(-2, 5) and (4,−1)(4, -1).

Call (−2,5)(-2, 5) the first point and (4,−1)(4, -1) the second.

m=−1−54−(−2)=−66=−1.m = \frac{-1 - 5}{4 - (-2)} = \frac{-6}{6} = -1.

The slope is −1-1: every step of 11 to the right takes the line 11 unit down.

Common mistake

Stay consistent. Whichever point's yy you write first on top, its xx must come first on the bottom. Mixing them, as in −1−5−2−4\dfrac{-1 - 5}{-2 - 4}, flips the sign and gives +1+1, which is wrong. Also watch double negatives: 4−(−2)=64 - (-2) = 6, not 22.

It doesn't matter which point you call "first," as long as you're consistent. Using (4,−1)(4, -1) first gives 5−(−1)−2−4=6−6=−1\dfrac{5 - (-1)}{-2 - 4} = \dfrac{6}{-6} = -1, the same answer.

Four kinds of slope

Read a graph from left to right, the way you read a sentence.

  • Positive slope: the line goes up. As xx increases, yy increases.
  • Negative slope: the line goes down. As xx increases, yy decreases.
  • Zero slope: the line is horizontal. The rise is 00, so m=0run=0m = \dfrac{0}{\text{run}} = 0.
  • Undefined slope: the line is vertical. The run is 00, and you can't divide by zero.
Positive slope (y = 2x + 1), negative slope (y = −x/2 + 3), zero slope (y = −2) and undefined slope (x = 4).Open in grapher →

The bigger the absolute value of the slope, the steeper the line. A slope of −5-5 is steeper than a slope of 22, because ∣−5∣=5>2|-5| = 5 > 2.

Worked example: Horizontal and vertical lines

Find the slope of the line through each pair of points.

  1. (−3,4)(-3, 4) and (5,4)(5, 4)
  2. (2,−1)(2, -1) and (2,6)(2, 6)

Solutions.

  1. m=4−45−(−3)=08=0m = \dfrac{4 - 4}{5 - (-3)} = \dfrac{0}{8} = 0. The yy-values match, so the line is horizontal.
  2. m=6−(−1)2−2=70m = \dfrac{6 - (-1)}{2 - 2} = \dfrac{7}{0}, which is undefined. The xx-values match, so the line is vertical.

Tip

"Zero slope" and "no slope" sound alike but are different. A horizontal line has a slope, and it equals 00. A vertical line's slope is undefined. Saying "undefined" avoids confusion.

Slope as a rate in context

In a real situation, slope has units: the units of yy per unit of xx. Always say what the slope means.

Worked example: Interpreting slope

At 9:00 a.m. a car's tank holds 1414 gallons. At 1:00 p.m., after steady highway driving, it holds 66 gallons. Find the rate of change and explain what it means.

Let xx be hours after 9:00 and yy be gallons. The points are (0,14)(0, 14) and (4,6)(4, 6).

m=6−144−0=−84=−2.m = \frac{6 - 14}{4 - 0} = \frac{-8}{4} = -2.

The rate of change is −2-2 gallons per hour: the car uses 22 gallons of fuel every hour. The negative sign says the amount of fuel is decreasing.

Practice

Practice 1

Find the slope of the line through (1,2)(1, 2) and (3,8)(3, 8).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Find the slope of the line through (−3,4)(-3, 4) and (5,−2)(5, -2).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

What is the slope of the line through (2,5)(2, 5) and (2,−1)(2, -1)?

Practice 4

Find the slope of the line shown.

y = 2x/3 - 1(0, -1)(3, 1)Open in grapher →

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

The table shows a linear relationship. What is its rate of change?

xx00224466
yy5050444438383232

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Which line is the steepest?

Practice 7

A line passes through (1,3)(1, 3) and (4,k)(4, k) and has slope 22. Find kk.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

A water tank holds 1313 gallons after 22 hours of steady draining and 7.67.6 gallons after 55 hours. What is the rate of change, in gallons per hour?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.