Slope of a Line
In the last lesson the number m in a
linear function set how
steeply the line tilts. That number has a precise meaning. The slope of a
line measures how much it climbs for each step you take to the right:
\text{slope} = \frac{\text{rise}}{\text{run}}.
The rise is the change in height (up is positive), and the
run is the change across (right is positive). A steeper line has a bigger
rise for the same run, so a bigger slope.
Rise over run between two points
Pick any two points on the line, (x_1, y_1) and
(x_2, y_2). The rise is the difference in their
y-values and the run is the difference in their
x-values:
m = \frac{y_2 - y_1}{x_2 - x_1}.
Drag the two points below. The dashed legs show the rise and the run, and the slope is read
off live as their ratio. Notice it stays the same no matter which two points on the line you
choose — slope is a property of the whole line.
The four kinds of slope
The sign of the slope tells you which way the line goes, and two special cases sit
at the extremes:
- Positive slope — the line goes uphill left to right.
- Negative slope — the line goes downhill left to right.
- Zero slope — a flat horizontal line: rise is 0, so m = 0.
- Undefined slope — a vertical line: run is 0, and you cannot divide by zero.
Flip through the four cases below.
A worked example
Between (1, 2) and (4, 8) the slope is
m = \frac{8 - 2}{4 - 1} = \frac{6}{3} = 2.
So for every 1 step right the line climbs
2. Khan Academy introduces slope here: