Slope and the Equation of a Line: y = mx + b Step by Step
Find slope from two points, write a line in y = mx + b form, and avoid the subtraction-order mistake, with two worked examples.
SLOPE
- m = (y₂ − y₁) / (x₂ − x₁)
- rise over run
- same order on top and bottom
Rise is the change in y. Run is the change in x.
Slope-intercept form
- y = mx + b
- m is the slope
- b is where the line crosses the y-axis
Plug in a point to find b if you only know m.
Example 1
Find the slope through (1, 2) and (3, 8).
- Rise: 8 − 2 = 6
- Run: 3 − 1 = 2
m = 6 / 2 = 3
Example 2
Write the line with slope 3 through (1, 2).
- Start with y = 3x + b
- Plug in (1, 2): 2 = 3(1) + b, so b = −1
y = 3x − 1
Common mistake
m = (y₂ − y₁) / (x₁ − x₂)
Keep the same order on top and on the bottom.
If you flip only one, the sign of the slope is wrong.
Want more Algebra I practice?
The free Algebra I study guide has quizzes, flashcards and practice exams. 100% free, no sign-up needed.
Open the Algebra I guide