$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

# 11.4: Graphing Linear Equations (Part 2)

• • Contributed by OpenStax
• Mathematics at OpenStax CNX

$$\newcommand{\vecs}{\overset { \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

## Graph Vertical and Horizontal Lines

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

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

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

x = -3
x y (x, y)
-3 1 (-3, 1)
-3 2 (-3, 2)
-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. Figure 11.12

Definition: Vertical line

A vertical line is the graph of an equation that can be written in the form x = a. The line passes through the x -axis at (a, 0).

Example 11.20:

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

Solution

The equation has only variable, x, and x is always equal to 2. We make a table where x is always 2 and we put in any values for y.

x = -3
x y (x, y)
2 1 (2, 1)
2 2 (2, 2)
2 3 (2, 3)

Plot the points and connect them as shown. The graph is a vertical line passing through the x -axis at 2.

Exercise 11.38:

Graph the equation: x = 5.

Exercise 11.39:

Graph the equation: x = −2.

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

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

We’ll use 0, 2, and 4 for the x -values.

x = -3
x y (x, y)
0 4 (0, 4)
2 4 (2, 4)
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-axis at 4. Figure 11.13

Definition: Horizontal Line

A horizontal line is the graph of an equation that can be written in the form y = b. The line passes through the y-axis at (0, b).

Example 11.21:

Graph the equation y = −1.

Solution

The equation y = −1 has only variable, y. The value of y is constant. All the ordered pairs in the table have the same y -coordinate, −1 . We choose 0, 3, and −3 as values for x.

x = -3
x y (x, y)
-3 -1 (-3, -1)
0 -1 (0, -1)
3 -1 (3, -1)

The graph is a horizontal line passing through the y -axis at –1 as shown. Exercise 11.40:

Graph the equation: y = −4.

Exercise 11.41:

Graph the equation: y = 3.

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

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

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

y = 4x
x y (x, y)
0 0 (0, 0)
1 4 (1, 4)
2 8 (2, 8)
$$\textcolor{red}{y = 4}$$
x y (x, y)
0 4 (0, 4)
1 4 (1, 4)
2 4 (2, 4)

The graph shows both equations. Notice that the equation y = 4x gives a slanted line whereas y = 4 gives a horizontal line.

Example 11.22:

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

Solution

Find three solutions for each equation. Notice that the first equation has the variable x, while the second does not. Solutions for both equations are listed.

$$\textcolor{red}{y = -3x}$$
x y (x, y)
0 0 (0, 0)
1 -3 (1, -3)
2 -6 (2, -6)
y = -3
x y (x, y)
0 -3 (0, -3)
1 -3 (1, -3)
2 -3 (2, -3)

The graph shows both equations. Exercise 11.42:

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

Exercise 11.43:

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

## Practice Makes Perfect

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

For each ordered pair, decide (a) is the ordered pair a solution to the equation? (b) is the point on the line?

1. y = x + 2
1. (0, 2)
2. (1, 2)
3. (− 1, 1)
4. (− 3, 1)
2. y = x − 4
1. (0, − 4)
2. (3, − 1)
3. (2, 2)
4. (1, − 5)
3. y = $$\frac{1}{2}$$x − 3
1. (0, − 3)
2. (2, − 2)
3. (− 2, − 4)
4. (4, 1)
4. y = $$\frac{1}{3}$$x + 2
1. (0, 2)
2. (3, 3)
3. (− 3, 2)
4. (− 6, 0)

### Graph a Linear Equation by Plotting Points

In the following exercises, graph by plotting points.

1. y = 3x − 1
2. y = 2x + 3
3. y = −2x + 2
4. y = −3x + 1
5. y = x + 2
6. y = x − 3
7. y = − x − 3
8. y = − x − 2
9. y = 2x
10. y = 3x
11. y = −4x
12. y = −2x
13. y = $$\frac{1}{2}$$x + 2
14. y = $$\frac{1}{3}$$x − 1
15. y = $$\frac{4}{3}$$x − 5
16. y = $$\frac{3}{2}$$x − 3
17. y = $$− \frac{2}{5}$$x + 1
18. y = $$− \frac{4}{5}$$x − 1
19. y = $$− \frac{3}{2}$$x + 2
20. y = $$− \frac{5}{3}$$x + 4
21. x + y = 6
22. x + y = 4
23. x + y = −3
24. x + y = −2
25. x − y = 2
26. x − y = 1
27. x − y = −1
28. x − y = −3
29. −x + y = 4
30. −x + y = 3
31. −x − y = 5
32. −x − y = 1
33. 3x + y = 7
34. 5x + y = 6
35. 2x + y = −3
36. 4x + y = −5
37. 2x + 3y = 12
38. 3x − 4y = 12
39. $$\frac{1}{3}$$x + y = 2
40. $$\frac{1}{2}$$x + y = 3

### Graph Vertical and Horizontal lines

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

1. x = 4
2. x = 3
3. x = −2
4. x = −5
5. y = 3
6. y = 1
7. y = −5
8. y = −2
9. x = $$\frac{7}{3}$$
10. x = $$\frac{5}{4}$$

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

1. y = $$− \frac{1}{2}$$x and y = $$− \frac{1}{2}$$
2. y = $$− \frac{1}{3}$$x and y = $$− \frac{1}{3}$$
3. y = 2x and y = 2
4. y = 5x and y = 5

## Mixed Practice

In the following exercises, graph each equation.

1. y = 4x
2. y = 2x
3. y = $$− \frac{1}{2}$$x + 3
4. y = $$\frac{1}{4}$$x − 2
5. y = − x
6. y = x
7. x − y = 3
8. x + y = − 5
9. 4x + y = 2
10. 2x + y = 6
11. y = −1
12. y = 5
13. 2x + 6y = 12
14. 5x + 2y = 10
15. x = 3
16. x = −4

## Everyday Math

1. Motor home cost The Robinsons rented a motor home for one week to go on vacation. It cost them $594 plus$0.32 per mile to rent the motor home, so the linear equation y = 594 + 0.32x gives the cost, y, for driving x miles. Calculate the rental cost for driving 400, 800, and 1,200 miles, and then graph the line.
2. Weekly earning At the art gallery where he works, Salvador gets paid $200 per week plus 15% of the sales he makes, so the equation y = 200 + 0.15x gives the amount y he earns for selling x dollars of artwork. Calculate the amount Salvador earns for selling$900, $1,600, and$2,000, and then graph the line.

## Writing Exercises

1. Explain how you would choose three x-values to make a table to graph the line y = $$\frac{1}{5}$$x − 2.
2. What is the difference between the equations of a vertical and a horizontal line?

## Self Check

(a) After completing the exercises, use this checklist to evaluate your mastery of the objectives of this section. (b) After reviewing this checklist, what will you do to become confident for all objectives?