How to Graph a Linear Equation

Plot b on the y-axis, step rise over run from there, and draw the line through both points. For y = 2x + 1 that means (0, 1) then (1, 3).
You can graph linear equations online to check your points after you plot them by hand. The steps below use the same numbers so you can match the screen to the paper.
What is slope-intercept form (y = mx + b)?
Slope-intercept form is y = mx + b. The number m is the slope. The number b is the y-intercept.
Slope is rise over run. If m = 2, the line rises 2 units for every 1 unit it moves right. If m = −1/2, it falls 1 unit for every 2 units right. The y-intercept b is where the line crosses the y-axis, at the point (0, b).
In y = 2x + 1, m = 2 and b = 1. In y = −0.5x + 3, m = −0.5 and b = 3. Positive slopes climb left to right; negative slopes fall left to right.

How do you graph y = mx + b step by step?
Use the intercept first, then the slope.
- Plot (0, b) on the y-axis.
- Write m as a fraction (rise)/(run). A whole number like 2 is 2/1.
- From (0, b), move up by the rise and right by the run (or down if the rise is negative). Mark that second point.
- Draw a straight line through both points and extend it across the plane.
Worked example: graph y = 2x + 1
- b = 1, so plot (0, 1).
- m = 2 = 2/1, so rise = 2 and run = 1.
- From (0, 1), go up 2 and right 1 to reach (1, 3).
- Draw the line through (0, 1) and (1, 3).
Check a third point: when x = 2, y = 2(2) + 1 = 5, so (2, 5) must sit on the same line. If it does not, you miscounted the rise or run.

How do you graph from two points?
Any two points that satisfy the equation fix the line. Choose two x-values, compute y from the equation, plot both points, and connect them.
For y = 2x + 1:
- x = 0 → y = 1 → point (0, 1)
- x = 3 → y = 7 → point (3, 7)
The line through (0, 1) and (3, 7) is the same line you get from slope and intercept. This method helps when the slope is an awkward fraction and rise-over-run steps feel messy. You only need two points to draw the line, but a third calculated point is still a good check.
How do you graph from standard form (Ax + By = C)?
Standard form is Ax + By = C. Two workable paths:
Convert to slope-intercept. Solve for y. For 2x + y = 1, subtract 2x: y = −2x + 1. Then graph with slope −2 and intercept 1 as above.
Use both intercepts. Set x = 0 and solve for y (y-intercept). Set y = 0 and solve for x (x-intercept). For 2x + 3y = 6:
- x = 0 → 3y = 6 → y = 2 → (0, 2)
- y = 0 → 2x = 6 → x = 3 → (3, 0)
Draw the line through (0, 2) and (3, 0).
Horizontal lines look like y = 3 (slope 0). Vertical lines look like x = −2; they cannot be written as y = mx + b because the slope is undefined.
Common mistakes when graphing a linear equation
- Swapping rise and run. Moving right by 2 and up by 1 when m = 2 flips the slope.
- Putting the y-intercept on the x-axis. b belongs at (0, b), not (b, 0).
- Dropping a negative sign. For m = −3/4 you must move down 3 and right 4, not up.
- Stopping after one point. One point never determines a line; you need a second point or a clear slope step.
If the hand graph disagrees with a quick plot of the same equation, recheck the intercept first, then recount rise and run from that point.
FAQ
How do you graph a linear equation in slope-intercept form?
Plot the y-intercept b at (0, b). Write the slope m as rise over run, step from that point to a second point, then draw a straight line through both. For y = 2x + 1, plot (0, 1), rise 2 and run 1 to (1, 3), and connect them.
What is the slope in y = mx + b?
The slope m is rise over run: how many units the line goes up (or down) for each unit it goes right. A slope of 2 means up 2, right 1. A negative slope means you move down for the rise.
How do you find the y-intercept of a linear equation?
In y = mx + b, the y-intercept is b. It is the value of y when x = 0, so the point on the graph is (0, b). For y = 2x + 1, b = 1 and the point is (0, 1).
How do you graph a linear equation from standard form?
Solve Ax + By = C for y to get slope-intercept form, then graph with slope and intercept. Or find both axis intercepts: set x = 0 for the y-intercept and y = 0 for the x-intercept, then draw the line through those two points.
How do you graph a linear equation using two points?
Pick two x-values, compute the matching y-values from the equation, plot both points, and draw the line. For y = 2x + 1, (0, 1) and (3, 7) determine the same line as the slope method.
Ready to run the numbers? Use the Graphing Calculator.