Slope

How Steep Is a Line?

Every straight line has a slope: a single number that captures how steep it is and which way it tilts.

The idea is to compare how much the line goes up against how much it goes across.

As the line tilts, the slope tracks it: large when steep, zero when flat, negative when it heads downhill. It is the vertical change divided by the horizontal change.


Rise Over Run

We call the vertical change the rise and the horizontal change the run.

slope=riserun=y2y1x2x1\text{slope} = \frac{\text{rise}}{\text{run}} = \frac{y_2 - y_1}{x_2 - x_1}

Slope is almost always written as the letter mm.


Reading the Sign

The sign of the slope tells you the line’s direction at a glance:

SlopeLine looks like
positiveuphill from left to right
negativedownhill from left to right
zerohorizontal (flat)
undefinedvertical

A vertical line has a run of 00, and dividing by zero is undefined. That is why vertical lines have no slope, rather than a slope of zero.

Bigger m\lvert m \rvert means a steeper line. A slope of 33 climbs three times faster than a slope of 11.


Example

Find the slope of the line through (1,2)(1, 2) and (4,8)(4, 8).

m=8241=63=2\begin{aligned} m &= \frac{8 - 2}{4 - 1} \\[0.5em] &= \frac{6}{3} = 2 \end{aligned}

The line rises 22 units for every 11 unit it moves right.


Order Does Not Matter, but Be Consistent

You can start from either point, as long as you subtract the coordinates in the same order on top and bottom:

y2y1x2x1=y1y2x1x2\frac{y_2 - y_1}{x_2 - x_1} = \frac{y_1 - y_2}{x_1 - x_2}

Flip both the top and the bottom, or neither. Flipping just one gives the wrong sign.