Part 7 of 10 · LinesSee the whole course
How to graph a line from its equation
To graph y = mx + b, put a dot at b on the y-axis. From there, go across 1 and up m (down if m is negative) to mark the next dot. Repeat, then draw a straight line through the dots.
The steps
- Get y alone. Make sure the equation looks like y = mx + b.
- Start at b. Put a dot at (0, b) on the y-axis.
- Step by the slope. Write the slope as rise ÷ run. Go across by the run, then up (or down) by the rise, and put a dot.
- Repeat once more for a third dot.
- Draw the line through the dots with a ruler, and extend it past them.
Try it. Pick an equation, then take the steps one at a time.
Example 1: y = 2x − 1
The y-intercept is −1, so the first dot is (0, −1). The slope is 2, which is 2 ÷ 1: up 2, across 1.
Start: (0, −1)
Up 2, across 1: (1, 1)
Up 2, across 1: (2, 3)
Draw the line through (0, −1), (1, 1) and (2, 3).
Example 2: a fraction slope, y = −⅔x + 4
Start at (0, 4). The slope is −2 ÷ 3. The top of the fraction is the rise and the bottom is the run: down 2, across 3.
Start: (0, 4)
Down 2, across 3: (3, 2)
Down 2, across 3: (6, 0)
Check one dot in the rule: at x = 3, y = −⅔ × 3 + 4 = −2 + 4 = 2. It works.
Example 3: the equation is not in y = mx + b form
Take 3x + 2y = 6. Get y alone first:
2y = −3x + 6
y = −1.5x + 3
Now b = 3 and the slope is −1.5, which is −3 ÷ 2: down 3, across 2.
Start: (0, 3)
Down 3, across 2: (2, 0)
Down 3, across 2: (4, −3)
Check the last dot in the original equation: 3(4) + 2(−3) = 12 − 6 = 6. It works.
Watch it explained in under a minute
The five mistakes to avoid
- Starting at the origin every time. Always start at (0, b).
- Going up for a negative slope. A negative slope goes down.
- Flipping the fraction. A slope of −2/3 is down 2 across 3, not down 3 across 2.
- Graphing before getting y alone. In 3x + 2y = 6, the 3 is not the slope.
- Using only two dots with no check. A third dot that falls on the line tells you the first two were right.
Try it yourself
Name the first three dots for each line. Tap a question to see the answer.
1. y = x + 2
Start (0, 2). The slope is 1, up 1 across 1: (1, 3), then (2, 4).
2. y = −2x + 5
Start (0, 5). The slope is −2, down 2 across 1: (1, 3), then (2, 1).
3. y = ½x − 3
Start (0, −3). The slope is ½, up 1 across 2: (2, −2), then (4, −1).
Where graphing fits in
Graphing a line is slope-intercept form put to work, so if the letters m and b are new, read slope-intercept form explained first. Next in this course, we go the other way: write the equation of a line from two points.