Graphing Linear Equations: Methods, Steps, and Examples

#Algebra
TL;DR
Graphing linear equations means plotting the straight line that satisfies an equation like y=mx+by = mx + b. This article walks through the three main methods — slope-intercept, table of values, and intercepts — with worked examples and the mistakes that produce a crooked or misplaced line.
BT
Bhanzu TeamLast updated on July 18, 202610 min read

What Does Graphing a Linear Equation Mean?

Graphing a linear equation means drawing the set of all points (x,y)(x, y) that make the equation true. Because the equation is linear — every variable appears only to the first power — those points always fall on a single straight line.

A linear equation in two variables can be written as y=mx+by = mx + b (slope-intercept form) or Ax+By=CAx + By = C (standard form). Here mm is the slope (how steep the line is) and bb is the y-intercept (where the line crosses the y-axis). Two points are enough to draw the whole line, because exactly one straight line passes through any two distinct points.

Methods of Graphing Linear Equations

There are three standard methods. They all end at the same line; you pick whichever matches the form the equation arrives in.

Method 1: Slope-Intercept

Put the equation in the form y=mx+by = mx + b. Plot the y-intercept (0,b)(0, b), then read the slope m=riserunm = \dfrac{\text{rise}}{\text{run}} and step from that first point to a second one. Draw the line through both. This is the fastest method when the equation is already solved for yy.

Method 2: Table of Values

Choose a handful of xx-values, substitute each into the equation to compute yy, and record the (x,y)(x, y) pairs in a table. Plot the points and connect them. This method works for any equation form and checks itself, because a linear equation forces every point onto one straight line.

Method 3: Intercepts

Find where the line crosses each axis. Set x=0x = 0 and solve for yy to get the y-intercept; set y=0y = 0 and solve for xx to get the x-intercept. Plot those two crossing points and draw the line. This is often quickest for standard form Ax+By=CAx + By = C.

Horizontal and Vertical Lines

Two special cases break the usual slope-intercept mould, and both are worth recognising on sight.

  • Horizontal line y=cy = c. There is no xx term, so yy stays fixed at cc for every xx. The graph is a flat horizontal line at height cc, and its slope is 00. Example: y=3y = 3 passes through (−2,3)(-2, 3), (0,3)(0, 3), and (2,3)(2, 3).

  • Vertical line x=cx = c. Here xx is pinned at cc while yy ranges freely. The graph is a vertical line, and its slope is undefined (the run is 00, so rise over run has no value). A vertical line is not a function, yet it is still a valid linear equation. Example: x=−2x = -2 passes through (−2,−1)(-2, -1), (−2,0)(-2, 0), and (−2,2)(-2, 2).

Neither line needs a table or slope calculation — read the constant, then draw straight across or straight up.

Where Graphing Lines Earns Its Keep

Graphing a linear equation is the first place algebra turns visual — and the picture answers questions the equation alone hides.

  • A line is a rule you can see. y=mx+by = mx + b says "start at bb, then change by mm for every step right." The graph makes that rule concrete: the slope is the steepness your eye reads directly.

  • Intersections are solutions. Where two lines cross is the single (x,y)(x, y) that satisfies both equations at once — the graphical answer to a system of equations. This is why graphing underlies everything from break-even analysis to supply-and-demand curves.

  • Reading trends. A cost that rises at a steady rate, a distance covered at constant speed, a phone plan with a flat fee plus a per-minute charge — all are lines, and their graphs let you predict values you never computed.

The destination is bigger than one line: once you can graph one equation, you can graph a system, find where lines meet, and solve real problems by looking rather than only calculating. At Bhanzu, trainers teach graphing by connecting the slope you see to the rate of change you compute, so the picture and the algebra reinforce each other.

Examples of Graphing Linear Equations

The examples move from the quickest method to a trickier standard-form case.

Example 1

Graph y=2x+1y = 2x + 1 using slope-intercept form.

Read off the parts: slope m=2m = 2, y-intercept b=1b = 1. Plot the y-intercept at (0,1)(0, 1). Slope 2=212 = \dfrac{2}{1}, so rise 22, run 11: from (0,1)(0,1) move to (1,3)(1, 3). Draw the straight line through (0,1)(0,1) and (1,3)(1,3).

Example 2

Graph 2x+3y=62x + 3y = 6. A student rushes and plots (0,6)(0, 6) and (6,0)(6, 0). Is that right?

Here is the tempting shortcut first.

The student reads the numbers 22, 66 and 33, 66 off the equation and treats 66 as both intercepts, plotting (0,6)(0,6) and (6,0)(6,0).

Watch it fail. Substitute (0,6)(0, 6): 2(0)+3(6)=18≠62(0) + 3(6) = 18 \neq 6. The point is not on the line.

The correct way — set each variable to 00 in turn. Let x=0x = 0: 3y=63y = 6, so y=2y = 2. Point (0,2)(0, 2). Let y=0y = 0: 2x=62x = 6, so x=3x = 3. Point (3,0)(3, 0). Plot (0,2)(0, 2) and (3,0)(3, 0), then draw the line.

Example 3

Graph y=−12x+4y = -\dfrac{1}{2}x + 4 using slope-intercept form.

Slope m=−12m = -\dfrac{1}{2}, y-intercept b=4b = 4. Plot (0,4)(0, 4). Rise −1-1, run 22: move down 11, right 22, reaching (2,3)(2, 3). Draw the line through (0,4)(0, 4) and (2,3)(2, 3); it slopes downward because mm is negative.

Example 4

Graph y=3x−2y = 3x - 2 using a table of values.

Choose xx-values and compute yy.

xx

y=3x−2y = 3x - 2

Point

−1-1

−5-5

(−1,−5)(-1, -5)

00

−2-2

(0,−2)(0, -2)

11

11

(1,1)(1, 1)

22

44

(2,4)(2, 4)

Plot the four points and connect them; they line up perfectly straight.

Example 5

Graph the horizontal line y=3y = 3.

There is no xx term, so y=3y = 3 no matter what xx is. Every point has height 33: (−2,3),(0,3),(2,3)(-2, 3), (0, 3), (2, 3). Draw a horizontal line through y=3y = 3. Its slope is 00.

Example 6

Graph the vertical line x=−2x = -2.

Here xx is fixed at −2-2 and yy can be anything. Points: (−2,−1),(−2,0),(−2,2)(-2, -1), (-2, 0), (-2, 2). Draw a vertical line through x=−2x = -2. Its slope is undefined — this is not a function, but it is still a valid linear equation.

Where Graphing Lines Earns Its Keep

Graphing a linear equation is the first place algebra turns visual — and the picture answers questions the equation alone hides.

  • A line is a rule you can see. y=mx+by = mx + b says "start at bb, then change by mm for every step right." The graph makes that rule concrete: the slope is the steepness your eye reads directly.

  • Intersections are solutions. Where two lines cross is the single (x,y)(x, y) that satisfies both equations at once — the graphical answer to a system of equations. This is why graphing underlies everything from break-even analysis to supply-and-demand curves.

  • Reading trends. A cost that rises at a steady rate, a distance covered at constant speed, a phone plan with a flat fee plus a per-minute charge — all are lines, and their graphs let you predict values you never computed.

The destination is bigger than one line: once you can graph one equation, you can graph a system, find where lines meet, and solve real problems by looking rather than only calculating. At Bhanzu, trainers teach graphing by connecting the slope you see to the rate of change you compute, so the picture and the algebra reinforce each other.

Where Graphing Goes Sideways

Mistake 1: Misreading the slope from standard form

Where it slips in: Seeing 2x+3y=62x + 3y = 6 and reading the slope as 22 (the coefficient of xx) without rearranging.

Don't do this: Assume the number in front of xx in Ax+By=CAx + By = C is the slope.

The correct way: Solve for yy first: 3y=−2x+63y = -2x + 6, so y=−23x+2y = -\dfrac{2}{3}x + 2; the slope is −23-\dfrac{2}{3}, not 22. The habit of solving for yy before reading slope and intercept is exactly what stops this error — the form has to match slope-intercept before you trust the coefficients.

Mistake 2: Plotting rise and run in the wrong direction

Where it slips in: With a negative slope, students move down and left, or up and right, doubling the sign.

Don't do this: For slope −12-\dfrac{1}{2}, move down 11 and left 22 (that gives a positive slope).

The correct way: Fix the run to the right, and let the sign live in the rise: for −12-\dfrac{1}{2}, run right 22, rise down 11. The rusher applies the minus twice; the reader who keeps the run positive and puts the sign only on the rise lands the line correctly.

Mistake 3: Drawing a line through only one point

Where it slips in: Plotting the y-intercept and eyeballing the rest without a second point.

Don't do this: Draw a line from one point at a guessed angle.

The correct way: Always plot at least two points (three is safer as a check), then connect them.

Conclusion

  • Graphing a linear equation plots every (x,y)(x, y) that satisfies it; the result is always a straight line.

  • The three methods are slope-intercept (y=mx+by = mx + b), table of values, and intercepts (xx- and yy-crossings).

  • Convert standard form Ax+By=CAx + By = C to y=mx+by = mx + b before reading the slope.

  • Keep the run positive and put the sign on the rise; plot at least two points.

  • Horizontal lines have slope 00; vertical lines have undefined slope.

To take graphing further with a teacher, explore Bhanzu's algebra tutor, help with algebra, or math classes online. Want a live trainer to graph alongside you? Book a free demo class.

Now try these: graph y=−x+2y = -x + 2 by slope-intercept, x−2y=4x - 2y = 4 by intercepts, and x=3x = 3 directly. If the slope sign trips you up, return to Mistake 2.

Practice Questions

Graph each line using the method that fits its form, then check the key points below.

  1. Graph y=3x−1y = 3x - 1 using slope-intercept form. What is the y-intercept?

  2. Graph x+y=5x + y = 5 using intercepts. Name both intercepts.

  3. Graph y=−2x+4y = -2x + 4 and state its slope.

  4. Graph y=−4y = -4 and state its slope.

  5. Graph x=2x = 2 and state its slope.

Answers

  1. y-intercept (0,−1)(0, -1); slope 33, so a second point is (1,2)(1, 2).

  2. x-intercept (5,0)(5, 0) and y-intercept (0,5)(0, 5).

  3. Slope −2-2; through (0,4)(0, 4) and (1,2)(1, 2), falling left to right.

  4. A horizontal line at height −4-4; slope 00.

  5. A vertical line through x=2x = 2; slope undefined.

Read More

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What are the three main ways to graph a linear equation?
The slope-intercept method (plot bb, then use mm), the table-of-values method (compute several points), and the intercepts method (find where the line crosses each axis).
How many points do I need to graph a line?
Two distinct points are enough, since one straight line passes through any two points. Plotting a third point is a good check.
Which method is fastest?
When the equation is already in y=mx+by = mx + b form, slope-intercept is quickest. For standard form Ax+By=CAx + By = C, the intercepts method is often fastest.
How do I graph a vertical or horizontal line?
y=cy = c is a horizontal line at height cc (slope 00); x=cx = c is a vertical line (slope undefined). Neither needs a table.
Do all linear equations graph as straight lines?
Yes — that is what "linear" means. If the graph curves, the equation was not linear (a variable appeared to a power other than 11).
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →