Part 6 of 10 · LinesSee the whole course
Slope-intercept form: y = mx + b, explained
y = mx + b is the equation of a line. m is the slope (how steep it is) and b is the y-intercept (where the line crosses the y-axis, its height when x = 0). Read off m and b and you know the whole line.
Some books and the Pip app write y = ax + b instead. It is exactly the same thing, with the letter a in place of m.
Two numbers describe any line
A straight line changes by the same amount every step. So you only need two facts: how fast it changes (the slope, m) and where it starts (the y-intercept, b).
A gym costs 20 to join and 5 per visit. After x visits you have paid y = 5x + 20. The slope is 5 (each visit adds 5), and b is 20 (where you start, before any visit).
Read m and b from an equation
In y = mx + b, the number multiplying x is the slope, and the number added at the end is where the line starts.
y = 2x + 3 → m = 2, b = 3, starts at (0, 3)
y = −3x + 5 → m = −3, b = 5
y = x − 4 → m = 1, b = −4
y = 7 → m = 0, b = 7
Two things to watch. When x stands alone, the slope is 1 (and −x means −1). And the sign belongs to the number after it: in y = x − 4, b is −4.
Try it. Slide m and b, and watch the line pivot and slide.
Write the equation from m and b
Put the slope in front of x and the starting height at the end. A line with slope 4 that crosses the y-axis at −2 is:
y = 4x + (−2) → y = 4x − 2
When b is negative, write it as a subtraction.
What if the equation is not in this form yet?
Sometimes the equation comes in a different shape. Get y alone on the left first, then read m and b.
2y = 4x + 6
y = 2x + 3 (divide everything by 2)
3x + y = 5
y = −3x + 5 (subtract 3x from both sides)
Divide every term, not just one. In the first example, 4x + 6 divided by 2 is 2x + 3.
Watch it explained in under a minute
The five mistakes to avoid
- Swapping m and b. The number that multiplies x is the slope.
- Reading where the line meets the x-axis instead of b. The y-intercept is where it meets the y-axis.
- Losing the sign of b: y = 2x − 3 has b = −3.
- Forgetting the invisible 1. In y = x + 5 the slope is 1, and in y = −x + 5 it is −1.
- Reading m and b before getting y alone. In 2y = 4x + 6 the slope is not 4.
Try it yourself
Tap a question to see the answer.
1. What are the slope and the y-intercept of y = −3x + 5?
The slope is −3 and the y-intercept is 5.
2. Write the equation of the line with slope 4 that crosses the y-axis at −2.
y = 4x − 2.
3. Write 3x + y = 5 in the form y = mx + b.
Subtract 3x from both sides: y = −3x + 5.
Where slope-intercept form fits in
This is the form you will use most. If slope is new, start with what slope is and how to find it from two points. Next in this course: how to graph a line from its equation.