Slope from Coordinates
The slope of a straight line is one of the most fundamental quantities in coordinate geometry. It measures the steepness and direction of a line — how much the line rises or falls for every unit it moves horizontally. Given any two distinct points on a line, we can compute its slope precisely using a simple formula involving their coordinates. Slope appears everywhere in mathematics and the real world: the grade of a road, the pitch of a roof, the rate at which a savings account grows, and the instantaneous speed of a moving object are all described by slope-like quantities. Mastering slope from coordinates is therefore not just a geometry skill but a gateway to understanding rates of change throughout algebra, trigonometry, and calculus. In this article you will learn the slope formula, understand why it works, practice applying it to concrete pairs of points, and see how positive, negative, zero, and undefined slopes differ visually and algebraically.
- Label the Two Points
- Find the Rise (Vertical Change)
- Find the Run (Horizontal Change)
- Divide Rise by Run
- Interpret the Sign and Magnitude
Label the Two Points
Choose any two distinct points on the line and label them P₁ = (x₁, y₁) and P₂ = (x₂, y₂). The order you assign the labels does not matter, but you must stay consistent — whatever you call P₁ must be used as P₁ throughout the calculation.
Find the Rise (Vertical Change)
Subtract the y-coordinates in the order P₂ minus P₁: rise = y₂ − y₁. A positive result means the line goes upward from left to right; a negative result means it goes downward.
Find the Run (Horizontal Change)
Subtract the x-coordinates in the same order P₂ minus P₁: run = x₂ − x₁. It is critical to subtract in the same order as you did for the rise. If x₂ = x₁ the run is zero, which means the line is vertical and the slope is undefined.
Divide Rise by Run
Compute m = rise ÷ run = (y₂ − y₁) / (x₂ − x₁). Simplify the fraction if possible. The result m is the slope of the line.
Interpret the Sign and Magnitude
If m > 0 the line rises from left to right. If m < 0 it falls from left to right. If m = 0 the line is horizontal. If the denominator is 0 the slope is undefined (vertical line). A larger absolute value |m| means a steeper line.
The Key Equation
- m — Slope (dimensionless (rise per unit run)): The ratio of vertical change to horizontal change; measures steepness and direction of the line.
- y_2 - y_1 — Rise (same units as y-axis): The vertical displacement from point P₁ to point P₂.
- x_2 - x_1 — Run (same units as x-axis): The horizontal displacement from point P₁ to point P₂; must not equal zero.
Worked Example
Problem. Find the slope of the line passing through the points A = (−3, 1) and B = (5, −7).
Answer. The slope is −1.
Origins · 1 minRené Descartes and how this was discovered
Descartes invented the Cartesian coordinate system — the x-y plane — published in his 1637 work 'La Géométrie'. By assigning number pairs to points, he unified algebra and geometry, making it possible to express geometric objects like lines as equations and to compute quantities such as slope algebraically. Descartes reputedly got the idea for coordinate geometry while lying in bed watching a fly on the ceiling and realising he could describe its position with two numbers measuring its distance from two perpendicular walls.
Related Concepts
- Slope-Intercept Form of a Line — Once you know the slope m from two points, you can write the full equation of the line as y = mx + b by finding the y-intercept b.
- Point-Slope Form of a Line — The point-slope form y − y₁ = m(x − x₁) uses the slope calculated from two points to write the line's equation directly.
- Parallel and Perpendicular Lines — Parallel lines share the same slope; perpendicular lines have slopes whose product is −1. Both properties require computing slope from coordinates.
- Introduction to Derivatives — A derivative is the instantaneous rate of change — conceptually the slope of a curve at a point — and is defined as the limit of the slope formula as the two points get infinitely close together.