Algebra 1 · Grades 8, 9

How to Graph Linear Equations

Quick answer

A graph of a linear equation is the picture of every solution it has. To draw one, either plot the y-intercept and step by the slope, find the x- and y-intercepts and join them, or build a small table of values. All three give the same line, because a line is determined once you have two points on it.

What you'll learn

  • Graph a line from slope-intercept form, from intercepts, or from a table
  • Explain why every point on the line is a solution of the equation
  • Graph horizontal and vertical lines correctly

What a graph actually is

A graph is not a decoration attached to an equation. It is a picture of every solution.

Take y=2x+1y = 2x + 1. The pair (3,7)(3, 7) is a solution, because 2(3)+1=72(3) + 1 = 7. So is (0,1)(0, 1), and (2,3)(-2, -3), and infinitely many others. Plot them all and they fall into a straight line.

That gives the two facts everything else rests on:

Every point on the line is a solution of the equation. Every solution of the equation is a point on the line.

So “graph the equation” means “show me all the solutions at once”, and “is (5,11)(5, 11) on the line?” is answered by substituting rather than by squinting at a picture.

Why two points are enough

Through any two distinct points there is exactly one straight line. That is why every method below stops after finding two or three points: once you have them, the line is already decided.

Plot a third point anyway. It costs one substitution and catches arithmetic errors, because three correct points always lie in a straight row.

Method 1 — From slope-intercept form

Best when the equation already looks like y=mx+by = mx + b.

  1. Plot bb on the yy-axis.
  2. Step by the slope as riserun\tfrac{\text{rise}}{\text{run}} to a second point.
  3. Repeat once more, then draw the line.

Method 2 — From the intercepts

Best when the equation looks like Ax+By=CAx + By = C, because rearranging is more work than substituting twice.

The xx-intercept is where the line crosses the horizontal axis, so y=0y = 0 there. The yy-intercept is where it crosses the vertical axis, so x=0x = 0 there.

Set one variable to zero, solve for the other, and repeat.

Method 3 — From a table

Always works, including for equations that are neither form. Choose a few convenient xx values, compute each yy, and plot the pairs.

Horizontal and vertical lines

These trip people up because one variable is missing.

EquationGraphWhy
y=3y = 3horizontal line through (0,3)(0,3)yy is always 33, whatever xx is
x=4x = 4vertical line through (4,0)(4,0)xx is always 44, whatever yy is

A memory aid that survives pressure: the equation names the axis it crosses. x=4x = 4 crosses the xx-axis at 44 and runs vertically; y=3y = 3 crosses the yy-axis at 33 and runs horizontally.

Common mistakes

Practice problems

  1. Is (2,9)(2, 9) on the line y=3x+3y = 3x + 3?

    Hint

    Substitute the xx-coordinate and compare with the yy-coordinate.

    Answer

    Yes.

    Full solution

    y=3(2)+3=9y = 3(2) + 3 = 9, which matches, so the point is on the line.

  2. Graph y=x2y = x - 2 by finding three points.

    Answer

    (0,2)(0, -2), (1,1)(1, -1), (3,1)(3, 1)

    Full solution

    The intercept is (0,2)(0, -2). The slope is 1=111 = \tfrac{1}{1}, so step up 11 across 11 to (1,1)(1, -1), then again to (2,0)(2, 0) and (3,1)(3, 1).

    All lie in a straight row, confirming the arithmetic.

  3. Find both intercepts of 2x+5y=102x + 5y = 10.

    Hint

    Set one variable to zero at a time.

    Answer

    xx-intercept (5,0)(5, 0), yy-intercept (0,2)(0, 2)

    Full solution

    Set y=0y = 0: 2x=102x = 10, so x=5x = 5, giving (5,0)(5, 0).

    Set x=0x = 0: 5y=105y = 10, so y=2y = 2, giving (0,2)(0, 2).

  4. Find both intercepts of 4x3y=124x - 3y = 12.

    Answer

    xx-intercept (3,0)(3, 0), yy-intercept (0,4)(0, -4)

    Full solution

    Set y=0y = 0: 4x=124x = 12, so x=3x = 3.

    Set x=0x = 0: 3y=12-3y = 12, so y=4y = -4.

  5. What does the graph of y=1y = -1 look like?

    Answer

    A horizontal line one unit below the xx-axis.

    Full solution

    yy is 1-1 for every value of xx, so the solutions are (3,1)(-3, -1), (0,1)(0, -1), (5,1)(5, -1) and so on — a horizontal line through (0,1)(0, -1).

  6. What does the graph of x=2x = -2 look like?

    Answer

    A vertical line two units left of the yy-axis.

    Full solution

    Only xx is constrained, so yy can be anything: (2,0)(-2, 0), (2,4)(-2, 4), (2,3)(-2, -3). These stack into a vertical line through (2,0)(-2, 0).

  7. Make a table of three points for y=12x+1y = \tfrac{1}{2}x + 1, choosing xx values that avoid fractions.

    Hint

    Halving is clean when xx is even.

    Answer

    (0,1)(0, 1), (2,2)(2, 2), (4,3)(4, 3)

    Full solution

    Choosing even xx values keeps 12x\tfrac{1}{2}x whole:

    x=0x = 0 gives y=1y = 1; x=2x = 2 gives y=2y = 2; x=4x = 4 gives y=3y = 3.

    Each step of 22 across raises yy by 11, matching a slope of 12\tfrac{1}{2}.

  8. A taxi charges $3 to start plus $2 per mile. Graph the cost yy against miles xx, and explain why only part of the line makes sense.

    Hint

    Write the equation first. Then ask which xx values are possible in reality.

    Answer

    y=2x+3y = 2x + 3, but only the part with x0x \ge 0 is meaningful.

    Full solution

    The flat fee is the intercept and the per-mile rate is the slope: y=2x+3y = 2x + 3.

    Points: (0,3)(0, 3), (1,5)(1, 5), (3,9)(3, 9).

    The equation has solutions for negative xx, such as (2,1)(-2, -1), but a journey cannot be 2-2 miles long. The mathematical line continues in both directions; only the portion with x0x \ge 0 describes the real situation. Restricting a graph to the values that make sense is called limiting it to a sensible domain.

Frequently asked questions

How many points do I need?

Two are enough to determine a line, but plot three. The third is a free error check: if it does not land on the straight line through the other two, one of your points is wrong.

Which method should I use?

If the equation is already y = mx + b, stepping from the intercept is fastest. If it is in the form Ax + By = C, finding both intercepts is usually less work than rearranging. A table always works and is worth falling back on.

Why is x = 4 a vertical line rather than a point?

The equation puts no condition on y, so every point whose x-coordinate is 4 satisfies it — (4, 0), (4, 1), (4, -7) and so on. Those points stack into a vertical line.

What to learn next

Key terms in this lesson

Linear equation
A linear equation is one whose graph is a straight line. Every variable appears to the first power only, so there are no squares, roots, or variables in a denominator.
Slope
Slope measures how steep a line is: the change in y divided by the change in x. A slope of 2 means the line climbs 2 units for every 1 unit across.
y-intercept
The y-intercept is where a graph crosses the vertical axis — the value of y when x is 0. In y = 2x + 3 the y-intercept is 3, so the line passes through (0, 3).

Standards alignment

This lesson covers the following Common Core State Standards for Mathematics.

  • CCSS.MATH.CONTENT.HSA.REI.D.10Reasoning with Equations and InequalitiesUnderstand that the graph of an equation in two variables is the set of all its solutions plotted in the coordinate plane, often forming a curve (which could be a line).
  • CCSS.MATH.CONTENT.HSF.IF.C.7aInterpreting FunctionsGraph linear and quadratic functions and show intercepts, maxima, and minima.
  • CCSS.MATH.CONTENT.8.F.A.3FunctionsInterpret the equation y = mx + b as defining a linear function, whose graph is a straight line; give examples of functions that are not linear.