Skip to Content
OpenStax Logo
Prealgebra 2e

11.2 Graphing Linear Equations

Prealgebra 2e11.2 Graphing Linear Equations
  1. Preface
  2. 1 Whole Numbers
    1. Introduction
    2. 1.1 Introduction to Whole Numbers
    3. 1.2 Add Whole Numbers
    4. 1.3 Subtract Whole Numbers
    5. 1.4 Multiply Whole Numbers
    6. 1.5 Divide Whole Numbers
    7. Key Terms
    8. Key Concepts
    9. Exercises
      1. Review Exercises
      2. Practice Test
  3. 2 The Language of Algebra
    1. Introduction to the Language of Algebra
    2. 2.1 Use the Language of Algebra
    3. 2.2 Evaluate, Simplify, and Translate Expressions
    4. 2.3 Solving Equations Using the Subtraction and Addition Properties of Equality
    5. 2.4 Find Multiples and Factors
    6. 2.5 Prime Factorization and the Least Common Multiple
    7. Key Terms
    8. Key Concepts
    9. Exercises
      1. Review Exercises
      2. Practice Test
  4. 3 Integers
    1. Introduction to Integers
    2. 3.1 Introduction to Integers
    3. 3.2 Add Integers
    4. 3.3 Subtract Integers
    5. 3.4 Multiply and Divide Integers
    6. 3.5 Solve Equations Using Integers; The Division Property of Equality
    7. Key Terms
    8. Key Concepts
    9. Exercises
      1. Review Exercises
      2. Practice Test
  5. 4 Fractions
    1. Introduction to Fractions
    2. 4.1 Visualize Fractions
    3. 4.2 Multiply and Divide Fractions
    4. 4.3 Multiply and Divide Mixed Numbers and Complex Fractions
    5. 4.4 Add and Subtract Fractions with Common Denominators
    6. 4.5 Add and Subtract Fractions with Different Denominators
    7. 4.6 Add and Subtract Mixed Numbers
    8. 4.7 Solve Equations with Fractions
    9. Key Terms
    10. Key Concepts
    11. Exercises
      1. Review Exercises
      2. Practice Test
  6. 5 Decimals
    1. Introduction to Decimals
    2. 5.1 Decimals
    3. 5.2 Decimal Operations
    4. 5.3 Decimals and Fractions
    5. 5.4 Solve Equations with Decimals
    6. 5.5 Averages and Probability
    7. 5.6 Ratios and Rate
    8. 5.7 Simplify and Use Square Roots
    9. Key Terms
    10. Key Concepts
    11. Exercises
      1. Review Exercises
      2. Practice Test
  7. 6 Percents
    1. Introduction to Percents
    2. 6.1 Understand Percent
    3. 6.2 Solve General Applications of Percent
    4. 6.3 Solve Sales Tax, Commission, and Discount Applications
    5. 6.4 Solve Simple Interest Applications
    6. 6.5 Solve Proportions and their Applications
    7. Key Terms
    8. Key Concepts
    9. Exercises
      1. Review Exercises
      2. Practice Test
  8. 7 The Properties of Real Numbers
    1. Introduction to the Properties of Real Numbers
    2. 7.1 Rational and Irrational Numbers
    3. 7.2 Commutative and Associative Properties
    4. 7.3 Distributive Property
    5. 7.4 Properties of Identity, Inverses, and Zero
    6. 7.5 Systems of Measurement
    7. Key Terms
    8. Key Concepts
    9. Exercises
      1. Review Exercises
      2. Practice Test
  9. 8 Solving Linear Equations
    1. Introduction to Solving Linear Equations
    2. 8.1 Solve Equations Using the Subtraction and Addition Properties of Equality
    3. 8.2 Solve Equations Using the Division and Multiplication Properties of Equality
    4. 8.3 Solve Equations with Variables and Constants on Both Sides
    5. 8.4 Solve Equations with Fraction or Decimal Coefficients
    6. Key Terms
    7. Key Concepts
    8. Exercises
      1. Review Exercises
      2. Practice Test
  10. 9 Math Models and Geometry
    1. Introduction
    2. 9.1 Use a Problem Solving Strategy
    3. 9.2 Solve Money Applications
    4. 9.3 Use Properties of Angles, Triangles, and the Pythagorean Theorem
    5. 9.4 Use Properties of Rectangles, Triangles, and Trapezoids
    6. 9.5 Solve Geometry Applications: Circles and Irregular Figures
    7. 9.6 Solve Geometry Applications: Volume and Surface Area
    8. 9.7 Solve a Formula for a Specific Variable
    9. Key Terms
    10. Key Concepts
    11. Exercises
      1. Review Exercises
      2. Practice Test
  11. 10 Polynomials
    1. Introduction to Polynomials
    2. 10.1 Add and Subtract Polynomials
    3. 10.2 Use Multiplication Properties of Exponents
    4. 10.3 Multiply Polynomials
    5. 10.4 Divide Monomials
    6. 10.5 Integer Exponents and Scientific Notation
    7. 10.6 Introduction to Factoring Polynomials
    8. Key Terms
    9. Key Concepts
    10. Exercises
      1. Review Exercises
      2. Practice Test
  12. 11 Graphs
    1. Graphs
    2. 11.1 Use the Rectangular Coordinate System
    3. 11.2 Graphing Linear Equations
    4. 11.3 Graphing with Intercepts
    5. 11.4 Understand Slope of a Line
    6. Key Terms
    7. Key Concepts
    8. Exercises
      1. Review Exercises
      2. Practice Test
  13. A | Cumulative Review
  14. B | Powers and Roots Tables
  15. C | Geometric Formulas
  16. Answer Key
    1. Chapter 1
    2. Chapter 2
    3. Chapter 3
    4. Chapter 4
    5. Chapter 5
    6. Chapter 6
    7. Chapter 7
    8. Chapter 8
    9. Chapter 9
    10. Chapter 10
    11. Chapter 11
  17. Index

Learning Objectives

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
Be Prepared 11.4

Before you get started, take this readiness quiz.

Evaluate: 3x+23x+2 when x=−1.x=−1.
If you missed this problem, review Example 3.56.

Be Prepared 11.5

Solve the formula: 5x+2y=205x+2y=20 for y.y.
If you missed this problem, review Example 9.62.

Be Prepared 11.6

Simplify: 38(−24).38(−24).
If you missed this problem, review Example 4.28.

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 3x+2y=63x+2y=6. They are listed in the table below. So, the ordered pairs (0,3)(0,3), (2,0)(2,0), (1,32)(1,32), (4,3)(4,3), are some solutions to the equation3x+2y=63x+2y=6. We can plot these solutions in the rectangular coordinate system as shown on the graph at right.

...

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

...

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 whose coordinates are (2,6)(2,6) is on the line shown in Figure 11.8. If you substitute x=2x=2 and y=6y=6 into the equation, you find that it is a solution to the equation.

...
Figure 11.8

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

Graph of a Linear Equation

The graph of a linear equation Ax+By=CAx+By=C 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 11.15

The graph of y=2x3y=2x3 is shown below.

...

For each ordered pair decide

  1. Is the ordered pair a solution to the equation?
  2. Is the point on the line?
  1. (a) (0,3)(0,3)
  2. (b) (3,3)(3,3)
  3. (c) (2,3)(2,3)
  4. (d) (1,5)(1,5)
Try It 11.29

The graph of y=3x1y=3x1 is shown.

For each ordered pair, decide

  1. is the ordered pair a solution to the equation?
  2. is the point on the line?
...
  1. (0,1)(0,1)
  2. (2,2)(2,2)
  3. (3,1)(3,1)
  4. (1,4)(1,4)

Graph a Linear Equation by Plotting Points

There are several methods that can be used to graph a linear equation. The method we used at the start of this section to graph is called plotting points, or the Point-Plotting Method.

Let’s graph the equation y=2x+1y=2x+1 by plotting points.

We start by finding three points that are solutions to the equation. We can choose any value for xx or y,y, and then solve for the other variable.

Since yy is isolated on the left side of the equation, it is easier to choose values for x.x. We will use 0,1,0,1, and -2-2 for xx for this example. We substitute each value of xx into the equation and solve for y.y.

The figure shows three algebraic substitutions into an equation. The first substitution is for x = -2, with -2 shown in blue. The next line is y = 2 x + 1. The next line is y = 2 open parentheses -2, shown in blue, closed parentheses, + 1. The next line is y = - 4 + 1. The next line is y = -3. The last line is “ordered pair -2, -3”. The second  substitution is for x = 0, with 0 shown in blue. The next line is y = 2 x + 1. The next line is y = 2 open parentheses 0, shown in blue, closed parentheses, + 1. The next line is y = 0 + 1. The next line is y = 1. The last line is “ordered pair 0, 2”. The third substitution is for x = 1, with 1 shown in blue. The next line is y = 2 x + 1. The next line is y = 2 open parentheses 1, shown in blue, closed parentheses, + 1. The next line is y = 2 + 1. The next line is y = 3. The last line is “ordered pair -1, 3”.

We can organize the solutions in a table. See Table 11.2.

y=2x+1y=2x+1
xx yy (x,y)(x,y)
00 11 (0,1)(0,1)
11 33 (1,3)(1,3)
−2−2 −3−3 (−2,−3)(−2,−3)
Table 11.2

Now we plot the points on a rectangular coordinate system. Check that the points line up. If they did not line up, it would mean we made a mistake and should double-check all our work. See Figure 11.9.

The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. Three labeled points are shown, “ordered pair -2, -3”, “ordered pair 0, 1”, and ordered pair 1, 3”.
Figure 11.9

Draw the line through the three points. Extend the line to fill the grid and put arrows on both ends of the line. The line is the graph of y=2x+1.y=2x+1.

The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A line passes through three labeled points, “ordered pair -2, -3”, “ordered pair 0, 1”, and ordered pair 1, 3”.
Figure 11.10

How To

Graph a linear equation by plotting points.

  1. Step 1. Find three points whose coordinates are solutions to the equation. Organize them in a table.
  2. Step 2. Plot the points on a rectangular coordinate system. Check that the points line up. If they do not, carefully check your work.
  3. Step 3. Draw the line through the points. Extend the line to fill the grid and put arrows on both ends of the line.

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 plot only 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. See Figure 11.11.

There are two figures. Figure a shows three points that are all contained on a straight line. There is a line with arrows that passed through the three points. Figure b shows 3 points that are not all arranged in a straight line.
Figure 11.11 Look at the difference between (a) and (b). All three points in (a) line up so we can draw one line through them. The three points in (b) do not line up. We cannot draw a single straight line through all three points.

Example 11.16

Graph the equation y=−3x.y=−3x.

Try It 11.30

Graph the equation by plotting points: y=−4x.y=−4x.

Try It 11.31

Graph the equation by plotting points: y=x.y=x.

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

Example 11.17

Graph the equation y=12x+3.y=12x+3.

Try It 11.32

Graph the equation: y=13x1.y=13x1.

Try It 11.33

Graph the equation: y=14x+2.y=14x+2.

So far, all the equations we graphed had yy given in terms of x.x. Now we’ll graph an equation with xx and yy on the same side.

Example 11.18

Graph the equation x+y=5.x+y=5.

Try It 11.34

Graph the equation: x+y=−2.x+y=−2.

Try It 11.35

Graph the equation: xy=6.xy=6.

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 in the equation 2x+y=3.2x+y=3. If yy is 0,0, what is the value of x?x?

This figure shows an algebraic substitution. The first line is 2 x + y = 3. The second line is 2 x + 0, with 0 shown in red. The third line is 2 x = 3. The last line is x = 3 over 2.

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

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

Now we can choose values for xx that will give coordinates that are integers. The solutions for x=0,x=1,x=0,x=1, and x=−1x=−1 are shown.

y=−2x+3y=−2x+3
xx yy (x,y)(x,y)
00 55 (−1,5)(−1,5)
11 33 (0,3)(0,3)
−1−1 11 (1,1)(1,1)
The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A line passes through three labeled points, “ordered pair -1, 5”, “ordered pair 0, 3”, and ordered pair 1, 1”. The line is labeled 2 x + y = 3.

Example 11.19

Graph the equation 3x+y=−1.3x+y=−1.

Try It 11.36

Graph each equation: 2x+y=2.2x+y=2.

Try It 11.37

Graph each equation: 4x+y=−3.4x+y=−3.

Graph Vertical and Horizontal Lines

Can we graph an equation with only one variable? Just xx and no y,y, or just yy without an x?x? How will we make a table of values to get the points to plot?

Let’s consider the equation x=−3.x=−3. The equation says that xx is always equal to −3,−3, so its value does not depend on y.y. No matter what yy is, the value of xx is always −3.−3.

To make a table of solutions, we write −3−3 for all the xx values. Then choose any values for y.y. Since xx does not depend on y,y, you can chose any numbers you like. But to fit the size of our coordinate graph, we’ll use 1,2,1,2, and 33 for the yy-coordinates as shown in the table.

x=−3x=−3
xx yy (x,y)(x,y)
−3−3 11 (−3,1)(−3,1)
−3−3 22 (−3,2)(−3,2)
−3−3 33 (−3,3)(−3,3)

Then plot the points and connect them with a straight line. Notice in Figure 11.12 that the graph is a vertical line.

The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A vertical line passes through three labeled points, “ordered pair -3, 3”, “ordered pair -3, 2”, and ordered pair -3, 1”. The line is labeled x = -3.
Figure 11.12

Vertical Line

A vertical line is the graph of an equation that can be written in the form x=a.x=a.

The line passes through the xx-axis at (a,0)(a,0).

Example 11.20

Graph the equation x=2.x=2. What type of line does it form?

Try It 11.38

Graph the equation: x=5.x=5.

Try It 11.39

Graph the equation: x=−2.x=−2.

What if the equation has yy but no xx? Let’s graph the equation y=4.y=4. This time the yy-value is a constant, so in this equation yy does not depend on x.x.

To make a table of solutions, write 44 for all the yy values and then choose any values for x.x.

We’ll use 0,2,0,2, and 44 for the xx-values.

y=4y=4
xx yy (x,y)(x,y)
00 44 (0,4)(0,4)
22 44 (2,4)(2,4)
44 44 (4,4)(4,4)

Plot the points and connect them, as shown in Figure 11.13. This graph is a horizontal line passing through the y-axisy-axis at 4.4.

The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A horizontal  line passes through three labeled points, “ordered pair 0, 4”, “ordered pair 2, 4”, and ordered pair 4, 4”. The line is labeled y = 4.
Figure 11.13

Horizontal Line

A horizontal line is the graph of an equation that can be written in the form y=b.y=b.

The line passes through the y-axisy-axis at (0,b).(0,b).

Example 11.21

Graph the equation y=−1.y=−1.

Try It 11.40

Graph the equation: y=−4.y=−4.

Try It 11.41

Graph the equation: y=3.y=3.

The equations for vertical and horizontal lines look very similar to equations like y=4x.y=4x. What is the difference between the equations y=4xy=4x and y=4?y=4?

The equation y=4xy=4x has both xx and y.y. The value of yy depends on the value of x.x. The y-coordinatey-coordinate changes according to the value of x.x.

The equation y=4y=4 has only one variable. The value of yy is constant. The y-coordinatey-coordinate is always 4.4. It does not depend on the value of x.x.

There are two tables. This first table is titled y = 4 x, which is shown in blue. It has 4 rows and 3 columns. The first row is a header row and it labels each column “x”, “y”, and  “ordered pair x, y”. Under the column “x” are the values  0, 1, and 2. Under the column “y” are the values  0, 4, and 8. Under the column “ordered pair x, y” are the values “ordered pair 0, 0”, “ordered pair 1, 4”, and “ordered pair 2, 8”. This second table is titled y = 4 , which is shown in red. It has 4 rows and 3 columns. The first row is a header row and it labels each column “x”, “y”, and  “ordered pair x, y”. Under the column “x” are the values  0, 1, and 2. Under the column “y” are the values  4, 4, and 4. Under the column “ordered pair x, y” are the values “ordered pair 0, 4”, “ordered pair 1, 4”, and “ordered pair 2, 4”.

The graph shows both equations.

The graph shows the x y-coordinate plane. The x and y-axis each run from -7 to 7. A horizontal line passes through “ordered pair 0, 4” and “ordered pair 1, 4” and is labeled y = 4. A second line passes through “ordered pair 0, 0” and “ordered pair 1, 4” and is labeled y = 4 x. The two lines intersect at “ordered pair 1, 4”.

Notice that the equation y=4xy=4x gives a slanted line whereas y=4y=4 gives a horizontal line.

Example 11.22

Graph y=−3xy=−3x and y=−3y=−3 in the same rectangular coordinate system.

Try It 11.42

Graph the equations in the same rectangular coordinate system: y=−4xy=−4x and y=−4.y=−4.

Try It 11.43

Graph the equations in the same rectangular coordinate system: y=3y=3 and y=3x.y=3x.

Section 11.2 Exercises

Practice Makes Perfect

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

In each of the following exercises, an equation and its graph is shown. For each ordered pair, decide

  1. is the ordered pair a solution to the equation?
  2. is the point on the line?
39.

y=x+2y=x+2

...
  1. (0,2)(0,2)
  2. (1,2)(1,2)
  3. (1,1)(1,1)
  4. (3,1)(3,1)
40.

y=x4y=x4

...
  1. (0,4)(0,4)
  2. (3,1)(3,1)
  3. (2,2)(2,2)
  4. (1,5)(1,5)
41.

y=12x3y=12x3

...
  1. (0,3)(0,3)
  2. (2,2)(2,2)
  3. (2,4)(2,4)
  4. (4,1)(4,1)
42.

y=13x+2y=13x+2

...
  1. (0,2)(0,2)
  2. (3,3)(3,3)
  3. (3,2)(3,2)
  4. (6,0)(6,0)

Graph a Linear Equation by Plotting Points

In the following exercises, graph by plotting points.

43.

y=3x1y=3x1

44.

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

45.

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

46.

y=−3x+1y=−3x+1

47.

y=x+2y=x+2

48.

y=x3y=x3

49.

y=x3y=x3

50.

y=x2y=x2

51.

y=2xy=2x

52.

y=3xy=3x

53.

y=−4xy=−4x

54.

y=−2xy=−2x

55.

y=12x+2y=12x+2

56.

y=13x1y=13x1

57.

y=43x5y=43x5

58.

y=32x3y=32x3

59.

y=25x+1y=25x+1

60.

y=45x1y=45x1

61.

y=32x+2y=32x+2

62.

y=53x+4y=53x+4

63.

x+y=6x+y=6

64.

x+y=4x+y=4

65.

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

66.

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

67.

xy=2xy=2

68.

xy=1xy=1

69.

xy=−1xy=−1

70.

xy=−3xy=−3

71.

x+y=4x+y=4

72.

x+y=3x+y=3

73.

xy=5xy=5

74.

xy=1xy=1

75.

3x+y=73x+y=7

76.

5x+y=65x+y=6

77.

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

78.

4x+y=−54x+y=−5

79.

2x+3y=122x+3y=12

80.

3x4y=123x4y=12

81.

13x+y=213x+y=2

82.

12x+y=312x+y=3

Graph Vertical and Horizontal lines

In the following exercises, graph the vertical and horizontal lines.

83.

x=4x=4

84.

x=3x=3

85.

x=−2x=−2

86.

x=−5x=−5

87.

y=3y=3

88.

y=1y=1

89.

y=−5y=−5

90.

y=−2y=−2

91.

x=73x=73

92.

x=54x=54

In the following exercises, graph each pair of equations in the same rectangular coordinate system.

93.

y=12xy=12x and y=12y=12

94.

y=13xy=13x and y=13y=13

95.

y=2xy=2x and y=2y=2

96.

y=5xy=5x and y=5y=5

Mixed Practice

In the following exercises, graph each equation.

97.

y=4xy=4x

98.

y=2xy=2x

99.

y=12x+3y=12x+3

100.

y=14x2y=14x2

101.

y=xy=x

102.

y=xy=x

103.

xy=3xy=3

104.

x+y=5x+y=5

105.

4x+y=24x+y=2

106.

2x+y=62x+y=6

107.

y=−1y=−1

108.

y=5y=5

109.

2x+6y=122x+6y=12

110.

5x+2y=105x+2y=10

111.

x=3x=3

112.

x=−4x=−4

Everyday Math

113.

Motor home cost The Robinsons rented a motor home for one week to go on vacation. It cost them $594$594 plus $0.32$0.32 per mile to rent the motor home, so the linear equation y=594+0.32xy=594+0.32x gives the cost, y,y, for driving xx miles. Calculate the rental cost for driving 400,800,and1,200400,800,and1,200 miles, and then graph the line.

114.

Weekly earning At the art gallery where he works, Salvador gets paid $200$200 per week plus 15%15% of the sales he makes, so the equation y=200+0.15xy=200+0.15x gives the amount yy he earns for selling xx dollars of artwork. Calculate the amount Salvador earns for selling $900, $1,600,and$2,000,$900, $1,600,and$2,000, and then graph the line.

Writing Exercises

115.

Explain how you would choose three x-valuesx-values to make a table to graph the line y=15x2.y=15x2.

116.

What is the difference between the equations of a vertical and a horizontal line?

Self Check

After completing the exercises, use this checklist to evaluate your mastery of the objectives of this section.

.

After reviewing this checklist, what will you do to become confident for all objectives?

Citation/Attribution

Want to cite, share, or modify this book? This book is Creative Commons Attribution License 4.0 and you must attribute OpenStax.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:
    Access for free at https://openstax.org/books/prealgebra-2e/pages/1-introduction
  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:
    Access for free at https://openstax.org/books/prealgebra-2e/pages/1-introduction
Citation information

© Sep 2, 2020 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution License 4.0 license. The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.