How to Graph Vertical and Horizontal Lines

The equation of a vertical line comes in the form

x=a where a is a constant

where a is just a constant

Notice that this equation doesn’t contain any variable y. The absence of y means that it can take any values. Here’s an example.

An Example of Graphing a Vertical Line

Graph the vertical line x = 3.

The equation doesn’t have the variable y which implies that it could assume any numerical values for y. In the table of values, you will see that “3” is the repeating value in the column of x while having different values in the column of y.

This is precisely the interpretation of the equation x = 3.

a table with x values of 3, 3, 3, 3, 3 and y values of -2, -1, 0, 1, 2.

So, we can now plot the points on the xyaxis to see how it looks. As you can see, it is a vertical line parallel to the y-axis and passing through the point \left( {3,0} \right).

a vertical line on the xy axis with plotted points (3,-2), (3,-1), (3,0), (3,1) and (3,2)

On the other hand, the equation of a horizontal line comes in the form

y=c where c is a constant

where c is just a constant

This time around, the equation doesn’t have any variable x. The absence of x means that the variable x can take any numerical values while the value of y is being held constant. Here’s an example.

An Example of Graphing a Horizontal Line

Graph the horizontal line y = - 2.

Since we have no x-variable in the equation, it is okay to pair the y-coordinate of - 2 with any x-values. When you construct the table of values for this, the y-coordinates will be the same throughout while the x-coordinates can have different values.

Observe, the y-column is populated with the same value of - 2.

a table of values with x values of -2, -1, 0, 1, 2 while with y values of -2, -2, -2, -2, -2.

Graphing these points in the xy-axis, we have a horizontal line parallel to the x-axis and passing through the point \left( {0, - 2} \right).

a horizontal line plotted on the xy axis passing through the points (-2,2), (-1,-2), (0,-2), (1,-2), and (2,-2)