Slope

Learning goals

  • Measure slope as rise over run
  • Compute m=y2−y1x2−x1m = \dfrac{y_2 - y_1}{x_2 - x_1} in a consistent order
  • Explain why every pair of points on a nonvertical line agrees
  • Classify a slope as positive, negative, zero, or undefined, and say why a vertical line has none
  • Read a slope from a graph, and use it to find another point on the line

Rise over run

To measure how a line tilts, follow it from one point to another. Then split the trip into two moves: how far across, and how far up or down.

The run is the horizontal change, how far you move left or right. The rise is the vertical change, how far you move up or down over that same trip. The tilt of the line is captured by comparing the two. A big rise for a small run is steep; a small rise for a big run is gentle. We compare them as a ratio, rise divided by run, and give that ratio a name.

The slope of a line is its rise divided by its run, measured between any two different points on it (except a straight up-and-down line, which we will come back to):

slope=riserun=change in ychange in x.\text{slope} = \frac{\text{rise}}{\text{run}} = \frac{\text{change in } y}{\text{change in } x}.

The slope is written with the letter mm. The word “rise” stays honest even when a line goes downhill: a downhill move counts as a negative rise, so the slope simply comes out negative. The picture below shows the run and the rise as the two legs of a right triangle drawn under a line.

A slope triangle: rise 2 over run 3A line rising to the right, with a right triangle marking a run of 3 units across and a rise of 2 units up between two of its points.xy110(-2, -1)(1, 1)run = 3rise = 2m = 2/3
A slope triangle under a line. Going from the lower point to the upper one, you run 3 units across and rise 2 units up, so the slope is the ratio rise over run, which is 2/3. This line rises 2 units for every 3 it runs.

For the line drawn above, going from the lower point to the upper one you move 33 to the right and 22 up, so its slope is 23\tfrac{2}{3}. This is the same equal step from the last lesson, now measured. There the height changed by a fixed amount each time xx rose by 11. The slope is that fixed step, the amount yy rises for a run of exactly one unit. A line that is not vertical has just one slope, and once you know it you know the tilt exactly. A vertical line is the one exception, and you will see why later in this lesson.

The slope formula

Reading rise and run off a picture is fine when a graph is in front of you. But usually you are handed two points as numbers and want the slope without drawing anything. The rise and run are just differences of coordinates, so the slope becomes a short formula.

Take two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) on the line. Moving from the first to the second, the vertical change (the rise) is y2−y1y_2 - y_1, and the horizontal change (the run) is x2−x1x_2 - x_1. Dividing gives the slope:

m=y2−y1x2−x1.m = \frac{y_2 - y_1}{x_2 - x_1}.

The subscripts are just labels that keep the two points apart: (x1,y1)(x_1, y_1) is “point one” and (x2,y2)(x_2, y_2) is “point two.” The one rule to respect is order. Subtract the coordinates in the same order on the top and the bottom. If y2−y1y_2 - y_1 sits on top, then x2−x1x_2 - x_1 must sit on the bottom, never x1−x2x_1 - x_2.

Worked example 1 Find the slope through (2,3)(2, 3) and (6,11)(6, 11)

Label the points (x1,y1)=(2,3)(x_1, y_1) = (2, 3) and (x2,y2)=(6,11)(x_2, y_2) = (6, 11), then substitute into the formula, keeping the same order on top and bottom.

m=y2−y1x2−x1=11−36−2=84=2.m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{11 - 3}{6 - 2} = \frac{8}{4} = 2.

The slope is 22. The line rises 22 units for every 11 unit it runs, so it climbs fairly steeply from left to right.

Worked example 2 Find the slope through (−1,5)(-1, 5) and (2,−1)(2, -1)

Take (x1,y1)=(−1,5)(x_1, y_1) = (-1, 5) and (x2,y2)=(2,−1)(x_2, y_2) = (2, -1). Substitute carefully, watching the signs of the negative coordinates.

m=−1−52−(−1)=−63=−2.m = \frac{-1 - 5}{2 - (-1)} = \frac{-6}{3} = -2.

The slope is −2-2. It is negative, so the line falls as you move to the right. To see that the order does not matter, swap the labels and put (2,−1)(2, -1) first:

m=5−(−1)−1−2=6−3=−2,m = \frac{5 - (-1)}{-1 - 2} = \frac{6}{-3} = -2,

the same answer.

It never matters which point you call first. If you swap them, both the top and the bottom change sign, and a fraction with both signs flipped keeps its value, since −a−b=ab\frac{-a}{-b} = \frac{a}{b}. So pick either point as “point one” and simply stay consistent all the way through.

Check your understanding

What is the slope of the line through (1,2)(1, 2) and (4,8)(4, 8)?

Answer choices

Why every pair of points gives the same slope

The formula uses two points, but a line has infinitely many. If you and a friend each pick a different pair of points on the same line, do you get the same slope? You must, or “the slope of the line” would be a meaningless phrase. Here is why the answer is always yes, for any line that is not vertical.

Why the slope does not depend on which two points you choose#

A horizontal line settles the question immediately: every point on it has the same height, so the rise between any two of its points is always 00, and the slope is always 00.

For every other nonvertical line, picture two different pairs of points, each pair forming a right triangle whose horizontal leg is the run and whose vertical leg is the rise. Picking a different pair of points draws a larger or smaller triangle, but every point sits on the same straight line, so all of these triangles are the same shape, scaled copies of one another. A larger triangle has a proportionally larger rise and run, so the ratio of rise to run does not change. The figure below shows exactly this: two triangles on one line, one twice the size of the other, both reporting the same slope.

Here is the same reason in symbols. The line is straight because it has a constant rate: the rise is always the same fixed multiple of the run. Doubling the run doubles the rise, and in general, for one fixed number kk that belongs to this particular line,

rise=k×run.\text{rise} = k \times \text{run}.

That single number kk is the rise you get from a run of 11, and the straightness of the line is the promise that kk never changes as you move along it.

Feed two different points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) into the slope formula. As long as the line is not vertical, two different points on it always have different xx-coordinates, so x2−x1x_2 - x_1 is never 00 and the division below is safe. Their run is x2−x1x_2 - x_1 and their rise is y2−y1y_2 - y_1, and by the fact above,

y2−y1=k(x2−x1).y_2 - y_1 = k(x_2 - x_1).

So the slope the formula reports is

m=y2−y1x2−x1=k(x2−x1)x2−x1=k.m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{k(x_2 - x_1)}{x_2 - x_1} = k.

The two points canceled out completely. Whatever pair you chose, the formula reports the same number kk, so every nonvertical line really does have just one slope, and the formula finds it every time.

Two similar slope triangles giving the same slopeOne straight line with a small slope triangle (run 2, rise 1) and a larger slope triangle (run 4, rise 2), both giving a slope of one half.xy310run = 2rise = 1run = 4rise = 2m = 1/2
Two slope triangles on one line. The small triangle gives a rise of 1 over a run of 2, and the large triangle gives a rise of 2 over a run of 4. These are the same ratio, since 1/2 = 2/4, so both triangles report the same slope of 1/2.

The proof says the two triangles must give the same slope, and the picture above shows one case of it. In the figure below, all four points ride along one fixed line, so you can test any two pairs you like. Drag any of the four points along the line, even BB to the left of AA, and watch every triangle you make give a slope of 23\tfrac{2}{3}.

Every pair of points on this line gives the same slope

From A to B: rise 2, run 3, slope 2/3. From C to D: rise 4, run 6, slope 4/6 = 2/3. Both pairs give 2/3: every rise-and-run triangle on one line is the same shape, a scaled copy of any other.A coordinate plane with one fixed straight line through the origin and four marked points on it, A, B, C and D. Whenever the two points of a pair (A and B, or C and D) differ, a right triangle is drawn on them with the run along one leg and the rise along the other, both labeled. Each of the four points can be dragged along the line.-8-6-4-22468-6-4-2246run = 3rise = 2run = 6rise = 4ABCD

From A to B: rise 2, run 3, slope 2/3. From C to D: rise 4, run 6, slope 4/6 = 2/3. Both pairs give 2/3: every rise-and-run triangle on one line is the same shape, a scaled copy of any other.

One fixed line with four points on it, A, B, C and D. Whenever the two points of a pair (A and B, or C and D) differ, a right triangle drawn on them shows the run along one leg and the rise along the other. Every such triangle on one line is the same shape, so every pair gives the same slope.

That figure holds the line still and moves the points. The next one works the other way round: the rise and the run are separate controls, you set each one, and the line and its staircase are redrawn to match.

Start at a rise of 22 over a run of 33 and read the line. Now set the rise to 44 and the run to 66. The staircase doubles in size, but the line does not move at all: 4/64/6 reduces to 2/32/3, the same slope. Same line, same slope, a bigger triangle, exactly what the reasoning above predicts.

Then take the rise down through 11, 00 and −1-1 with the run held at 33. At a rise of 00 the line is flat and the staircase’s upright leg vanishes. That is what a slope of 00 looks like: run as far as you like and the height never changes. Below that the line falls to the right, and the readout swaps “up” for “down” without the arithmetic changing at all.

Line explorer

y = (2/3)x + 1. Rise 2 over run 3 is a slope of 2/3, so from any point on the line, 3 to the right and 2 up lands back on it. And it crosses the vertical axis at 1. A coordinate plane with a straight line drawn across it, and a staircase from the line's crossing point showing its run across and its rise up or down. Use the controls below the figure to change the rise, the run, where the line crosses the vertical axis. -8 -6 -4 -2 2 4 6 8 -8 -6 -4 -2 2 4 6 8
Rise Run Crosses at

y = (2/3)x + 1. Rise 2 over run 3 is a slope of 2/3, so from any point on the line, 3 to the right and 2 up lands back on it. And it crosses the vertical axis at 1.

A line on a coordinate plane, with a staircase from its crossing point showing the run across and the rise up or down. The rise and the run are set separately, so pairs of them that reduce to the same fraction can be compared against the line they produce.

Check your understanding

Two points on a line give a slope triangle with rise 55 and run 33. Which rise-and-run pair could come from a different pair of points on that same line?

Answer choices

Positive, negative, zero, and undefined slope

The sign of the slope tells you the line’s direction, and two special cases push the formula to its edges.

A positive slope means the rise and run have the same sign: as you move to the right, with xx increasing, yy increases too. So the line climbs from lower left to upper right. A negative slope means the rise and run have opposite signs: moving right, yy decreases, so the line falls from upper left to lower right. The larger the slope in size, the steeper the climb or fall. A slope of 33 rises three units per step across, much steeper than a slope of 14\tfrac{1}{4}.

A zero slope is the flat case. A horizontal line never changes height, so between any two of its points the rise is 00 while the run is some nonzero number, and

m=0run=0.m = \frac{0}{\text{run}} = 0.

This matches the horizontal lines y=cy = c from the last lesson: their height is locked, so they rise by nothing, and their slope is 00.

An undefined slope is the vertical case, and it is the one place the formula refuses to answer. A vertical line never changes its xx-coordinate, so between any two of its points the run is 00:

m=rise0.m = \frac{\text{rise}}{0}.

Dividing by zero has no meaning, since no number multiplied by 00 can give a nonzero rise. So a vertical line has no slope value at all, and we say its slope is undefined. It is tempting to call it “infinite,” but infinity is not a number and the division simply has no result. Notice the sharp contrast with a horizontal line: a horizontal line has slope exactly 00, a perfectly good number, while a vertical line has no slope at all. Flat and upright are opposites here, not near-misses.

Positive, negative, zero, and undefined slopeFour mini coordinate frames: a rising line labeled positive, a falling line labeled negative, a horizontal line labeled zero, and a vertical line labeled undefined.Positivem > 0Negativem < 0Zerom = 0Undefinedvertical
The four kinds of slope. A line climbing to the right has positive slope; a line falling to the right has negative slope; a flat line has slope 0; and an upright line has undefined slope, because its run is 0 and you cannot divide by zero.

Worked example 3 Slopes of a horizontal and a vertical line

First find the slope through (−2,4)(-2, 4) and (3,4)(3, 4). Both points have the same height, y=4y = 4, so the rise is zero:

m=4−43−(−2)=05=0.m = \frac{4 - 4}{3 - (-2)} = \frac{0}{5} = 0.

The slope is 00: these points sit on the horizontal line y=4y = 4.

Now find the slope through (5,−1)(5, -1) and (5,7)(5, 7). Both points have the same xx-coordinate, x=5x = 5, so the run is zero:

m=7−(−1)5−5=80.m = \frac{7 - (-1)}{5 - 5} = \frac{8}{0}.

Division by zero has no value, so this slope is undefined. These points sit on the vertical line x=5x = 5.

Check your understanding

Which pair of points lies on a line with an undefined slope?

Answer choices

Reading slope from a graph

When a line is already drawn for you, you can read its slope straight off the grid without any coordinates, by building a slope triangle. Pick two points where the line crosses grid corners, then count.

Count the run first: how many units you move right to get from the left point across to under the right point. Then count the rise: how many units up or down you move to reach the line, counting down as negative. The slope is the rise you counted over the run you counted. Reading from left to right keeps the run positive, so the sign comes entirely from the rise. Count upward and the slope is positive; count downward and it is negative.

Reading a negative slope from a graphA falling line through (0, 1) and (2, 0), with a slope triangle showing a run of 2 to the right and a drop of 1, giving slope negative one half.xy10(0, 1)(2, 0)run = 2rise = -1m = -1/2
Reading a slope off the grid. From the left point (0, 1), run 2 units to the right, then drop 1 unit down to land back on the line, a rise of -1. The slope is -1/2, negative because the line falls to the right.

Worked example 4 Read the slope of the graphed line

The diagram above already counted a run of 22 and a rise of −1-1 from (0,1)(0, 1) to (2,0)(2, 0), giving a slope of −12-\tfrac{1}{2}. As a check, plug the same two points into the slope formula instead of counting:

m=0−12−0=−12.m = \frac{0 - 1}{2 - 0} = \frac{-1}{2}.

The two methods agree, so counting a slope triangle and using the formula are really the same calculation seen two different ways.

A new line to read the slope fromA line falling gently to the right, crossing grid corners at negative 2, 1 and 2, 0.xy10(-2, 1)(2, 0)
A line through two grid corners. Count the run from the left point across to under the right point, then count the rise up or down back to the line. The ratio of rise to run gives this line's slope.

Check your understanding

In the graph above, start at the left point and count the run, then the rise, over to the right point. What is the slope of this line?

Answer choices

Stepping along a line from its slope

Slope also runs in reverse. If you know a line’s slope and one point on it, you can walk to as many other points as you like, with no equation at all. Read the slope as rise over run, then step. From the known point, move right by the run and up or down by the rise, and you land on another point of the line.

For a slope of 34\tfrac{3}{4} starting at (1,2)(1, 2), step 44 to the right and 33 up to reach (5,5)(5, 5), which is also on the line. You can step the other way too: 44 left and 33 down reaches (−3,−1)(-3, -1). A whole number slope like 22 is really 21\tfrac{2}{1}, a run of 11 and a rise of 22. So from (0,1)(0, 1) you step to (1,3)(1, 3), then (2,5)(2, 5), and onward.

Worked example 5 Step to another point using the slope

A line has slope −23-\tfrac{2}{3} and passes through (3,4)(3, 4). Read the slope as a run of 33 and a rise of −2-2 (down 22). Stepping right from (3,4)(3, 4):

(3,4)  ⟶  (3+3,  4−2)=(6,2).(3, 4) \;\longrightarrow\; (3 + 3,\; 4 - 2) = (6, 2).

So (6,2)(6, 2) is on the line. Stepping the opposite way, left 33 and up 22:

(3,4)  ⟶  (3−3,  4+2)=(0,6).(3, 4) \;\longrightarrow\; (3 - 3,\; 4 + 2) = (0, 6).

So (0,6)(0, 6) is on the line as well. This stays entirely inside this lesson: you are locating points on the line from its slope, not writing down the line’s equation, which is the next lesson’s task.

Check your understanding

A line has slope 33 and passes through (2,1)(2, 1). Which of these points is also on the line?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

Nearly every English-language algebra book writes mm for slope, but nobody is fully sure why.

The popular explanation is that mm stands for monter, a French verb meaning to climb. It is a tidy story, and it appears to be false: French mathematicians of the period, including Descartes, did not use mm this way, and nobody has found a text that makes the connection. The earliest known use of mm for slope is not English at all. It shows up in 1757, in a work by the Italian mathematician Vincenzo Riccati. English textbooks picked it up much later, in the 1840s, and it slowly became the standard choice, but no one has found a reason the letter itself was chosen. The best available guess is a plain one: mm was simply free to use, and once a few popular textbooks adopted it, later authors followed along.

The idea underneath the letter is much older and much better traveled. Builders and surveyors were measuring steepness as a ratio of climb to distance long before anyone drew a coordinate grid, a practice that survives today on road signs warning of a one in ten hill. Push the same ratio between two points that slide closer and closer together, and it grows into calculus, which uses that limit to measure the steepness of a curve at a single point.

So the slope triangle you counted off the grid in this lesson is a small piece of a very long road. The symbol is an accident. The ratio is not.