Corequisite Skills for Introductory StatisticsXYZ Homework Edition

6.3 Graphing a Line from Its Equation

Graphing a Line from Its Equation

A source-bound narrated opening with a worked example, an eight-second thinking pause, a checked result, English captions, and a transcript.

Recognize the Relationship Between the Solutions of an Equation and its Graph

In the previous section, we found several solutions to the equation 3x+2y=6. They are listed in Table 6.1. So, the ordered pairs (0,3), (2,0), and (1,32) are some solutions to the equation 3x+2y=6. We can plot these solutions in the rectangular coordinate system as shown in Figure 6.4.

Three points lie on a coordinate grid with labeled ticks from -6 to 6 on both axes: (0, 3), (1, 3/2), and (2, 0). They line up; no fourth point is drawn.
Three points lie on a coordinate grid with labeled ticks from -6 to 6 on both axes: (0, 3), (1, 3/2), and (2, 0). They line up; no fourth point is drawn.
Figure 6.4

Notice how the points line up perfectly? We connect the points with a line to get the graph of the equation 3x+2y=6. See Figure 6.5. Notice the arrows on the ends of each side of the line. These arrows indicate the line continues.

The line 3x + 2y = 6 passes through four marked points: (0, 3), (1, 3/2), (2, 0), and (4, -3). Labeled ticks run from -6 to 6 on both axes. Arrows extend the line in both directions.
The line 3x + 2y = 6 passes through four marked points: (0, 3), (1, 3/2), (2, 0), and (4, -3). Labeled ticks run from -6 to 6 on both axes. Arrows extend the line in both directions.
Figure 6.5

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.

Interactive figurey = 2x + 1: every point on the line is a solutionDrag the x-value of the point slider from -4 to 4.
The straight line y = 2x + 1 in dark blue, with a single red point sitting on it at (1, 3). The point is held to the line, so wherever along it the point is moved its coordinates still satisfy the equation — the line is the picture of every solution, not only the three the book tabulates. Adjustable parameter: x-value of the point (h) = 1. Viewing window: x from -9.5 to 9.5, y from -5.87 to 5.88.
XYZ Graph · viewer build 5edf91b
The book graphs y = 2x + 1 by plotting the points (0, 1), (1, 3), and (2, 5) from its table and drawing the line through them. The marked point rides the line: at x = 1 it sits at (1, 3), and 3 = 2·1 + 1 checks. Drag the x-value anywhere — at x = −2.5 the point is (−2.5, −4) and −4 = 2·(−2.5) + 1 still checks — because the line is the picture of all the equation's solutions, not just the three plotted ones.

Notice that the point whose coordinates are (−2,6) is on the line shown in Figure 6.6. If you substitute x=−2 and y=6 into the equation, you find that it is a solution to the equation.

The line 3x + 2y = 6 and two marked points are shown. (-2, 6) lies on the line; (4, 1) does not. Labeled ticks run from -6 to 6 on both axes.
The line 3x + 2y = 6 and two marked points are shown. (-2, 6) lies on the line; (4, 1) does not. Labeled ticks run from -6 to 6 on both axes.
Figure 6.6
Checking if ordered pair negative 2, 6 solves 3x + 2y = 6. Substituting gives 3 times negative 2 plus 2 times 6 equals 6. Simplifying yields negative 6 plus 12 equals 6, then 6 equals 6. A checkmark indicates the solution is correct.

So the point (−2,6) is a solution to the equation 3x+2y=6. (The phrase “the point whose coordinates are (−2,6)” is often shortened to “the point (−2,6).”)

Checking if (4, 1) solves 3x + 2y = 6. Substituting gives 3(4) + 2(1) = 6, which simplifies to 12 + 2 = 6. This further simplifies to 14 does not equal 6, so the ordered pair is not a solution.

So (4,1) is not a solution to the equation 3x+2y=6. Therefore, the point (4,1) is not on the line. See Figure 6.5. 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 3x+2y=6.

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 3x+2y=6 is called plotting points, or the Point–Plotting Method.

The steps to take when graphing a linear equation by plotting points are summarized below.

It is true that it only takes two points to determine a line, but it is a good habit to use three points. If you only plot two points and one of them is incorrect, you can still draw a line but it will not represent the solutions to the equation. 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. Look at the difference between part (a) and part (b) in Figure 6.7.

Figure a shows three points with a straight line going through them. Figure b shows three points that do not lie on the same line.
Figure a shows three points with a straight line going through them. Figure b shows three points that do not lie on the same line.
Figure 6.7

Let’s do another example. This time, we’ll show the last two steps all on one grid.

When an equation includes a fraction as the coefficient of x, we can still substitute any numbers for x. But the math is easier if we make ‘good’ choices for the values of x. This way we will avoid fraction answers, which are hard to graph precisely.

So far, all the equations we graphed had y given in terms of x. Now we’ll graph an equation with x and y on the same side. Let’s see what happens in the equation 2x+y=3. If y=0 what is the value of x?

The figure shows a set of equations used to determine an ordered pair from the equation 2x plus y equals 3. The first equation is y equals 0 (where the 0 is red). The second equation is the two- variable equation 2x plus y equals 3. The third equation is the one-variable equation 2x plus 0 equals 3 (where the 0 is red). The fourth equation is 2x equals 3. The fifth equation is x equals three halves. The last line is the ordered pair (three halves, 0).

This point has a fraction for the x- coordinate and, while we could graph this point, it is hard to be precise graphing fractions. Remember in the example y=12x+3, we carefully chose values for x so as not to graph fractions at all. If we solve the equation 2x+y=3 for y, it will be easier to find three solutions to the equation.

2x+y=3y=−2x+3

The solutions for x=0, x=1, and x=−1 are shown in the Table 6.4. The graph is shown in Figure 6.8.

The figure shows a straight line drawn through three points on the x y-coordinate plane. The x-axis of the plane runs from negative 7 to 7. The y-axis of the plane runs from negative 7 to 7. Dots mark off the three points which are labeled by their ordered pairs (negative 1, 5), (0, 3), and (1, 1). A straight line goes through all three points. The line has arrows on both ends pointing to the outside of the figure. The line is labeled with the equation 2x plus y equals 3.
The figure shows a straight line drawn through three points on the x y-coordinate plane. The x-axis of the plane runs from negative 7 to 7. The y-axis of the plane runs from negative 7 to 7. Dots mark off the three points which are labeled by their ordered pairs (negative 1, 5), (0, 3), and (1, 1). A straight line goes through all three points. The line has arrows on both ends pointing to the outside of the figure. The line is labeled with the equation 2x plus y equals 3.
Figure 6.8

Can you locate the point (32,0), which we found by letting y=0, on 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 in the book? Compare two distinct points on each line. If both lines contain the same two distinct points, the graphs match. Matching x- and y-intercepts determine the same line only when the intercepts are distinct; lines through the origin can have different slopes.

The equation in Example 5 was written in standard form, with both x and y on the same side. We solved that equation for y in just one step. But for other equations in standard form it is not that easy to solve for y, so we will leave them in standard form. We can still find a first point to plot by letting x=0 and solving for y. We can plot a second point by letting y=0 and then solving for x. Then we will plot a third point by using some other value for x or y.

Practice Makes Perfect

Recognize the Relationship Between the Solutions of an Equation and its Graph

In the following exercises, for each ordered pair, decide:

ⓐ Is the ordered pair a solution to the equation? ⓑ Is the point on the line?

y=x+2

  1. ⓐ (0,2)
  2. ⓑ (1,2)
  3. ⓒ (−1,1)
  4. ⓓ (−3,−1)
The figure shows a straight line drawn on the x y-coordinate plane. Labeled ticks run from -6 to 6 on both axes. The straight line goes through the points (negative 6, negative 4), (negative 5, negative 3), (negative 4, negative 2), (negative 3, negative 1), (negative 2, 0), (negative 1, 1), (0, 2), (1, 3), (2, 4), (3, 5), (4, 6), and (5, 7).
Show solution

ⓐ yes; yes ⓑ no; no ⓒ yes; yes ⓓ yes; yes

y=x−4

  1. ⓐ (0,−4)
  2. ⓑ (3,−1)
  3. ⓒ (2,2)
  4. ⓓ (1,−5)
The figure shows a straight line drawn on the x y-coordinate plane. Labeled ticks run from -6 to 6 on both axes. The straight line goes through the points (negative 3, negative 7), (negative 2, negative 6), (negative 1, negative 5), (0, negative 4), (1, negative 3), (2, negative 2), (3, negative 1), (4, 0), (5, 1), (6, 2), and (7, 3).

y=12x−3

  1. ⓐ (0,−3)
  2. ⓑ (2,−2)
  3. ⓒ (−2,−4)
  4. ⓓ (4,1)
The figure shows a straight line drawn on the x y-coordinate plane. Labeled ticks run from -6 to 6 on both axes. The straight line goes through the points (negative 6, negative 6), (negative 4, negative 5), (negative 2, negative 4), (0, negative 3), (2, negative 2), (4, negative 1), and (6, 0).
Show solution

ⓐ yes; yes ⓑ yes; yes ⓒ yes; yes ⓓ no; no

y=13x+2

  1. ⓐ (0,2)
  2. ⓑ (3,3)
  3. ⓒ (−3,2)
  4. ⓓ (−6,0)
The figure shows a straight line drawn on the x y-coordinate plane. Labeled ticks run from -6 to 6 on both axes. The straight line goes through the points (negative 6, 0), (negative 3, 1), (0, 2), (3, 3), and (6, 4).

Graph a Linear Equation by Plotting Points

In the following exercises, graph by plotting points.

y=3x−1

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 3, negative 10), (negative 2, negative 7), (negative 1, negative 4), (0, negative 1), (1, 2), (2, 5), and (3, 8).

y=2x+3

y=−2x+2

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 4, 10), (negative 3, 8), (negative 2, 6), (negative 1, 4), (0, 2), (1, 0), (2, negative 2), (3, negative 4), (4, negative 6), and (5, negative 8).

y=−3x+1

y=x+2

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 10, negative 8), (negative 9, negative 7), (negative 8, negative 6), (negative 7, negative 5), (negative 6, negative 4), (negative 5, negative 3), (negative 4, negative 2), (negative 3, negative 1), (negative 2, 0), (negative 1, 1), (0, 2), (1, 3), (2, 4), (3, 5), (4, 6), (5, 7), (6, 8), (7, 9), and (8, 10).

y=x−3

y=−x−3

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 10, 7), (negative 9, 6), (negative 8, 5), (negative 7, 4), (negative 6, 3), (negative 5, 2), (negative 4, 1), (negative 3, 0), (negative 2, negative 1), (negative 1, negative 2), (0, negative 3), (1, negative 4), (2, negative 5), (3, negative 6), (4, negative 7), (5, negative 8), (6, negative 9), and (7, negative 10).

y=−x−2

y=2x

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 5, negative 10), (negative 4, negative 8), (negative 3, negative 6), (negative 2, negative 4), (negative 1, negative 2), (0, 0), (1, 2), (2, 4), (3, 6), (4, 8), and (5, 10).

y=3x

y=−4x

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 3, 12), (negative 2, 8), (negative 1, 4), (0, 0), (1, negative 4), (2, negative 8), and (3, negative 12).

y=−2x

y=12x+2

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 12, negative 4), (negative 10, negative 3), (negative 8, negative 2), (negative 6, negative 1), (negative 4, 0), (negative 2, 1), (0, 2), (2, 3), (4, 4), (6, 5), (8, 6), and (10, 7).

y=13x−1

y=43x−5

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 3, negative 9), (0, negative 5), (3, negative 1), (6, 3), and (9, 7).

y=32x−3

y=−25x+1

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 10, 5), (negative 5, 3), (0, 1), (5, negative 1), and (10, negative 3).

y=−45x−1

y=−32x+2

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 6, 11), (negative 4, 8), (negative 2, 5), (0, 2), (2, negative 1), (4, negative 4), (6, negative 7), and (8, negative 10).

y=−53x+4

x+y=6

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 4, 10), (negative 3, 9), (negative 2, 8), (negative 1, 7), (0, 6), (1, 5), (2, 4), (3, 3), (4, 2), (5, 1), (6, 0), (7, negative 1), (8, negative 2), (9, negative 3), and (10, negative 4).

x+y=4

x+y=−3

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 10, 7), (negative 9, 6), (negative 8, 5), (negative 7, 4), (negative 6, 3), (negative 5, 2), (negative 4, 1), (negative 3, 0), (negative 2, negative 1), (negative 1, negative 2), (0, negative 3), (1, negative 4), (2, negative 5), (3, negative 6), (4, negative 7), (5, negative 8), (6, negative 9), and (7, negative 10).

x+y=−2

x−y=2

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 8, negative 10), (negative 7, negative 9), (negative 6, negative 8), (negative 5, negative 7), (negative 4, negative 6), (negative 3, negative 5), (negative 2, negative 4), (negative 1, negative 3), (0, negative 2), (1, negative 1), (2, 0), (3, 1), (4, 2), (5, 3), (6, 4), (7, 5), (8, 6), (9, 7), and (10, 8).

x−y=1

x−y=−1

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. The x-axis of the plane runs from negative 12 to 12. The y-axis of the plane runs from negative 12 to 12. The straight line goes through the points (negative 9, negative 8), (negative 8, negative 7), (negative 7, negative 6), (negative 6, negative 5), (negative 5, negative 4), (negative 4, negative 3), (negative 3, negative 2), (negative 2, negative 1), (negative 1, 0), (0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 9), and (9, 10).

x−y=−3

3x+y=7

Show solution

The line 3x + y = 7 descends from left to right, passing through (0, 7) and (1, 4). Labeled ticks run from -8 to 8 on both axes.

5x+y=6

2x+y=−3

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. Labeled ticks run from -8 to 8 on both axes. The straight line goes through the points (negative 5, 7), (negative 4, 5), (negative 3, 3), (negative 2, 1), (negative 1, negative 1), (0, negative 3), (1, negative 5), and (2, negative 7).

4x+y=−5

13x+y=2

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. Labeled ticks run from -8 to 8 on both axes. The straight line goes through the points (negative 6, 4), (negative 3, 3), (0, 2), (3, 1), and (6, 0).

12x+y=3

25x−y=4

Show solution

The line (2/5)x - y = 4 rises from left to right, passing through (-5, -6), (0, -4), and (5, -2). Labeled ticks run from -8 to 8 on both axes.

34x−y=6

2x+3y=12

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. Labeled ticks run from -8 to 8 on both axes. The straight line goes through the points (negative 3, 6), (0, 4), (3, 2), and (6, 0).

4x+2y=12

3x−4y=12

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. Labeled ticks run from -8 to 8 on both axes. The straight line goes through the points (negative 4, negative 6), (0, negative 3), (4, 0), and (8, 3).

2x−5y=10

x−6y=3

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. Labeled ticks run from -8 to 8 on both axes. The straight line goes through the points (negative 6, negative three halves), (negative 3, negative 1), (0, negative one half), (3, 0), and (6, one half).

x−4y=2

5x+2y=4

Show solution

The figure shows a straight line drawn on the x y-coordinate plane. Labeled ticks run from -8 to 8 on both axes. The straight line goes through the points (negative 2, 7), (0, 2), (2, negative 3), and (4, negative 8).

3x+5y=5

Corequisite Skills for Introductory Statistics is a custom course edition compiled for Introductory Statistics corequisite courses from OpenStax Contemporary Mathematics, Elementary Algebra 2e, Intermediate Algebra 2e, Prealgebra 2e. Content by OpenStax is reproduced as published, apart from any corrections recorded for this edition. Sections are renumbered to follow the course outline. The course outline is adapted from Larry Green's Support Course for Elementary Statistics (LibreTexts, https://stats.libretexts.org/Bookshelves/Introductory_Statistics/Support_Course_for_Elementary_Statistics), used under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Lessons 2.4 and 6.7 are written for this edition by XYZ Homework. Every OpenStax lesson is abridged to the subsections and practice exercises this course uses. Lessons are headed with their course titles, not the source section titles. Access the complete originals free at openstax.org. License: CC-BY-NC-SA-4.0.

⇩ Download ▾

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.