Slope-Intercept Form (y = mx + b) Explained
Slope-intercept form — written y = mx + b — is the most widely used way to express a linear equation. It tells you two essential facts about a line at a glance: how steeply it rises or falls (the slope m) and exactly where it crosses the y-axis (the y-intercept b). Once you can read those two numbers off an equation, you can draw the line, compare it to other lines, and model real-world relationships in seconds.
This guide covers everything: what m and b mean, how to graph from the equation, how to build the equation from two points or a graph, how to convert from other forms, and how slope reveals whether two lines are parallel or perpendicular — with 10 fully worked practice problems at the end.
Formula
y = mx + b
What Is Slope-Intercept Form?
A linear equation describes a straight line — every point (x, y) on the line satisfies the equation. Among the three common forms (slope-intercept, standard, and point-slope), slope-intercept is the most intuitive because it immediately reveals both geometric properties you need to draw the line.
The equation y = mx + b is said to be in slope-intercept form when y is isolated on the left side. Any linear equation that can be rearranged so that y stands alone equals mx + b. For example, 2x − y = 4 becomes y = 2x − 4 after rearranging — now m = 2 and b = −4 are visible instantly.
The form is called "slope-intercept" because the two key parameters — slope (m) and intercept (b) — appear directly as the coefficient of x and the constant term, with no further calculation needed.
What Does m Mean? — Understanding Slope
The slope m tells you how much y changes for every one-unit increase in x. Formally: m = rise ÷ run = (y₂ − y₁) / (x₂ − x₁) for any two distinct points on the line.
A slope of 3 means: "go right 1 unit, go up 3 units." A slope of −½ means: "go right 2 units, go down 1 unit." A slope of 0 means a perfectly horizontal line — y never changes. An undefined slope (division by zero) describes a vertical line — x never changes.
Slope is the mathematical concept underlying rate of change in science, economics, and engineering. Speed is distance/time (slope of a distance-time graph). Unit price is cost/quantity (slope of a cost-quantity graph). Tax rate is tax/income (slope of a tax line). Anywhere one quantity changes proportionally with another, slope is the ratio.
| Slope (m) | Direction | Example Equation | Real-World Analogy |
|---|---|---|---|
| m > 0 (positive) | Line rises left → right | y = 2x + 1 | Salary increases with years of experience |
| m < 0 (negative) | Line falls left → right | y = −3x + 10 | Car value depreciates over time |
| m = 0 | Horizontal line | y = 5 | Fixed monthly rent regardless of usage |
| m undefined | Vertical line (x = k) | x = 4 (not a function) | A wall — x is fixed, y varies freely |
| |m| > 1 (steep) | Steep rise or fall | y = 5x | Aggressive exponential-phase growth |
| 0 < |m| < 1 (shallow) | Gentle slope | y = 0.2x + 3 | Gradual, slow change |
What Does b Mean? — Understanding the y-Intercept
The y-intercept b is the value of y when x = 0. Geometrically, it is the point where the line crosses the y-axis: the point (0, b). You can find b by substituting x = 0 into any form of the equation.
In real-world models, b often represents a starting value, fixed cost, or initial condition. For example, if a taxi charges $3.00 to get in and $2.00 per mile, the cost equation is y = 2x + 3 — the intercept b = 3 is the flat fee before any miles are driven.
A positive b shifts the line up, a negative b shifts it down. If b = 0, the line passes through the origin (0, 0) — common in direct proportionality: y = mx with no fixed starting value.
How to Graph a Line Using Slope-Intercept Form
Graphing y = mx + b takes three steps: plot the intercept, use the slope to find a second point, then draw the line through both.
Example: Graph y = (2/3)x − 1.
Step 1 — Plot the y-intercept: b = −1, so mark the point (0, −1) on the y-axis.
Step 2 — Use the slope to find a second point: m = 2/3 means rise = 2, run = 3. From (0, −1), move 3 units right and 2 units up → arrive at (3, 1). Mark this point.
Step 3 — Draw the line: Use a ruler to connect the two points and extend in both directions.
For a negative slope like y = −(1/2)x + 4: b = 4 → plot (0, 4). m = −1/2 → rise = −1, run = 2 → move right 2, down 1 → (2, 3). Draw the line.
Shortcut for integer slopes: If m = 3, treat it as 3/1 — rise 3, run 1. If m = −5, rise −5, run 1. Fraction form makes it clear exactly which direction and how far to move.
How to Find Slope from Two Points
Given two points (x₁, y₁) and (x₂, y₂), the slope formula is: m = (y₂ − y₁) / (x₂ − x₁). The order of subtraction must be consistent — numerator and denominator must use the same point labelled "2" and the same point labelled "1".
Example 1: Find the slope through (1, 3) and (4, 9). m = (9 − 3) / (4 − 1) = 6 / 3 = 2.
Example 2: Find the slope through (−2, 5) and (3, 0). m = (0 − 5) / (3 − (−2)) = −5 / 5 = −1.
Example 3 — Horizontal line: Points (2, 4) and (7, 4). m = (4 − 4) / (7 − 2) = 0 / 5 = 0. Horizontal line y = 4.
Example 4 — Vertical line: Points (3, 1) and (3, 8). m = (8 − 1) / (3 − 3) = 7 / 0 = undefined. Vertical line x = 3 (not a function).
Common mistake: swapping x and y in the formula. Remember — the numerator is always the difference in y-values (vertical change), and the denominator is always the difference in x-values (horizontal change).
Writing the Equation of a Line — Two Methods
Method 1 — Given slope and y-intercept: Simply plug m and b directly into y = mx + b. If m = 3 and b = −7, the equation is y = 3x − 7. Done.
Method 2 — Given slope and one point (x₁, y₁): Substitute the known values into y = mx + b and solve for b.
Example: Find the equation of the line with slope m = 4 passing through (2, 11).
Substitute: 11 = 4(2) + b → 11 = 8 + b → b = 3. Equation: y = 4x + 3.
Method 3 — Given two points: First find m using the slope formula (previous section), then use Method 2 with either point to find b.
Example: Line through (1, 2) and (3, 8). Step 1: m = (8 − 2)/(3 − 1) = 6/2 = 3. Step 2: use (1, 2): 2 = 3(1) + b → b = −1. Equation: y = 3x − 1. Verify with (3, 8): y = 3(3) − 1 = 8 ✓.
Converting from Standard Form (Ax + By = C) to Slope-Intercept
Standard form Ax + By = C is common in algebra textbooks and exam problems. To convert to slope-intercept form, isolate y.
Step-by-step process: (1) Move the Ax term to the right side by subtracting Ax from both sides. (2) Divide every term by B (provided B ≠ 0). (3) Simplify — the result is y = (−A/B)x + (C/B), so slope m = −A/B and intercept b = C/B.
Example 1: Convert 3x + 2y = 10 to slope-intercept form. Subtract 3x: 2y = −3x + 10. Divide by 2: y = −(3/2)x + 5. So m = −3/2, b = 5.
Example 2: Convert 5x − y = 8. Subtract 5x: −y = −5x + 8. Multiply by −1: y = 5x − 8. So m = 5, b = −8.
Example 3: Convert 4x + 6y = 0. Subtract 4x: 6y = −4x. Divide by 6: y = −(2/3)x. So m = −2/3, b = 0. The line passes through the origin.
Note: If B = 0 in standard form (Ax = C), the equation represents a vertical line x = C/A — it cannot be written in slope-intercept form because vertical lines have no defined slope.
| Standard Form | Subtract x term | Divide by B | Slope (m) | y-Intercept (b) |
|---|---|---|---|---|
| 3x + 2y = 10 | 2y = −3x + 10 | y = −(3/2)x + 5 | −3/2 = −1.5 | 5 |
| 5x − y = 8 | −y = −5x + 8 | y = 5x − 8 | 5 | −8 |
| x + 4y = 12 | 4y = −x + 12 | y = −(1/4)x + 3 | −1/4 = −0.25 | 3 |
| 2x − 3y = 6 | −3y = −2x + 6 | y = (2/3)x − 2 | 2/3 ≈ 0.667 | −2 |
| 6x + 2y = 0 | 2y = −6x | y = −3x | −3 | 0 (origin) |
Parallel and Perpendicular Lines — Using Slope
Two of the most important line relationships in geometry are directly encoded in the slope.
Parallel lines have equal slopes and different y-intercepts. They never intersect. If line 1 is y = 3x + 2, any line of the form y = 3x + b (b ≠ 2) is parallel.
Perpendicular lines intersect at a 90° angle. Their slopes are negative reciprocals: if one line has slope m, the perpendicular has slope −1/m. The product of perpendicular slopes always equals −1: m₁ × m₂ = −1.
Example — parallel: Line y = (2/3)x + 5. A parallel line through (0, −1): y = (2/3)x − 1. Same slope, different intercept.
Example — perpendicular: Line y = (2/3)x + 5 has slope 2/3. Perpendicular slope = −3/2. Perpendicular line through (0, 4): y = −(3/2)x + 4. Verify: (2/3) × (−3/2) = −1 ✓.
Special cases: Horizontal lines (m = 0) are perpendicular to vertical lines (undefined slope). Two horizontal lines are parallel to each other; two vertical lines are parallel to each other.
| Relationship | Slope Rule | Example Line 1 | Example Line 2 | Test |
|---|---|---|---|---|
| Parallel | m₁ = m₂ | y = 4x + 1 | y = 4x − 7 | Same slope (4 = 4) ✓ |
| Perpendicular | m₁ × m₂ = −1 | y = 3x + 2 | y = −(1/3)x + 5 | 3 × (−1/3) = −1 ✓ |
| Perpendicular | m₁ × m₂ = −1 | y = (5/2)x | y = −(2/5)x + 3 | (5/2) × (−2/5) = −1 ✓ |
| Same line (coincident) | m₁ = m₂, b₁ = b₂ | y = 2x + 3 | 2y = 4x + 6 | Identical when simplified |
| Intersecting (neither) | m₁ ≠ m₂ | y = x + 1 | y = −x + 4 | Cross at one point (1.5, 2.5) |
Real-World Applications of y = mx + b
1. Cost and Revenue (Business): A freelancer charges $50 per hour with a $200 setup fee. Total cost: y = 50x + 200. The slope (50) is the hourly rate; the intercept (200) is the fixed cost. At x = 8 hours: y = $600.
2. Temperature Conversion: Celsius to Fahrenheit: F = (9/5)C + 32. Slope = 9/5 means each 1°C increase is a 1.8°F increase. Intercept = 32 means 0°C = 32°F.
3. Depreciation (Finance): A car worth $30,000 loses $3,000 per year: y = −3000x + 30000. The intercept is the purchase price; the slope is the annual depreciation rate.
4. Break-Even Analysis: Revenue R = 15x (slope = selling price). Cost C = 10x + 500 (slope = variable cost, intercept = fixed cost). Break-even: set equal → 15x = 10x + 500 → x = 100 units.
5. Physics — Uniform Motion: Distance = speed × time + initial position: d = vt + d₀. The slope is speed (m/s); the intercept is starting position.
6. Data Science: Linear regression fits y = mx + b to a cloud of data points, minimizing the sum of squared errors. The resulting line summarizes the relationship between two variables across thousands of observations.
Slope-Intercept vs Standard Form vs Point-Slope Form
Three different forms represent the same line. Knowing which form to use in which situation saves time.
| Form | Equation | Best Used When… | Reads Off Directly |
|---|---|---|---|
| Slope-Intercept | y = mx + b | Graphing, finding y for given x, comparing lines | Slope m and y-intercept b |
| Standard | Ax + By = C | System of equations, integer coefficients preferred | x- and y-intercepts (set x=0 or y=0) |
| Point-Slope | y − y₁ = m(x − x₁) | Writing equation from a point and slope | Slope m and a point (x₁, y₁) |
10 Practice Problems with Full Solutions
1. Identify m and b in y = −(3/4)x + 7. m = −3/4, b = 7. Line falls, crosses y-axis at (0, 7).
2. Find the equation of a line with slope 5 and y-intercept −2. y = 5x − 2.
3. Find the equation of the line with slope −2 through point (3, 1). 1 = −2(3) + b → b = 7. Answer: y = −2x + 7.
4. Find the slope through (−1, 4) and (3, −4). m = (−4−4)/(3−(−1)) = −8/4 = −2.
5. Write the equation of the line through (0, 6) and (2, 10). m = (10−6)/(2−0) = 2. b = 6. Answer: y = 2x + 6.
6. Convert 6x − 3y = 9 to slope-intercept form. −3y = −6x + 9 → y = 2x − 3. m = 2, b = −3.
7. Are y = (1/2)x + 3 and y = (1/2)x − 7 parallel, perpendicular, or neither? Same slope (1/2) → parallel.
8. Find the slope of a line perpendicular to y = (3/5)x + 1. Perpendicular slope = −5/3.
9. A plumber charges $80 per hour plus a $60 call-out fee. Write the cost equation and find the cost for 3.5 hours. y = 80x + 60. At x = 3.5: y = 280 + 60 = $340.
10. Line 1: 2x + 4y = 8. Line 2: y = −(1/2)x + 1. Are these lines the same, parallel, or different? Line 1 → y = −(1/2)x + 2. Same slope (−1/2), different intercepts (2 vs 1) → parallel lines.