Skip to content
Understand Slope of a Line

Understand Slope of a Line

By the end of this section, you will be able to: use geoboards to model slope, find the slope of a line from its graph, find the slope of horizontal and vertical lines, use the slope formula to find the slope of a line between two points, and graph a line given a point and the slope.

As we’ve been graphing linear equations, we’ve seen that some lines slant up as they go from left to right and some lines slant down. Some lines are very steep and some lines are flatter. What determines whether a line slants up or down, and if its slant is steep or flat?

The steepness of the slant of a line is called the slope of the line. The concept of slope has many applications in the real world. The pitch of a roof and the grade of a highway or wheelchair ramp are just some examples in which you literally see slopes. And when you ride a bicycle, you feel the slope as you pump uphill or coast downhill.

Use geoboards to model slope

Using rubber bands on a geoboard gives a concrete way to model lines on a coordinate grid. By stretching a rubber band between two pegs, we can discover how to find the slope of a line.

We start by stretching a rubber band between two pegs to make a line, as shown below.

Does it look like a line? Now we stretch one part of the rubber band straight up from the left peg and around a third peg to make the sides of a right triangle. We carefully make a 90°90° angle around the third peg, so that one side is vertical and the other is horizontal.

To find the slope of the line, we measure the distance along the vertical and horizontal legs of the triangle. The vertical distance is called the rise and the horizontal distance is called the run, as shown below.

riserun

It may help to remember the rise like a hot air balloon that goes straight up, as if along the y-axisy\text{-axis}, and the run like a jogger who runs straight across, as if along the x-axisx\text{-axis}.

On our geoboard, the rise is 22 units because the rubber band goes up 22 spaces on the vertical leg. Be sure to count the spaces between the pegs rather than the pegs themselves! The rubber band goes across 33 spaces on the horizontal leg, so the run is 33 units.

32

The slope of a line is the ratio of the rise to the run. So the slope of our line is 23\tfrac{2}{3}. In mathematics, the slope is always represented by the letter mm.

Slope of a line. The slope of a line is m=riserunm = \tfrac{\text{rise}}{\text{run}}. The rise measures the vertical change and the run measures the horizontal change.
m=riserun=23m = \frac{\text{rise}}{\text{run}} = \frac{2}{3}

When we work with geoboards, it is a good idea to get in the habit of starting at a peg on the left and connecting to a peg to the right, then stretching the rubber band to form a right triangle. If we start by going up, the rise is positive, and if we stretch it down, the rise is negative. We count the run from left to right, so the run is always positive. Since the slope formula has rise over run, it may be easier to always count out the rise first and then the run.

Example. What is the slope of the line on the geoboard shown?

43

Use the definition of slope, m=riserunm = \tfrac{\text{rise}}{\text{run}}. Start at the left peg and make a right triangle by stretching the rubber band up and to the right to reach the second peg. The rise is 33 units and the run is 44 units.

m=3run=34m = \frac{3}{\text{run}} = \frac{3}{4}

The slope is 34\tfrac{3}{4}.

A geoboard triangle has a rise of 55 units and a run of 22 units, both counted left to right and going up. What is the slope of the line?

A geoboard triangle has a rise of 22 units and a run of 44 units, both counted left to right and going up. What is the slope of the line, written in simplest form?

What is the slope of a line that goes down instead of up? Start at the left peg and make a right triangle by stretching the rubber band to the peg on the right. This time we need to stretch the rubber band down to make the vertical leg, so the rise is negative.

The rise is 1-1 and the run is 33, so

m=riserun=13=13m = \frac{\text{rise}}{\text{run}} = \frac{-1}{3} = -\frac{1}{3}

The slope is 13-\tfrac{1}{3}.

Notice that the first line has positive slope and the second line has negative slope. As you read from left to right, a line with positive slope is going up, and a line with negative slope is going down.

Positive slopeNegative slope

A geoboard triangle has a rise of 2-2 units and a run of 55 units, counted left to right with the vertical leg stretched down. What is the slope of the line?

Example. Use a geoboard to model a line with slope 12\tfrac{1}{2}.

To model a line with a specific slope on a geoboard, we need to know the rise and the run.

m=riserun12=riserunm = \frac{\text{rise}}{\text{run}} \qquad\qquad \frac{1}{2} = \frac{\text{rise}}{\text{run}}

So the rise is 11 unit and the run is 22 units. Start at a peg in the lower left of the geoboard. Stretch the rubber band up 11 unit, and then right 22 units.

21

The hypotenuse of the right triangle formed by the rubber band represents a line with a slope of 12\tfrac{1}{2}.

Use the rise-over-run definition of slope: what run pairs with a rise of 11 to model a line with slope 13\tfrac{1}{3}?

Example. Use a geoboard to model a line with slope 14-\tfrac{1}{4}.

m=riserun14=riserunm = \frac{\text{rise}}{\text{run}} \qquad\qquad -\frac{1}{4} = \frac{\text{rise}}{\text{run}}

So the rise is 1-1 and the run is 44. Since the rise is negative, we choose a starting peg on the upper left that will give us room to count down. We stretch the rubber band down 11 unit, then to the right 44 units.

41

The hypotenuse of the right triangle formed by the rubber band represents a line whose slope is 14-\tfrac{1}{4}.

Use a geoboard model: what is the slope of a line with rise 2-2 and run 11?

Find the slope of a line from its graph

Now we’ll look at some graphs on a coordinate grid to find their slopes. The method is very similar to what we just modeled on our geoboards.

To find the slope, we must count out the rise and run. But where do we start? We locate any two points on the line, choosing points with coordinates that are integers to make our calculations easier. We then start with the point on the left and sketch a right triangle, so we can count the rise and run.

Example. Find the slope of the line through the points (0,3)(0, -3) and (5,1)(5, 1).

xy(0, −3)(5, 1)rise 4run 5

Starting with the point on the left, (0,3)(0, -3), sketch a right triangle, going from the first point to the second point, (5,1)(5, 1). The rise is 44 units and the run is 55 units.

m=riserun=45m = \frac{\text{rise}}{\text{run}} = \frac{4}{5}

The slope of the line is 45\tfrac{4}{5}. Notice that the slope is positive since the line slants upward from left to right.

xy(−8, −1)(0, 4)rise 5run 8

Find the slope of the line shown, which passes through (8,1)(-8, -1) and (0,4)(0, 4). Read the rise and run off the slope triangle.

Find the slope of the line through the points (0,1)(0, -1) and (2,3)(2, 3).

Find the slope from a graph.

  1. Locate two points on the line whose coordinates are integers.
  2. Starting with the point on the left, sketch a right triangle, with the hypotenuse going from the first point to the second point.
  3. Count the rise and the run on the legs of the triangle.
  4. Take the ratio of rise to run to find the slope, m=riserunm = \tfrac{\text{rise}}{\text{run}}.

Example. Find the slope of the line shown, which passes through (0,5)(0, 5) and (3,3)(3, 3).

xy(0, 5)(3, 3)rise −2run 3

Starting with the point on the left, (0,5)(0, 5), sketch a right triangle to (3,3)(3, 3). The rise is 2-2 and the run is 33.

m=riserun=23=23m = \frac{\text{rise}}{\text{run}} = \frac{-2}{3} = -\frac{2}{3}

The slope of the line is 23-\tfrac{2}{3}. Notice that the slope is negative since the line slants downward from left to right.

What if we had chosen different points on the same line, say (3,7)(-3, 7) and (6,1)(6, 1)? Sketching a right triangle from (3,7)(-3, 7) to (6,1)(6, 1) gives a rise of 6-6 and a run of 99:

m=riserun=69=23m = \frac{\text{rise}}{\text{run}} = \frac{-6}{9} = -\frac{2}{3}

It does not matter which points you use — the slope of the line is always the same. The slope of a line is constant!

xy(0, −1)(4, −3)rise −2run 4

Find the slope of the line shown, which passes through (0,1)(0, -1) and (4,3)(4, -3). Read the rise and run off the slope triangle, then simplify.

The lines in the previous examples had y-interceptsy\text{-intercepts} with integer values, so it was convenient to use the y-intercepty\text{-intercept} as one of the points we used to find the slope. In the next example, the y-intercepty\text{-intercept} is a fraction. The calculations are easier if we use two points with integer coordinates.

Example. Find the slope of the line through (2,3)(2, 3) and (7,6)(7, 6).

Starting at the point on the left, (2,3)(2, 3), sketch a right triangle to (7,6)(7, 6). The rise is 33 units and the run is 55 units.

m=riserun=35m = \frac{\text{rise}}{\text{run}} = \frac{3}{5}

The slope of the line is 35\tfrac{3}{5}.

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

Find the slope of horizontal and vertical lines

Do you remember what was special about horizontal and vertical lines? Their equations had just one variable:

horizontal line y=b; all the y-coordinates are the same\text{horizontal line } y = b \text{; all the } y\text{-coordinates are the same}

vertical line x=a; all the x-coordinates are the same\text{vertical line } x = a \text{; all the } x\text{-coordinates are the same}

So how do we find the slope of the horizontal line y=4y = 4? We graph the line, find two points on it, and count the rise and the run. We’ll use the points (0,4)(0, 4) and (3,4)(3, 4).

(0, 4)(3, 4)

The rise is 00 (the y-coordinatesy\text{-coordinates} don’t change) and the run is 33.

m=riserun=03=0m = \frac{\text{rise}}{\text{run}} = \frac{0}{3} = 0

The slope of the horizontal line y=4y = 4 is 00.

Slope of a horizontal line. The slope of a horizontal line, y=by = b, is 00.

All horizontal lines have slope 00. When the y-coordinatesy\text{-coordinates} are the same, the rise is 00.

Now we’ll consider a vertical line, such as the line x=3x = 3. We’ll use the points (3,0)(3, 0) and (3,2)(3, 2) to count the rise and run.

(3, 0)(3, 2)

The rise is 22 and the run is 00 (the x-coordinatesx\text{-coordinates} don’t change).

m=riserun=20m = \frac{\text{rise}}{\text{run}} = \frac{2}{0}

But we can’t divide by 00. Division by 00 is undefined. So we say that the slope of the vertical line x=3x = 3 is undefined. The slope of all vertical lines is undefined, because the run is 00.

Slope of a vertical line. The slope of a vertical line, x=ax = a, is undefined.

Example. Find the slope of each line: (a) x=8x = 8 (b) y=5y = -5.

(a) x=8x = 8 is a vertical line, so its slope is undefined.

(b) y=5y = -5 is a horizontal line, so its slope is 00.

For the vertical line x=4x = -4, any two points have the same xx-coordinate, so the run is always this value. What is the run?

Find the slope of the line y=7y = 7.

Here’s a quick way to remember the four slope types: a line that rises to the right has positive slope, a line that falls to the right has negative slope, a horizontal line has zero slope, and a vertical line has undefined slope.

Use the slope formula to find the slope of a line between two points

Sometimes we need to find the slope of a line between two points and we might not have a graph to count out the rise and the run. We could plot the points on grid paper, then count out the rise and the run, but there is a way to find the slope without graphing.

Before we get to it, we need to introduce some new algebraic notation. We have seen that an ordered pair (x,y)(x, y) gives the coordinates of a point. But when we work with slopes, we use two points. How can the same symbol (x,y)(x, y) be used to represent two different points?

Mathematicians use subscripts to distinguish between the points. A subscript is a small number written to the right of, and a little lower than, a variable.

(x1,y1) read x sub 1, y sub 1(x_1, y_1) \text{ read } x \text{ sub } 1,\ y \text{ sub } 1

(x2,y2) read x sub 2, y sub 2(x_2, y_2) \text{ read } x \text{ sub } 2,\ y \text{ sub } 2

We will use (x1,y1)(x_1, y_1) to identify the first point and (x2,y2)(x_2, y_2) to identify the second point. If we had more than two points, we could use (x3,y3)(x_3, y_3), (x4,y4)(x_4, y_4), and so on.

To see how the rise and run relate to the coordinates of the two points, let’s take another look at the slope of the line between the points (2,3)(2, 3) and (7,6)(7, 6).

On the graph, we counted a rise of 33. The rise can also be found by subtracting the y-coordinatesy\text{-coordinates} of the points:

y2y1=63=3y_2 - y_1 = 6 - 3 = 3

We counted a run of 55. The run can also be found by subtracting the x-coordinatesx\text{-coordinates}:

x2x1=72=5x_2 - x_1 = 7 - 2 = 5

We know m=riserunm = \tfrac{\text{rise}}{\text{run}}, so m=35m = \tfrac{3}{5}. We rewrite the rise and run by putting in the coordinates: m=6372m = \tfrac{6-3}{7-2}. But 66 is the y-coordinatey\text{-coordinate} of the second point, y2y_2, and 33 is the y-coordinatey\text{-coordinate} of the first point, y1y_1, so we can rewrite the rise using subscript notation: m=y2y172m = \tfrac{y_2 - y_1}{7 - 2}. Also 77 is the x-coordinatex\text{-coordinate} of the second point, x2x_2, and 22 is the x-coordinatex\text{-coordinate} of the first point, x1x_1, so we rewrite the run using subscript notation too: m=y2y1x2x1m = \tfrac{y_2 - y_1}{x_2 - x_1}.

We’ve shown that m=y2y1x2x1m = \tfrac{y_2 - y_1}{x_2 - x_1} is really another version of m=riserunm = \tfrac{\text{rise}}{\text{run}}. We can use this formula to find the slope of a line when we have two points on the line.

Slope formula. The slope of the line between two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is

m=y2y1x2x1m = \frac{y_2 - y_1}{x_2 - x_1}

Say the formula to yourself to help remember it: slope is yy of the second point minus yy of the first point, over xx of the second point minus xx of the first point.

Example. Find the slope of the line between the points (1,2)(1, 2) and (4,5)(4, 5).

We’ll call (1,2)(1, 2) point #1 and (4,5)(4, 5) point #2. Use the slope formula and substitute the values.

m=y2y1x2x1=5241=33=1m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{5 - 2}{4 - 1} = \frac{3}{3} = 1

We can confirm this by counting out the slope on a graph: the rise is 33 and the run is 33, so m=33=1m = \tfrac{3}{3} = 1.

Find the slope of the line through the given points: (8,5)(8, 5) and (6,3)(6, 3).

Find the slope of the line through the given points: (1,5)(1, 5) and (5,9)(5, 9).

How do we know which point to call #1 and which to call #2? Let’s find the slope again, this time switching the names of the points, calling (4,5)(4, 5) point #1 and (1,2)(1, 2) point #2:

m=y2y1x2x1=2514=33=1m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{2 - 5}{1 - 4} = \frac{-3}{-3} = 1

The slope is the same no matter which order we use the points.

Example. Find the slope of the line through the points (2,3)(-2, -3) and (7,4)(-7, 4).

We’ll call (2,3)(-2, -3) point #1 and (7,4)(-7, 4) point #2.

m=y2y1x2x1=4(3)7(2)=75=75m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{4 - (-3)}{-7 - (-2)} = \frac{7}{-5} = -\frac{7}{5}
xy(−7, 4)(−2, −3)

Find the slope of the line through the pair of points: (3,4)(-3, 4) and (2,1)(2, -1).

Find the slope of the line through the pair of points: (2,6)(-2, 6) and (3,4)(-3, -4).

Graph a line given a point and the slope

In this chapter, we graphed lines by plotting points, by using intercepts, and by recognizing horizontal and vertical lines. Another method we can use to graph lines is the point-slope method. Sometimes we will be given one point and the slope of the line, instead of its equation. When this happens, we use the definition of slope to draw the graph of the line.

Graph a line given a point and a slope.

  1. Plot the given point.
  2. Use the slope formula to identify the rise and the run.
  3. Starting at the given point, count out the rise and run to mark the second point.
  4. Connect the points with a line.

Example. Graph the line passing through the point (1,1)(1, -1) whose slope is m=34m = \tfrac{3}{4}.

Plot the given point, (1,1)(1, -1). Use the slope formula to identify the rise and run: m=34m = \tfrac{3}{4}, so the rise is 33 and the run is 44. Starting at the point we plotted, count out the rise and run to mark the second point: 33 units up and 44 units right, landing on (5,2)(5, 2). Then connect the points with a line and draw arrows at the ends to show it continues.

xy(1, −1)(5, 2)34

We can check this line by starting at any point on it and counting up 33 and to the right 44 — we should get to another point on the line.

A line passes through the point (2,2)(2, -2) with slope m=43m = \tfrac{4}{3}. Starting at (2,2)(2, -2) and counting out the rise and run, what point do you land on?

Example. Graph the line with y-intercepty\text{-intercept} (0,2)(0, 2) and slope m=23m = -\tfrac{2}{3}.

Plot the given point, the y-intercepty\text{-intercept} (0,2)(0, 2). Use the slope formula: m=23m = -\tfrac{2}{3}, so the rise is 2-2 and the run is 33. Starting at (0,2)(0, 2), count down 22 and to the right 33 to mark the second point, (3,0)(3, 0). Connect the points with a line.

xy(0, 2)(3, 0)−23

Graph the line with yy-intercept 44 and slope m=52m = -\tfrac{5}{2} by placing two points on the line.

Example. Graph the line passing through the point (1,3)(-1, -3) whose slope is m=4m = 4.

Plot the given point. To use the slope formula, write 44 as a fraction: m=41m = \tfrac{4}{1}, so the rise is 44 and the run is 11. Starting at (1,3)(-1, -3), count up 44 and to the right 11 to mark the second point. Connect the two points with a line.

Graph the line passing through the point (2,1)(-2, 1) with slope m=3m = 3. Write 33 as a fraction first: what are the rise and run?

Solve slope applications

There are many applications of slope in the real world. Let’s look at a few.

Example. The pitch of a building’s roof is the slope of the roof. Knowing the pitch is important in climates where there is heavy snowfall — if the roof is too flat, the weight of the snow may cause it to collapse. What is the slope of a roof with a rise of 99 feet and a run of 1818 feet?

m=riserun=9 ft18 ft=12m = \frac{\text{rise}}{\text{run}} = \frac{9\text{ ft}}{18\text{ ft}} = \frac{1}{2}

The slope of the roof is 12\tfrac{1}{2}.

Find the slope given the rise and run: a roof with a rise =14= 14 and a run =24= 24.

Find the slope given the rise and run: a roof with a rise =15= 15 and a run =36= 36.

Have you ever thought about the sewage pipes going from your house to the street? Their slope is an important factor in how they carry waste away from your house. Sewage pipes must slope down 14\tfrac{1}{4} inch per foot in order to drain properly. What is the required slope?

Since the pipe slopes down, the rise is negative: 14-\tfrac{1}{4} inch for every 11 foot of run. Converting 11 foot to 1212 inches so both measurements are in the same unit,

m=14 in.1 ft=14 in.12 in.=148m = \frac{-\tfrac{1}{4}\text{ in.}}{1\text{ ft}} = \frac{-\tfrac{1}{4}\text{ in.}}{12\text{ in.}} = -\frac{1}{48}

The slope of the pipe is 148-\tfrac{1}{48}.

Find the slope of a pipe that slopes down 13\tfrac{1}{3} inch per foot. Convert the foot to inches first.

Find the slope of a pipe that slopes down 34\tfrac{3}{4} inch per yard. Convert the yard to inches first (11 yard =36= 36 inches).

Key terms

slope of a line — the ratio of the rise (vertical change) to the run (horizontal change) between two points on the line, m=riserunm = \tfrac{\text{rise}}{\text{run}}. rise — the vertical change between two points on a line. run — the horizontal change between two points on a line. slope formula — the slope of the line between two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is m=y2y1x2x1m = \tfrac{y_2 - y_1}{x_2 - x_1}.


This section is adapted from Prealgebra 2e, Section 11.4: Understand Slope of a Line by Lynn Marecek, MaryAnne Anthony-Smith, and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: recreated the geoboard rubber-band diagrams and coordinate-plane line graphs as accessible inline graphics; omitted the Self Check checklist, Be Prepared quiz, Manipulative Mathematics callouts, media links, and end-of-section exercises; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.