How to find the slope of a line from a graph or two points

On a line, the slope tells us how much the height changes for a given move to the right. We’ll find that change on a graph first, then use the same idea when all we’re given is two points.

Write rise over run

The rise is the change in y, and the run is the change in x. From (x1,y1) to (x2,y2), the slope m is

m=riserun=y2-y1x2-x1

Use the same point order in both subtractions. Swapping the points changes the signs of both differences, so it leaves their quotient the same whenever the run is nonzero.

Example: Count the rise and run on a graph

Slope triangle with a run of four and a rise of threeThe line passes through zero, negative two and four, one. The horizontal arrow goes four units right from zero, negative two. The vertical arrow goes three units up to four, one.(0, −2)(4, 1)run 4rise 3xy
From (0, −2) to (4, 1), move right 4 and up 3.

From (0,-2) to (4,1), we move right 4 and up 3. So the slope is 34. Using the coordinates gives the same result:

m=1-(-2)4-0=34

Example: Use the slope formula with two points

Find the slope between (-1,5) and (3,-3). Use the second point minus the first in both the numerator and the denominator.

m=-3-53-(-1)=-84=-2

The negative slope means that as we move one unit to the right, the line goes down two units.

What do zero and undefined slope mean?

A line that goes up from left to right has positive slope; one that goes down has negative slope. A horizontal line has slope zero because its rise is zero. A vertical line has undefined slope because its run is zero, so the slope formula would divide by zero.

Once you know the slope, you can use it to graph a line from an equation.