Slope of a Line
The slope of a line is one of the most fundamental concepts in coordinate geometry. It measures the steepness and direction of a straight line in the Cartesian plane. Intuitively, slope tells you how much a line rises or falls vertically for every unit you move horizontally. A steep mountain road has a large slope; a flat highway has a slope close to zero. Slope appears everywhere in mathematics and its applications. In physics, slope of a distance–time graph gives speed. In economics, slope of a cost function gives the marginal cost. In calculus, the derivative of a function at a point is precisely the slope of the tangent line at that point, making slope the gateway concept to differential calculus. Mastering slope now will pay dividends throughout your mathematical education. In this article you will learn the formal definition of slope, how to calculate it from two points or from an equation, how to interpret positive, negative, zero, and undefined slopes geometrically, and how slope relates to parallel and perpendicular lines. By the end you should be able to find and interpret the slope of any straight line confidently.
- The Rise-Over-Run Definition
- Computing Slope from Two Points
- Interpreting the Sign of the Slope
- Slope from the Equation of a Line
- Slope and Parallel / Perpendicular Lines
The Rise-Over-Run Definition
Slope is defined as the ratio of the vertical change (rise) to the horizontal change (run) between any two distinct points on a line. If you pick two points and move from one to the other, rise = change in y-coordinates and run = change in x-coordinates. The crucial insight is that this ratio is constant for a straight line — it does not matter which two points you choose.
Computing Slope from Two Points
Given two points P₁ = (x₁, y₁) and P₂ = (x₂, y₂) with x₁ ≠ x₂, the slope is m = (y₂ − y₁)/(x₂ − x₁). The subtraction order must be consistent: numerator and denominator must use the same ordering of the subscripts. For example, (y₂ − y₁)/(x₂ − x₁) and (y₁ − y₂)/(x₁ − x₂) give the same result, but (y₂ − y₁)/(x₁ − x₂) would give the wrong sign.
Interpreting the Sign of the Slope
A positive slope means the line rises from left to right (as x increases, y increases). A negative slope means the line falls from left to right (as x increases, y decreases). A zero slope means the line is perfectly horizontal (y is constant, no rise). An undefined slope occurs when the line is vertical (x is constant), because the run is zero and division by zero is undefined.
Slope from the Equation of a Line
When a line is written in slope-intercept form y = mx + b, the coefficient m of x is directly the slope and b is the y-intercept. For example, y = −3x + 7 has slope −3. If the equation is in standard form Ax + By + C = 0 (with B ≠ 0), you can rearrange to slope-intercept form: y = (−A/B)x + (−C/B), so the slope is −A/B.
Slope and Parallel / Perpendicular Lines
Two lines are parallel if and only if they have equal slopes (and are not the same line). Two lines are perpendicular if and only if the product of their slopes is −1, i.e., m₁ · m₂ = −1, which means their slopes are negative reciprocals: m₂ = −1/m₁. For instance, a line with slope 2/3 is perpendicular to a line with slope −3/2. This rule breaks down when one line is vertical (undefined slope) and the other is horizontal (zero slope), which are perpendicular by definition.
The Key Equation
- m — Slope (dimensionless (rise per unit run)): The constant ratio measuring steepness and direction of the line.
- y_2 - y_1 — Rise (Δy) (same units as y-axis): The vertical change between the two chosen points; positive if moving up, negative if moving down.
- x_2 - x_1 — Run (Δx) (same units as x-axis): The horizontal change between the two chosen points; must be nonzero for slope to exist.
Worked Example
Problem. Find the slope of the line passing through the points A(−2, 5) and B(4, −1). Then determine whether the line through C(1, 3) and D(4, 9) is parallel, perpendicular, or neither to line AB.
Answer. Slope of AB = −1; slope of CD = 2; the lines are neither parallel nor perpendicular.
Origins · 1 minRené Descartes and how this was discovered
Descartes invented the Cartesian coordinate system (published in his 1637 work La Géométrie, an appendix to his Discours de la Méthode). By assigning numerical coordinates to geometric points, he made it possible to describe lines and curves with algebraic equations — and thus to define slope rigorously. His synthesis of algebra and geometry created the field of analytic geometry. Descartes is said to have spent most mornings lying in bed thinking, a habit he kept from school days. Legend holds that watching a fly on his bedroom ceiling gave him the idea of using two perpendicular numbers to locate a point — the origin of Cartesian coordinates!
Related Concepts
- Equation of a Straight Line — Slope is the key parameter in every form of the equation of a line — slope-intercept, point-slope, and standard form all use m directly.
- X and Y Intercepts — The y-intercept b pairs with slope m to fully describe a line in slope-intercept form y = mx + b.
- Parallel and Perpendicular Lines — The conditions m₁ = m₂ (parallel) and m₁·m₂ = −1 (perpendicular) are direct applications of the slope concept.
- Introduction to Derivatives — The derivative of a function at a point is the slope of the tangent line — slope is the geometric foundation of differential calculus.
- Distance and Midpoint Formulas — Distance and midpoint calculations use the same coordinate differences (Δx, Δy) that appear in the slope formula, making these concepts naturally linked.