Graphing Linear Equations
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. In the last lesson you saw that a single such equation has infinitely many of these pairs. Since every ordered pair is a point on the coordinate plane, the whole collection of solutions is a collection of points, and that collection has a name.
The graph of an equation is the set of all points whose coordinates make the equation true, plotted on the coordinate plane. Nothing more and nothing less: a point is on the graph exactly when it is a solution. Likewise, a point that is not a solution is off the graph. So “the graph” and “the solution set” are two names for the same thing, one described with algebra and the other drawn as a picture.
For a linear equation this graph is always a straight line, which is exactly why the equation is called linear. That fact is what makes graphing fast. A line is fixed by just two different points. So once you have found two solutions and plotted them, you can lay a ruler across them and draw the entire graph. The rest of this lesson is really two questions, then: how to find a few solution points, and how to read the line they determine.
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. Finding solutions is the job you already did last lesson: 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#
Take the equation and watch as grows by . Going from any value to the next value , the new is
which is exactly more than the old . This increase of does not depend on where you started. From to , from to , from anywhere to the next step, goes up by the same .
That steadiness is the whole reason the points line up. Each time you move one unit to the right, you move the same fixed amount up. So from any plotted point the next one sits one across and a fixed jump away, over and over. Repeating one identical step can never bend: it marches in a single fixed direction, and a single fixed direction is what a straight line is. The particular equation only sets the size of that vertical jump. Every linear equation, once is alone on one side, has its lone -term multiplied by a constant. So every such equation’s jump is a fixed number, and its graph is always straight. (Just how steep that line looks is the subject of the next lesson.)
The same routine graphs any linear equation. When the equation is not already solved for , solve for it first, then build the table.
Worked example 2 Graph from a table
First solve for by subtracting from both sides:
Now choose a few values of and compute :
| Solution | ||
|---|---|---|
Plotting , , , and gives four points that fall on one line, and drawing through them graphs . Notice the check built into the table: the points really do line up. So a fourth row that landed off the line would warn you of 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 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.
Two cautions keep this method reliable. The intercepts are just two convenient solutions. So if one of them turns out awkward (a fraction, say), you are free to pick an easier value of instead and use that point. And a line through the origin, such as , has both intercepts at the very same point , because setting and setting both return the origin. In that one case you need a second point somewhere else, so choose any other and compute its .
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 changes nothing and stays pinned at . In the same way, is . They are ordinary linear equations, just with one of the two coefficients equal to zero. A quick way to keep them straight is to read the equation as a rule about one coordinate. Read that way, says “stay at height ” (a flat, horizontal line), and says “stay in the column ” (a standing, vertical line).
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 .
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. The test is the same substitution you used to check solutions last lesson, now read geometrically. On the line means the pair solves the equation, and off the line means the pair does not.
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.