6.3.2: Graphing Vertical and Horizontal Lines

Learning Objectives

Type your learning objectives here.

  • Graph a vertical line
  • Give the equation of a vertical line
  • Graph a horizontal line
  • Give the equation of a horizontal line

Key words

Type your key takeaways here.

  • vertical line: a line that runs in the same direction as the y-axis
  • horizontal line: a line that runs in the same direction as the x-axis

Vertical and Horizontal Lines

Consider the vertical line graphed in figure 1, and the solution table that goes with it.

 

x=2

x y
2 -3
2 -1
2 0
2 1
2  3

 

 

No matter the value of yx=2. So x=2 is the equation of the line.

Figure 1.

VERTICAL LINES

The equation of a vertical line is given as: x=c where c is a constant.

To graph the equation on the coordinate plane, we need both x and y variables in the equation. Therefore, the equation of the vertical line in two variables is: x+0y=c where c is a constant.

Consider the horizontal line graphed in figure 2, and the solution table that goes with it.

 

y=3

x y
-3 3
-1 3
0 3
2 3
4  3

 

 

No matter the x-value, the y-value is always 3. So the equation of the line is y=3.

Figure 2.

HORIZONTAL LINES

The equation of a horizontal line is given as: y=c where c is a constant.

To graph the equation on the coordinate plane, we need both x and y variables in the equation. Therefore, the equation of the horizontal line in two variables is 0x+y=c.

Suppose we want to graph a the lines with equations x+0y=3 and 0x+y=2.

The following points satisfy the first equation: (3,5),(3,1),(3,3), and (3,5). We can plot the points. Notice that all of the xcoordinates are the same and we find a vertical line through x=3.

The following points satisfy the second equation: (2,2),(0,2),(3,2), and (5,2). The graph is a horizontal line through y=2. Notice that all of the ycoordinates are the same.

Coordinate plane with the x-axis ranging from negative 7 to 4 and the y-axis ranging from negative 4 to 4. The function y = negative 2 and the line x = negative 3 are plotted.= −3 is a vertical line.
= −2 is a horizontal line.

try it

Use an online graphing tool to graph the following:

  1. A horizontal line that passes through the point (-5,2)
  2. A vertical line that passes through the point (3,3)

Example

Find the equation of the line passing through the given points: (1,3) and (1,4).

Solution

The xcoordinate of both points is 1. Therefore, we have a vertical line: x=1.

Try It

Find the equation of the line passing through (5,2) and (2,2).