Skip to main content
Daily Math Minute

Linear Functions

Slope of a Line

Finding the slope of a line from a graph, table, or two points.

Intermediate20 min lesson4 min readUpdated August 12, 2026Author not yet attributed

The Number That Never Changes Along a Line

Two hikers climb different trails up the same mountain. Trail A gains 200 feet of elevation for every 1,000 feet walked; Trail B gains 350 feet for every 1,000 feet walked. Before reading on, decide: which trail is steeper, and what single number captures that steepness so precisely that you could compare any two trails this way, no matter how long each one is?

Definition — Slope

The ratio of vertical change to horizontal change between any two points on a line, often described as 'rise over run.' For two points (x₁, y₁) and (x₂, y₂), slope m = (y₂ − y₁) / (x₂ − x₁).

Why does it matter which two points you pick? It doesn't — and here's why. Pick any two pairs of points on the same line, and draw a right triangle under each pair using a horizontal and vertical leg. Because both triangles sit on the same straight line, they're similar triangles — same angles, proportional sides — which means their rise-to-run ratios must be equal. Slope isn't just a number computed from two arbitrary points; it's a genuine property of the line itself.

Worked Example — Finding Slope from Two Points

Find the slope of the line through (1, 4) and (5, 16). m = (16 − 4) / (5 − 1) = 12/4 = 3. Verify using a different pair on the same line, say (1, 4) and (3, 10): m = (10 − 4)/(3 − 1) = 6/2 = 3 — the same slope, confirming it doesn't depend on which two points were chosen.

Worked Example — Finding Slope from a Table

A table lists x = 2, 4, 6 with y = 9, 5, 1. Find the slope. Using the first two rows: m = (5 − 9)/(4 − 2) = −4/2 = −2. Check with the last two rows: (1 − 5)/(6 − 4) = −4/2 = −2. Consistent — this is a genuinely linear relationship with slope −2.

Worked Example — Horizontal and Vertical Lines

Find the slope of the line through (3, 7) and (8, 7), and the slope of the line through (3, 2) and (3, 9). For the first: m = (7 − 7)/(8 − 3) = 0/5 = 0 — a horizontal line has zero slope, since there's no vertical change at all. For the second: m = (9 − 2)/(3 − 3) = 7/0, which is undefined — a vertical line has no defined slope, since the run is zero and division by zero has no meaning.
m=y2y1x2x1m = \dfrac{y_2 - y_1}{x_2 - x_1}

Graph Visualizer

Domain & range
2
Evaluate a point
  • x^2 = 0

Tip

Slope doubles as a rate of change — dollars per hour, feet per second, points per game. Reading the units attached to a real-world slope often tells you exactly what the number means before you've even calculated it.

Common Mistakes

  • Subtracting coordinates in mismatched order, such as computing (y₂ − y₁) in the numerator but (x₁ − x₂) in the denominator.

    Whichever point you label as point 1 and point 2, subtract consistently in both the numerator and denominator — always (second minus first) in both, or (first minus second) in both, never mixed.

  • Confusing an undefined slope (vertical line) with a zero slope (horizontal line).

    A slope of 0 means completely flat — no rise at all. An undefined slope means completely vertical — no run at all, and division by zero. These describe opposite situations, not the same thing.

Key Takeaways

  • Slope, the ratio of rise to run, is a fixed property of a line — the same no matter which two points on the line you use to calculate it.
  • Similar triangles formed by any two point-pairs on a line explain why slope stays constant.
  • A horizontal line has slope 0; a vertical line has undefined slope.

Summary

Slope captures a line's constant rate of change, provably the same no matter which points define it. The next lesson uses slope together with one more piece of information — where the line crosses the y-axis — to write a line's full equation.

Sign in to track your progress and mark this lesson complete.

Track your progress