Graph a horizontal or vertical line

In coordinate geometry, horizontal and vertical lines are special types of straight lines that are easy to graph because their equations are simple.


Definition:
A horizontal line runs left to right and is parallel to the x-axis.

Equation form:

y=c

where c is a constant (a fixed number).

Characteristics:

  • The y-coordinate is always the same for every point on the line.
  • The slope of a horizontal line is 0.

Example:
Equation: y=3
This means the line passes through all points where y = 3, such as (0,3), (2,3), (−4,3), etc.

Graphing steps:

  • Draw a horizontal line passing through y = 3 on the y-axis.
  • The line extends infinitely left and right.

Definition:
A vertical line runs up and down and is parallel to the y-axis.

Equation form: x=k where k s a constant (a fixed number).

Characteristics:

  • The x-coordinate is always the same for every point on the line.
  • The slope of a vertical line is undefined.

Example:
Equation: x=−2
This means the line passes through all points where x = −2, such as (−2,0), (−2,5), (−2,−3), etc.

Graphing steps:

  • Draw a vertical line passing through x = −2 on the x-axis.
  • The line extends infinitely up and down.

Type of LineEquationSlopeDescription
Horizontal liney=c0Parallel to x-axis
Vertical linex=kUndefinedParallel to y-axis

  1. Graph the line y=4 on the coordinate plane.
  2. Graph the line x=−1 on the coordinate plane.
  3. Identify if the line y=−5 is horizontal or vertical.
  4. What is the slope of the line x=0?

Learn with an example

The equation y=2 tells you that every y-value is 2.
First plot some points that have a y-value of 2, such as (–3,2) and (–1,2).

Now draw a line connecting the points.

y=–6

💡The graph of y=–6 is a horizontal line. Every y-value is –6, including the y-intercept.

The equation y=–6 tells you that every y-value is –6.

First plot some points that have a y-value of –6, such as (–4,–6) and (5,–6).

Now draw a line connecting the points.

Let’s Practice!