MAT040 Beginning Algebra All classes

Lines and Graphing · Chapter 10

Slope

The numbered examples below are interactive: the numbers change every time you load the page. Type your answer, press Enter or Check, and use New numbers to practice again.

As we graph linear equations, we see that some lines slant up as they go from left to right and some slant down. Some lines are steep and some are flatter. What determines whether a line slants up or down, and whether its slant is steep or flat? The steepness of the slant of a line is called the slope of the line. Slope has many real-world uses: the pitch of a roof and the grade of a highway or wheelchair ramp are examples.

Using a Geoboard to Model Slope

Stretching a rubber band between two pegs on a geoboard gives a concrete way to model a line on a coordinate grid.

Geoboard: a square board with a 5 by 5 grid of pegs, numbered 0 to 4 from the bottom left. An orange rubber band from peg (0, 0) to peg (3, 2). Another orange rubber band from peg (0, 0) to peg (0, 2) to peg (3, 2). Together the bands form a right triangle.

Here the band forms a line, and we stretched one part of it straight up from the left peg and over to the right to make a right triangle, with one side vertical and one side horizontal. The vertical leg goes up 22 spaces, so the rise is 22. The horizontal leg goes across 33 spaces, so the run is 33. (Count the spaces between the pegs, not the pegs themselves.) The slope of this line is 23\frac23.

The slope of a line is

m=riserun.m=\frac{\text{rise}}{\text{run}}.

The rise measures the vertical change and the run measures the horizontal change.

When we work with geoboards, start at a peg on the left and connect to a peg to the right, then stretch the band to form a right triangle. If we go up, the rise is positive. If we stretch down, the rise is negative. We always count the run from left to right, so the run is positive. Count the rise first, then the run.

Example 1

What is the slope of the line on the geoboard?

Geoboard: a square board with a 5 by 5 grid of pegs, numbered 0 to 4 from the bottom left. An orange rubber band from peg (0, 0) to peg (4, 3).

Use the definition of slope, m=riserunm=\dfrac{\text{rise}}{\text{run}}. Start at the left peg and stretch the band up and to the right. The rise is 33 and the run is 44, so

m=34.m=\frac34.
Example 2

What is the slope of the line on the geoboard?

Geoboard: a square board with a 5 by 5 grid of pegs, numbered 0 to 4 from the bottom left. An orange rubber band from peg (0, 3) to peg (3, 2).

Start at the left peg. This time we stretch the band down to reach the peg on the right, so the rise is negative. The rise is −1-1 and the run is 33:

m=−13.m=\frac{-1}3.

Notice that in the first example the slope is positive and in the second the slope is negative. Reading from left to right, a line going up has positive slope, and a line going down has negative slope.

Finding the Slope of a Line from its Graph

To find the slope from a graph, we locate two points on the line, preferably with integer coordinates, start at the point on the left, and sketch a right triangle so we can count the rise and the run.

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

Example 3

Find the slope of the line through (0,−3)(0,-3) and (5,1)(5,1) shown below.

Graph of the line y = (4/5)x − 3 on a coordinate grid. The line passes through (0, −3) and (5, 1). A red right triangle joins the two points: a horizontal run from (0, −3) to (5, −3), then a vertical rise up to (5, 1).

rise=4(up 4 units)run=5m=riserun=45\begin{align*} \text{rise}&=4&&\text{(up $4$ units)}\\ \text{run}&=5\\ m&=\frac{\text{rise}}{\text{run}}=\frac45 \end{align*}

The slope is positive since the line slants upward from left to right.

Example 4

Find the slope of the line through (0,5)(0,5) and (3,3)(3,3) shown below.

Graph of the line y = −(2/3)x + 5 on a coordinate grid. The line passes through (0, 5) and (3, 3). A red right triangle joins the two points: a horizontal run from (0, 5) to (3, 5), then a vertical rise going down to (3, 3).

rise=−2(down 2, so negative)run=3m=−23\begin{align*} \text{rise}&=-2&&\text{(down $2$, so negative)}\\ \text{run}&=3\\ m&=\frac{-2}3 \end{align*}

The slope is negative since the line slants downward from left to right.

The slope of a line is the same no matter which two points we use. For example, the line y=−23x+5y=-\frac23x+5 passes through (−3,7)(-3,7) and (6,1)(6,1). These two points give a rise of −6-6 and a run of 99:

m=−69=−23.m=\frac{-6}9=-\frac23.

The slope of a line is constant!

Example 5

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

Graph of a line on a coordinate grid. The line passes through (2, 3) and (7, 6). A red right triangle joins the two points: a horizontal run from (2, 3) to (7, 3), then a vertical rise up to (7, 6).

rise=3run=5m=35\begin{align*} \text{rise}&=3\\ \text{run}&=5\\ m&=\frac35 \end{align*}

Slope of Horizontal and Vertical Lines

Horizontal lines have equations y=by=b (all the yy-coordinates are the same). Vertical lines have equations x=ax=a (all the xx-coordinates are the same).

Horizontal line y=4y=4. Use the points (0,4)(0,4) and (3,4)(3,4). The rise is 00 and the run is 33:

m=03=0.m=\frac03=0.

Vertical line x=3x=3. Use the points (3,0)(3,0) and (3,2)(3,2). The rise is 22 and the run is 00:

m=20which is undefined.m=\frac20\quad\text{which is undefined.}

The slope of a horizontal line, y=by=b, is 00.
The slope of a vertical line, x=ax=a, is undefined (we cannot divide by 00).

Example 6

Find the slope of each line.

a. x=8b. y=−5a.\ x=8\qquad\qquad b.\ y=-5

a.a. x=8x=8 is a vertical line, so its slope is undefined.
b.b. y=−5y=-5 is a horizontal line, so its slope is 0\mathbf{0}.

Quick guide to the slopes of lines.

Four small arrows, each labeled with a kind of slope: a line rising to the right is labeled positive, a line falling to the right is labeled negative, a horizontal line is labeled zero, and a vertical line is labeled undefined.

The Slope Formula

Sometimes we need the slope of a line between two points and we don’t have a graph. We introduce subscripts to tell two points apart: (x1,y1)(x_1,y_1) is read “xx sub 11, yy sub 11” and identifies the first point, and (x2,y2)(x_2,y_2) identifies the second point.

Look at the line through (2,3)(2,3) and (7,6)(7,6). The rise is 6−3=36-3=3, the difference of the yy-coordinates, so

rise=y2−y1.\text{rise}=y_2-y_1.

The run is 7−2=57-2=5, the difference of the xx-coordinates, so

run=x2−x1.\text{run}=x_2-x_1.

Putting these into m=riserunm=\dfrac{\text{rise}}{\text{run}} gives m=6−37−2=35m=\dfrac{6-3}{7-2}=\dfrac35.

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=y2−y1x2−x1.m=\frac{y_2-y_1}{x_2-x_1}.

Say it to yourself: “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 7

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

Call (1,2)(1,2) point #1\#1 (x1,y1)(x_1,y_1) and (4,5)(4,5) point #2\#2 (x2,y2)(x_2,y_2).

m=y2−y1x2−x1=5−24−1=33=1m=\frac{y_2-y_1}{x_2-x_1}=\frac{5-2}{4-1}=\frac33=1

Check on the graph: the rise is 33 and the run is 33, so m=33=1m=\frac33=1.

Example 8

Find the slope of the line between (8,5)(8,5) and (12,3)(12,3).

Call (8,5)(8,5) point #1\#1 and (12,3)(12,3) point #2\#2.

m=3−512−8=−24=−12m=\frac{3-5}{12-8}=\frac{-2}4=-\frac12
Example 9

Find the slope of the line between (−2,−3)(-2,-3) and (−7,4)(-7,4).

Call (−2,−3)(-2,-3) point #1\#1 and (−7,4)(-7,4) point #2\#2.

m=4−(−3)−7−(−2)=4+3−7+2=7−5=−75m=\frac{4-(-3)}{-7-(-2)}=\frac{4+3}{-7+2}=\frac7{-5}=-\frac75
Example 10

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

Call (−3,5)(-3,5) point #1\#1 and (2,−5)(2,-5) point #2\#2.

m=−5−52−(−3)=−102+3=−105=−2m=\frac{-5-5}{2-(-3)}=\frac{-10}{2+3}=\frac{-10}5=-2

Worked-example videos

Adapted from OpenStax Prealgebra, licensed under CC BY 4.0.