Learn
Lesson · Lines, Functions and Graphs · The coordinate plane

Graphing a Linear Equation

An equation in two unknowns has infinitely many solutions; plotting a few of them reveals the pattern. When the equation is linear, that pattern is a straight line, and two well-chosen points are enough to draw it.

solutions of ax + by = c → a straight line x-intercept: set y = 0, solve for x y-intercept: set x = 0, solve for y x = a vertical y = b horizontal
Drawing a line from its equation

Core ideas

What this lesson establishes

In Linear Equations and Inequalities an equation in one unknown usually had one answer. The same sentence with a second unknown has endlessly many, and the graph is how you hold all of them at once.

1

A linear equation has infinitely many solutions

2x + 3y = 12 is satisfied by (6, 0), (0, 4), (3, 2) and by every other pair on one straight line. Solving it means describing that whole set, not finding "the" answer.

2

Two points determine the line, three points check it

Geometry says two distinct points fix a line, so two solutions suffice. Plot a third anyway: if it misses, one of the three is wrong, and you find out now rather than in “Slope”.

3

Intercepts are the cheapest two points

Setting y = 0 and then x = 0 each collapses the equation to one unknown, which is the case Linear Equations and Inequalities already solved. No other pair of points is easier to get.

The material

Turning an equation into a line

A table always works. Intercepts are faster. Two shapes are special.

Definition · Linear equation in two variables

An equation that can be written ax + by = c with a and b not both zero. Its graph is a straight line, and every straight line is the graph of such an equation.

The word linear earns its name here rather than in Linear Equations and Inequalities: what is straight is the graph. The defining feature on the algebra side is that x and y each appear to the first power only, never multiplied together, never inside a root or a denominator. xy = 6 and y = x² are equations in two variables that are not linear, and their graphs are not lines.

The table method

Choose a value for x, substitute, solve the resulting one-unknown equation for y, and record the pair. Repeat. This never fails and needs no new technique, which makes it the method to fall back on whenever a shortcut is not available or not remembered.

y = -2x + 1 x │ -2x + 1 │ y │ point ────┼─────────────────┼───────┼────────── -1 │ -2(-1) + 1 = 3 │ 3 │ (-1, 3) 0 │ -2( 0) + 1 = 1 │ 1 │ ( 0, 1) 1 │ -2( 1) + 1 = -1│ -1 │ ( 1, -1) 2 │ -2( 2) + 1 = -3│ -3 │ ( 2, -3)

Four points, and they fall in a line: each step of one to the right drops y by two. That constant drop is the subject of “Slope”.

The intercept method

Definition · Intercepts

The x-intercept is where the graph meets the x-axis, found by setting y = 0. The y-intercept is where it meets the y-axis, found by setting x = 0.

The rule is easy to state backwards, so anchor it to the picture: every point on the x-axis has y = 0, so to land on the x-axis you impose y = 0. The intercept you get is an x-value.

Example · 2x + 3y = 12 by intercepts

Set y = 0: 2x = 12, so x = 6 and the x-intercept is (6, 0). Set x = 0: 3y = 12, so y = 4 and the y-intercept is (0, 4). Check with a third: (3, 2) gives 6 + 6 = 12, true.

The method degrades gracefully rather than failing. A line through the origin has both intercepts at (0, 0) — one point, not two — so you take a second point from a table instead.

The two special shapes

When one of the coefficients is zero the equation loses a variable, and the graph is a line parallel to an axis:

  • x = a — every point with x-coordinate a, whatever y is. A vertical line.
  • y = b — every point with y-coordinate b, whatever x is. A horizontal line.

Both are genuine linear equations under the definition above: x = a is 1·x + 0·y = a. The instinct that x = −2 should be a single point comes from Linear Equations and Inequalities, where it was one; with a second variable present, y is unconstrained and the solution set is a whole line.

Keep x = −2 in view. It is the one shape that will fail the test in “What a Function Is”, and knowing what it looks like now is what makes that test obvious later.

Interactive

The line on the plane

Two points, the line through them, and what it crosses

A line
the lineyour two pointsinterceptssecond line

Method

Graphing ax + by = c

Intercepts first, table as the fallback, third point always.

1

Check for a missing variable

If only x appears the line is vertical; if only y, horizontal. Draw it and stop — no table is needed.

2

Set y = 0 and solve for x

This is a one-unknown equation of the kind Linear Equations and Inequalities handled. The result is the x-intercept (x, 0).

3

Set x = 0 and solve for y

Same again, giving (0, y). If both intercepts came out at the origin, pick any other x and get a second point from the equation.

4

Plot a third point, then draw

Any convenient x. If the three are not in a line, recheck the arithmetic before drawing anything; a ruler laid across two correct points and one wrong one hides the error.

Lines from equations

Score 0 / 0

Graphing 2x + 3y = 12

Both intercepts, then a third point as the check.

y = 0: 2x + 3(0) = 12 2x = 12 x = 6 (6, 0) x = 0: 2(0) + 3y = 12 3y = 12 y = 4 (0, 4) check x = 3: 2(3) + 3y = 12 3y = 6 y = 2 (3, 2) the three points: (6, 0) (0, 4) (3, 2) and (3, 2) is halfway between the other two, in both coordinates: x: (6 + 0)/2 = 3 y: (0 + 4)/2 = 2

The check point landing exactly midway is not luck. Equal steps in x produce equal steps in y on a line, which is the property “Slope” isolates and names. What it confirms is that the three points are collinear — consistent with each other — and not that any of them satisfies 2x + 3y = 12. Misread the constant as 24 and you get (12, 0), (0, 8) and (6, 4), which pass the midway check just as cleanly while every one of them is wrong for this equation. Correctness still rests on the substitutions: a third point can reveal an error, not certify its absence.

For a faded graph, start 3x − 2y = 12 with the supplied x-intercept (4, 0). Find the y-intercept, choose a third input that is not zero or four, verify all three pairs in the original equation, and only then draw the line. If the two intercepts collapse to one point on a different problem, state the table value you would use instead.

Common mistakes

1
Swapping which variable to zeroFor the x-intercept you set y = 0. Setting x = 0 and calling the answer an x-intercept is the single most common slip here; tie the rule to the picture, since every point on the x-axis has height zero.
2
Drawing the line through only two pointsTwo points always look consistent, because two points always lie on a line. The third point is the only one that can reveal an error.
3
Reading x = −2 as a pointWith two variables in play the equation constrains x and says nothing about y, so the solution set is a vertical line. The one-variable habit from Linear Equations and Inequalities is what needs unlearning.

Check your understanding

✓
Finish when you can graph any ax + by = c from its intercepts and know when to fall back on a table.

Given five equations including one vertical, one horizontal and one through the origin, you should produce a correct line for each and say which method you used and why. Recognising that the through-the-origin case defeats the intercept shortcut is the part that distinguishes a method from a memorised procedure.

Note: Notice what the table in this lesson showed: a step of one in x always changed y by the same amount. That number is the entire subject of “Slope”, and every form of a line in “Slope-Intercept Form” and “Point-Slope and Standard Form” is built around it.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.