How to graph a straight line

Quick answer Graphing a straight line involves plotting points that satisfy its equation. Convert the equation to slope-intercept form if needed, identify the y-intercept, use the slope to find another point, and draw the line through these points accurately. A straight line accurately crosses all plotted points and fits the given equation.

What you will need
  • The equation of the line (e.g., y = 2x + 1)
  • Graph paper or digital graphing tool
  • Ruler for drawing straight lines
  • Pencil or pen
Estimated time15-25 minutes
Do it for me

0 of 8 steps complete

1Rewrite the equation as y = mx + b

Use −2x + y = 1 as the running example. Add 2x to both sides to get y = 2x + 1. Here m = 2 is the slope and b = 1 is the vertical intercept. Use the same equation for every point you plot. A vertical line such as x = 3 needs a different approach.

Checkpoint You have y = 2x + 1 and know its slope and intercept.

2Plot the y-intercept

Locate the y-intercept (b) on the vertical axis. For y = 2x + 1, b = 1. Put a point at (0,1) on the graph.

Checkpoint Y-intercept marked (e.g., (0,1)).

3Use the slope to find another point

The slope (m) is rise over run. For y = 2x + 1, slope is 2, so up 2, right 1 from (0,1) lands at (1,3). Mark (1,3) on the graph.

Checkpoint Second point marked using slope (e.g., (1,3)).

4Plot a third point for accuracy

From (1,3), go up 2, right 1 to (2,5), and mark (2,5). Alternatively, go down 2, left 1 from the y-intercept for a backwards point.

Checkpoint At least three collinear points plotted.

5Draw the straight line

Using a ruler, draw a solid line through the three points, continuing it across the graph. Label the line with its equation for clarity.

Checkpoint Line extends through all plotted points and is labeled.

6Check the result against your goal

A straight line accurately crosses all plotted points and fits the given equation.

Checkpoint Identify any part that still needs work.

7Fix the biggest gap

Review this common mistake before you finish. Inaccurate plotting or slope direction leads to a misplaced line.

Checkpoint Line extends through all plotted points and is labeled.

8Record the result and the next action

Use the worksheet to record what you completed, what remains, and when you’ll review it. Keep it with the materials you used for this task.

Checkpoint You can return to the worksheet and see exactly where to pick up.

Worksheet and checklist

A straight line accurately crosses all plotted points and fits the given equation.

Save to My Hows

Common mistakes to avoid

What mistakes should I avoid if I want to graph a straight line?

  • Inaccurate plotting or slope direction leads to a misplaced line.
  • Using only two points can introduce errors; verify with a third.
How do I graph a vertical or horizontal line?

For x = a (vertical), draw a line through (a, y) for all y. For y = b (horizontal), draw a line across at y = b. No slope needed for these cases.

How do I find the x-intercept?

Set y = 0, then solve for x. For y = 2x + 1: 0 = 2x + 1; x = -1/2. So, the x-intercept is at (-0.5, 0).