Slope of a Line: Formula, Meaning, and Examples
What slope means, how to calculate it from two points or from an equation, and how to tell positive, negative, zero, and undefined slope apart, with worked examples and practice.
What you'll learn
- What the slope of a line measures
- How to calculate slope from any two points using the slope formula
- How to read slope from an equation in slope-intercept or standard form
- How to tell positive, negative, zero, and undefined slope apart
- How to interpret slope as a rate of change in a real situation
Introduction
The slope of a line measures how steep it is: how much the line goes up or down for every step it takes to the right. A slope of 3 means the line rises 3 units for every 1 unit you move right. A slope of means it falls half a unit for every 1 unit right.
Why this matters
Slope is a rate of change, and rates of change are everywhere: speed in miles per hour, cost in dollars per item, or the grade of a road. When a road sign warns of a "6% grade," it means the road drops 6 feet for every 100 feet of horizontal distance, which is a slope of . Slope is also the idea that calculus generalizes. The derivative is the slope of a curve at a single point.
The concept
Rise over run
Definition — Slope
The slope of a non-vertical line through the points and is the change in divided by the change in , as shown in equation (1).
The vertical change is the rise, and the horizontal change is the run. A line has the same slope everywhere, so any two points on it give the same answer.
Example — Slope between two points
For the points and , the rise is and the run is :
The order of the points doesn't matter, as long as you use the same order on top and bottom:
The four kinds of slope
| Slope | What the line does (reading left to right) | Example |
|---|---|---|
| Positive | Rises | |
| Negative | Falls | |
| Zero | Stays flat (horizontal line) | |
| Undefined | Goes straight up and down (vertical line) |
A horizontal line has a rise of 0, so its slope is . A vertical line has a run of 0, and division by zero is undefined, so a vertical line has no slope. That's different from a slope of zero.
Reading slope from an equation
When a line's equation is in slope-intercept form, , the slope is the coefficient of , and is the -intercept. If the equation is in another form, solve it for first.
Example — From standard form to slope
Find the slope of .
Subtract from both sides to get . Then divide every term by 5:
The slope is .
Worked examples
Example — Worked example 1: negative coordinates
Problem: Find the slope of the line through and .
Step 1: Label the points: and .
Step 2: Substitute into equation (1), using parentheses around negative numbers:
Answer: . The line falls 2 units for every 1 unit to the right.
Example — Worked example 2: zero and undefined
Problem: Find the slope of the line through and , and of the line through and .
First line: . Both points have the same -value, so the line is horizontal.
Second line: The run is , so the slope formula gives , which is undefined. Both points have the same -value, so the line is vertical. Its equation is .
Example — Worked example 3: slope as a rate of change
Problem: A candle is 30 cm tall after burning for 2 hours and 21 cm tall after burning for 5 hours. Assuming it burns at a constant rate, what is the slope, and what does it mean?
Step 1: Treat each measurement as a point (hours, centimeters): and .
Step 2:
Answer: The slope is centimeters per hour. The candle gets 3 cm shorter every hour. The units of a slope are always (units of ) per (units of ).
Common mistakes
Warning — Putting the run on top
Slope is rise over run, so the change in goes on top. For and , writing is wrong. The correct slope is .
Warning — Mixing up the order of the points
subtracts in opposite orders on top and bottom, which flips the sign of the answer. Whichever point you start with in the numerator, start with the same point in the denominator.
Warning — Confusing zero slope with undefined slope
A horizontal line has slope 0. A vertical line has undefined slope. A helpful memory aid: you can walk along a horizontal line (zero effort, zero slope), but you can't walk up a vertical wall (it's not possible, so there's no slope).
Warning — Subtracting a negative
, not 1. Wrap negative coordinates in parentheses when you substitute them so the double negative is visible.
Practice questions
-
Find the slope of the line through and .
Show answer
. The rise is and the run is , so .
-
Find the slope of the line through and .
Show answer
. The rise is and the run is , so .
-
Find the slope of the line through and .
Show answer
Undefined. The run is , so the line is vertical. Its equation is .
-
Find the slope of the line .
Show answer
. Subtract to get , then divide every term by to get .
Summary
- Slope measures steepness as rise over run: .
- Positive slope rises, negative slope falls, zero slope is horizontal, and a vertical line's slope is undefined.
- In , the slope is . Solve other forms for to find it.
- Slope is a rate of change, measured in units of per unit of .
For more practice, work through the slope of a line lesson and then the slope-intercept form lesson in the Algebra I curriculum.