To find the slope-intercept form, y = mx + b, from two coordinate points, follow these steps:
Step 1: Find the slope (m) Use the slope formula with your two points (x₁, y₁) and (x₂, y₂):
m = (y₂ - y₁) / (x₂ - x₁)
Subtract the y-values on top and the corresponding x-values on the bottom, then simplify the fraction.
Step 2: Find the y-intercept (b) Pick either one of your original points and plug its x and y values, along with the slope you just found, into the equation y = mx + b. Then solve for b.
For example, using point (x₁, y₁): y₁ = m(x₁) + b b = y₁ - m(x₁)
Step 3: Write the final equation Substitute the values of m and b you found into y = mx + b.
Worked Example Find the slope-intercept form for the points (2, 3) and (4, 7).
- Slope: m = (7 - 3) / (4 - 2) = 4 / 2 = 2
- Y-intercept: using (2, 3): 3 = 2(2) + b → 3 = 4 + b → b = -1
- Equation: y = 2x - 1
You can check your work by plugging in the second point (4, 7): y = 2(4) - 1 = 8 - 1 = 7. ✓ It matches, confirming the equation is correct.
Special cases to watch for:
- If the x-values are the same (x₁ = x₂), the line is vertical, and slope is undefined — it cannot be written in slope-intercept form (instead it's x = a constant).
- If the y-values are the same (y₁ = y₂), the slope is 0, and the line is horizontal, written as y = b.