This site is a work in progress. New lessons are added regularly. Contact us

Slope

Learning goals

  • Measure slope as rise over run
  • Compute m=y2y1x2x1m = \dfrac{y_2 - y_1}{x_2 - x_1} in a consistent order
  • Explain why every pair of points on a line agrees
  • Classify a slope as positive, negative, zero or undefined
  • Read a slope off a graph with a slope triangle
  • Say why a vertical line has no slope, not an infinite one

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 points on the line:

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 has just one slope, and once you know it you know the tilt exactly.

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 y2y1y_2 - y_1, and the horizontal change (the run) is x2x1x_2 - x_1. Dividing gives the slope:

m=y2y1x2x1.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 y2y1y_2 - y_1 sits on top, then x2x1x_2 - x_1 must sit on the bottom, never x1x2x_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=y2y1x2x1=11362=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=152(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)12=63=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 ab=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.

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

The key fact from the last lesson is that the graph is straight because it has a constant rate. A constant rate means the rise is always the same fixed multiple of the run. Doubling the run doubles the rise, tripling the run triples it, 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. The straightness of the line is exactly the promise that kk never changes as you move along.

Now feed two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) into the slope formula. Their run is x2x1x_2 - x_1 and their rise is y2y1y_2 - y_1, and by the fact above the rise is kk times the run:

y2y1=k(x2x1).y_2 - y_1 = k(x_2 - x_1).

So the slope the formula reports is

m=y2y1x2x1=k(x2x1)x2x1=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 slope comes out as the same number kk, so the line really does have one slope, and the formula finds it every time.

There is a matching picture. Any two points on the line are the ends of 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. Bigger triangle, bigger rise and run in the same proportion, same slope.

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. The figure below lets you test the claim yourself, because 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, and the readout says why: 4/64/6 reduces to 2/32/3, the same slope. Then try the whole family at once by holding the rise equal to the run: 11 over 11, 22 over 22, on up to 66 over 66. The staircase grows six times over and the line never budges, because every one of those fractions is 11. Six different triangles, six different pairs of points, one line. That is the proof above, done with your hands.

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. The one slope you cannot reach here is the undefined one, and that is deliberate. It would need a run of 00, and the control stops at 11 for the same reason the formula does.

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.

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=443(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)55=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 line above crosses grid corners at (0,1)(0, 1) and (2,0)(2, 0). Start at the left point and count. The run is 22 units to the right, and to get back to the line you drop 11 unit, so the rise is 1-1. The slope is the rise over the run:

m=12=12.m = \frac{-1}{2} = -\tfrac{1}{2}.

The negative sign is no surprise, because the line falls as you move to the right. As a check, the slope formula on the same two points gives 0120=12\dfrac{0 - 1}{2 - 0} = \dfrac{-1}{2}, matching the count.

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,  42)=(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)    (33,  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.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions 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. Nobody can say 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 did not use mm for slope at all, and nobody has found a text that makes the connection. The letter simply turns up, unexplained, in English textbooks around the middle of the 1800s. By then it was already a settled convention, handed from one author to the next the way a habit spreads. The best available guess is a dull one: mm was a free letter, and it stuck.

The idea underneath the letter is much older and much better travelled. Builders and surveyors were measuring steepness as a ratio of climb to distance long before anyone drew a coordinate grid. The practice survives today on the road signs that warn of a one in ten hill. Push the same ratio the other way and it grows into calculus. Take two points on a curve and slide them closer and closer together. The rise over run between them turns into the steepness of that 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.