Graphing Linear Equations
By the end of this section, you will be able to:
- Recognize the relation between the solutions of an equation and its graph
- Graph a linear equation by plotting points
- Graph vertical and horizontal lines
Recognize the relation between the solutions of an equation and its graph
In Use the Rectangular Coordinate System, we found a few solutions to the equation . They are listed in the table below. So the ordered pairs , , , and are some solutions to the equation . We can plot these solutions in the rectangular coordinate system, as shown below.
Notice how the points line up perfectly? We connect the points with a straight line to get the graph of the equation .
Every point on the line is a solution of the equation. Also, every solution of this equation is a point on this line. Points not on the line are not solutions!
Notice that the point is on the line. If you substitute and into the equation, you find that it is a solution to the equation:
So is a solution to the equation. What about ?
So is not a solution to the equation . Therefore the point is not on the line.
This is an example of the saying “a picture is worth a thousand words.” The line shows you all the solutions to the equation. Every point on the line is a solution of the equation, and every solution of this equation is on this line. This line is called the graph of the equation .
Graph of a linear equation. The graph of a linear equation is a straight line.
- Every point on the line is a solution of the equation.
- Every solution of this equation is a point on this line.
Example. The graph of is shown below. For each ordered pair, decide (a) is the ordered pair a solution to the equation? (b) is the point on the line? , , , .
Substitute the - and -values into the equation to check if each ordered pair is a solution.
So , , and are solutions to , but is not a solution. Plotting the points confirms it: , , and are on the line, and is not on the line.
The graph ofpasses through,, and. Is the ordered paira solution to the equation? Enter the-value thatactually gives when.
Substituteintoand simplify. Compare the result to the-value ofgiven in the ordered pair.Using the same equation, what is the-value when? (Check whether the pointis a solution.)
Substituteintoand simplify.Graph a linear equation by plotting points
There are several methods that can be used to graph a linear equation. The method we used to graph above is called plotting points, or the Point-Plotting Method.
Let’s graph the equation by plotting points. We start by finding three points that are solutions to the equation. We can choose any value for or , and then solve for the other variable. Since is isolated on the left side of the equation, it is easier to choose values for . We will use , , and for in this example. We substitute each value of into the equation and solve for .
We can organize the solutions in a table.
Now we plot the points on a rectangular coordinate system. Check that the points line up — if they did not, it would mean we made a mistake and should double-check our work. Draw the line through the three points, extending it to fill the grid with arrows on both ends. The line is the graph of .
Graph a linear equation by plotting points.
- Find three points whose coordinates are solutions to the equation. Organize them in a table.
- Plot the points on a rectangular coordinate system. Check that the points line up. If they do not, carefully check your work.
- Draw the line through the points. Extend the line to fill the grid and put arrows on both ends of the line.
It only takes two points to determine a line, but it is a good habit to use three points. If you plot only two points and one of them is incorrect, you can still draw a line, but it will be the wrong line. If you use three points and one is incorrect, the points will not line up. This tells you something is wrong and you need to check your work.
Example. Graph the equation .
Find three points that are solutions to the equation. It’s easier to choose values for and solve for .
Plot the points, check that they line up, and draw the line.
Graph the lineby placing three points on it.
The line passes through the origin. The slopemeans from there, go downand rightto reach a second point — and upand leftfor a third.Graph the lineby placing three points on it.
Make a small table: when,; when,. The-value always equals the-value.When an equation includes a fraction as the coefficient of , we can substitute any numbers for . But the math is easier if we make “good” choices for the values of — multiples of the denominator — so we avoid fraction answers, which are hard to graph precisely.
Example. Graph the equation .
Since this equation has the fraction as a coefficient of , we choose values of carefully. We use zero as one choice and multiples of for the other choices.
Plot the points, check that they line up, and draw the line.
The graph of is shown below. Use it to answer the question that follows.
Reading the graph ofabove, what is the-value where the line crosses the-axis (that is, when)?
The line crosses the-axis where. Read the-coordinate of that point straight off the graph.Graphby placing three points on it.
Choose-values that are multiples of, such as,, and, to avoid fractions when you substitute into.So far, all the equations we graphed had given in terms of . Now we’ll graph an equation with and on the same side.
Example. Graph the equation .
Find three points that are solutions to the equation. Remember, you can start with any value of or .
Then plot the points, check that they line up, and draw the line.
Graphby placing three points on it.
Solve forto get. Substitute values like,, andto find three points.Graphby placing three points on it.
Solve forto get. Substitute values like,, andto find three points.In the previous example, the three points we found were easy to graph. But this is not always the case. Let’s see what happens with the equation . If is , what is the value of ?
The solution is the point . This point has a fraction for the -coordinate. While we could graph this point, it is hard to be precise graphing fractions. Remember, in the earlier example we carefully chose values for so as not to graph fractions at all. If we solve the equation for , it will be easier to find three solutions to the equation:
Now we can choose values for that will give coordinates that are integers. The solutions for , , and are shown below.
Example. Graph the equation .
Find three points that are solutions to the equation. First, solve the equation for :
We let be , , and to find three points. The ordered pairs are shown in the table. Plot the points, check that they line up, and draw the line.
If you can choose any three points to graph a line, how will you know if your graph matches the one shown in the answers of a book? If the points where the graphs cross the - and -axes are the same, the graphs match.
Solvingforgives. Which graph shows this equation?
Solved for, the equation is: it crosses the-axis atand falls asincreases.Graphby placing three points on it.
Solve forto get. Substitute values like,, andto find three points.Graph vertical and horizontal lines
Can we graph an equation with only one variable — just and no , or just without an ? How would we make a table of values to get the points to plot?
Let’s consider the equation . This equation says that is always equal to , so its value does not depend on . No matter what is, the value of is always .
To make a table of solutions, we write for all the -values. Then we choose any values for . Since does not depend on , we can choose any numbers we like — to fit the size of our coordinate graph, we’ll use , , and for the -coordinates.
Then we plot the points and connect them with a straight line. The graph is a vertical line.
Example. Graph the equation . What type of line does it form?
The equation has only one variable, , and is always equal to . We make a table where is always and we put in any values for .
Plot the points and connect them. The graph is a vertical line passing through the -axis at .
Graph the equationby placing three points on the line.
Every point on this line has, no matter whatis. Place three points that all sit at, such as,, and— they make a vertical line.Graphby placing three points on the line.
Every point on this line has, no matter whatis. Place three points that all sit at, such as,, and— they make a vertical line.What if the equation has but no ? Let’s graph the equation . This time the -value is a constant, so in this equation does not depend on .
To make a table of solutions, we write for all the -values and then choose any values for . We’ll use , , and for the -values.
Plot the points and connect them. This graph is a horizontal line passing through the -axis at .
Example. Graph the equation .
The equation has only one variable, . The value of is constant. All the ordered pairs in the table have the same -coordinate, . We choose , , and as values for .
The graph is a horizontal line passing through the -axis at .
Graph the lineby placing three points on it.
There is noin the equation, sois always. Place three points with, such as,, and— they make a horizontal line.Graphby placing three points on it.
A horizontal linehas the same-coordinate,, for every point on it. Place three points with, such as,, and.The equations for vertical and horizontal lines look very similar to equations like . What is the difference between the equations and ?
The equation has both and . The value of depends on the value of — the -coordinate changes according to the value of .
The equation has only one variable. The value of is constant. The -coordinate is always . It does not depend on the value of .
Notice that the equation gives a slanted line, whereas gives a horizontal line.
Example. Graph and in the same rectangular coordinate system.
Find three solutions for each equation. Notice that the first equation has the variable , while the second does not.
The graph shows both equations: the slanted line and the horizontal line .
Graphandin the same coordinate system. Place two points on each line.
andhas bothand, so it is a slanted line through the origin.has only, so it is a horizontal line at. The two lines meet at.Graphandin the same coordinate system. Place two points on each line.
andOne equation has no, so its graph is horizontal; the other has an, so its graph is slanted through the origin. The two lines meet at.Key terms
graph of a linear equation — the straight line consisting of all the points that are solutions of the equation ; every point on the line is a solution, and every solution is a point on the line. plotting points (Point-Plotting Method) — a method of graphing a linear equation by finding three solutions, organizing them in a table, plotting them, and drawing the line through them. vertical line — the graph of an equation of the form ; it passes through the -axis at . horizontal line — the graph of an equation of the form ; it passes through the -axis at .
Practice
Recognize the relation between the solutions of an equation and its graph
The graph of is shown below. For each ordered pair, decide whether it is a solution to the equation and whether the point is on the line.
For, is the ordered paira solution to the equation, and is the point on the line?
Substituteandinto. A pair that makes the equation true is a solution, and every solution is a point on the line.For, is the ordered paira solution to the equation, and is the point on the line?
Substitute: the equation gives, not. A pair that fails the equation is not a solution, so the point is off the line.For, is the ordered paira solution to the equation, and is the point on the line?
Substituteandand simplify the right side. If the two sides agree, the pair is a solution and the point lies on the line.For, is the ordered paira solution to the equation, and is the point on the line?
Substituteintoand compare the result with the-valuein the pair.The graph of is shown below. Again decide, for each ordered pair, whether it is a solution and whether the point is on the line.
For, is the ordered paira solution to the equation, and is the point on the line?
Substituteinto. The result is the-intercept, and the graph crosses the-axis there.For, is the ordered paira solution to the equation, and is the point on the line?
Substitute: half ofis, then subtract. Compare with the-value.For, is the ordered paira solution to the equation, and is the point on the line?
Substitute: half ofis, then subtract. Compare with the-value.For, is the ordered paira solution to the equation, and is the point on the line?
Substituteand simplify. The equation gives, so check whether that matches the-valuein the pair.Graph a linear equation by plotting points
Graphby placing three points on the line.
Make a table of solutions: when,; when,; when,. Plot those three points — the line through them is the graph.Graphby placing three points on the line.
Choose-values that are multiples ofso the fraction divides evenly:gives, andgives.Graphby placing three points on the line.
Solve forfirst:. Then pick two easy-values, such asand.Graphby placing three points on the line.
Solve forto get, or just find the intercepts:gives, andgives.Graph vertical and horizontal lines
Graphby placing three points on the line.
Every point on this line has, whateveris. Place three points with the same-coordinate, such as,, and.Graphby placing three points on the line.
There is noin the equation, sois always. Place three points with, such as,, and— they make a horizontal line.Graphandin the same rectangular coordinate system. Place two points on each line.
andOne equation has an, so its graph is slanted through the origin; the other has no, so its graph is horizontal. The two lines meet at.This section is adapted from Prealgebra 2e, Section 11.2: Graphing Linear Equations by Lynn Marecek, MaryAnne Anthony-Smith, and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: recreated the coordinate-grid line graphs as accessible inline graphics; omitted the Be Prepared quiz and Media links; adapted selected end-of-section exercises into the interactive Practice block, restating the multipart “is the ordered pair a solution / is the point on the line” items as one graded question per ordered pair; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback, adapting the “graph the following” Try Its into a mix of graph-production exercises, “which graph” recognition questions, and gradable questions about specific coordinate values.