Graphing Linear Equations
Progress can't be saved in this browser, so this lesson's status can't be set.
Learning goals
- Treat the graph as the equation's whole solution set
- Plot two solutions to fix the line, and a third to check
- Build a table by solving for and choosing inputs
- Find both intercepts by setting each variable to zero
- Draw horizontal and vertical
- Test a point by substituting its coordinates
What the graph of an equation is
A solution of a linear equation in two variables is an ordered pair that makes the equation true. You met these pairs in Equations with Two Variables. Each pair names a point on the coordinate plane.
The graph of an equation is the set of all points whose coordinates make the equation true, plotted on the coordinate plane. A solution gives a point on the graph; a pair that fails the equation gives a point off it. The graph is the equation’s whole solution set drawn as a picture.
For a linear equation this graph is a straight line, which is why the equation is called linear. Two different points fix a line. Once you find two solutions and plot them, you can lay a ruler across them and draw the entire graph. We will find these points using a table or the places where the line crosses the axes.
Graphing with a table of values
The most direct way to graph a linear equation is to find several solutions, plot them, and draw the line they fall on. For a nonvertical line, solve the equation for , choose values of , and compute the matching . Each pair is one point of the graph. A good habit is to pick a small spread of -values, including zero and a negative, so the points are not all crowded together.
Worked example 1 Graph from a table
The equation is already solved for , so choose a handful of -values and compute each .
Collecting the results in a table keeps the pairs straight:
| Solution | ||
|---|---|---|
Plot the four points. They line up perfectly, so lay a ruler across them and draw a straight line. Extend it past the outer points and add arrowheads to show it runs on forever in both directions. That line is the graph of .
Why do the points always line up instead of scattering? The table already hints at the reason: each time climbs by , the value of climbs by the same .
Why the solution points fall on a straight line#
First try a different equation, , to see that the pattern is not special to the table above. Its points include and :
The move of to the right gives a move of up, three times as much. The same is true from any starting point and for a move of any size. If we change by any amount , then
So every solution is reached from any other by moving vertically three times as far as we move horizontally, with the signs included. That means each step between two solutions runs in the same straight direction, forward or backward, so the points all lie on one line.
The same reasoning explains the table for . A step of in gives
exactly more than the old . A step of gives a rise of ; a step of gives a rise of . These are instances of the same rule for any step, not just whole-number inputs.
In general, solving a nonvertical linear equation for gives , where and are fixed numbers. Changing by changes by , since . Thus all its solutions follow one straight direction, including the points between grid marks. Conversely, every point reached by such a step satisfies the equation. Vertical equations fix instead; their solutions form one straight column, as we will see below.
The same routine graphs any linear equation that is not vertical. When the equation is not already solved for , solve for it first, then build the table. (A vertical equation such as cannot be solved for at all, since it has no in it. It gets its own quick rule later in this lesson.)
Worked example 2 Graph from a table
First solve for by subtracting from both sides:
Now choose a few values of , including a negative one so the points spread out, and compute :
| Solution | ||
|---|---|---|
Plotting , , , and gives four points that fall on one line, and drawing through them graphs . If one point landed off the line through the others, you would know to look for an arithmetic slip.
Check your understanding
You are graphing with a table. Which ordered pair belongs in the table?
A table pair must be a solution, so substitute the -value and compute from the equation.
At :
So belongs in the table. The other pairs pair with a wrong .
Graphing with the intercepts
Because two different points are enough to fix a line, you do not need a long table. You need only two solutions, and two of them are especially easy to find and to plot: the points where the graph crosses the axes.
The x-intercept is the point where the line crosses the x-axis. Every point on the x-axis has , so to find it, set and solve for . The y-intercept is the point where the line crosses the y-axis. Every point on the y-axis has , so set and solve for . Each choice makes one term drop out, which keeps the arithmetic short.
Take . For the x-intercept, set :
so the line crosses the x-axis at . For the y-intercept, set :
so it crosses the y-axis at . Plot those two points, draw the line through them, and the graph is done.
You do not have to use the intercepts. If an intercept is awkward to plot, choose an easier value of and compute its instead.
For a slanted line through the origin, such as , both intercepts are . That is only one point, so choose another to find a second point.
Horizontal and vertical lines need a different shortcut. For example, never meets the x-axis, while is the x-axis itself. We can draw these lines directly from their equations.
Worked example 3 Graph using its intercepts
Find the x-intercept by setting :
so the x-intercept is . Find the y-intercept by setting :
so the y-intercept is . The second intercept is below the x-axis, which is fine. Plot on the x-axis and on the y-axis, then draw the line through the two points to graph .
Check your understanding
What is the x-intercept of the graph of ?
The x-intercept is where the line crosses the x-axis, and every point on the x-axis has . Set and solve for .
So the x-intercept is . Setting instead would give the y-intercept .
Horizontal and vertical lines
Two kinds of lines look different from the slanted ones above, and they come from equations that mention only one variable.
Consider . Read literally, it says the y-coordinate is and says nothing at all about . So is free to be any number while must stay : the pairs , , , and are all solutions. Plot a few and they sit at the same height, three units above the x-axis. Connecting them gives a horizontal line. Every equation of the form graphs as a horizontal line at height .
Now consider . It fixes the x-coordinate at and says nothing about . So this time is free and stays : the pairs , , and are all solutions. They line up in a single column two units left of the y-axis, and connecting them gives a vertical line. Every equation of the form graphs as a vertical line through .
These fit the same pattern as the slanted lines. You can write as : the coefficient of is zero, so changing does not change , which stays at . In the same way, is . They are ordinary linear equations with one coefficient zero. Read as “stay at height ” and as “stay in the column .”
Worked example 4 Graph and on the same axes
The equation fixes the x-coordinate at and leaves free. Therefore its solutions are , , , and so on, all in the column four units right of the y-axis. They form a vertical line through .
The equation fixes the y-coordinate at and leaves free. Therefore its solutions are , , , and so on, all at the height one unit below the x-axis. They form a horizontal line through .
Drawn on the same axes, the vertical line and the horizontal line cross at the single point where both rules hold at once, namely .
Check your understanding
Which of these equations graphs as a horizontal line?
A horizontal line comes from an equation that fixes at a constant and leaves free, that is, an equation of the form .
Every point has height , giving a horizontal line.
By contrast is a vertical line, while and are slanted lines.
Checking whether a point is on a line
Because the graph is exactly the set of solutions, deciding whether a given point lies on a line takes no drawing at all. Substitute the point’s coordinates into the equation. If the two sides come out equal, the point is a solution and sits on the line. If they do not, the point is off the line.
Is on the graph of ? Put in and :
and the right side equals the point’s -value of , so is on the line. Is on the graph of ? Substitute:
which is not , so is not on the line. Substitution gives an exact check even when a drawing is too small to read accurately.
Worked example 5 Find a missing coordinate so a point lies on a line
The point lies on the line . Because the point is on the line, its coordinates must satisfy the equation, so substitute and solve for the unknown -coordinate :
So the point is .
For a second case, find the point on whose x-coordinate is . Substitute and solve for :
So the point is . The fractional is no problem: the line passes through plenty of points that do not land on whole-number grid marks, and this is one of them.