Equations of horizontal and vertical lines

What are Horizontal and Vertical Lines?

  • Horizontal line: A line that runs left to right and is parallel to the x-axis.
  • Vertical line: A line that runs up and down and is parallel to the y-axis.

  • All points on a horizontal line have the same y-coordinate.
  • Equation is:

y=k

where k is a constant (the y-value for all points on the line).

Example:
y=3 means the line passes through all points with y=3, like (0, 3), (4,3), (-2, 3).


  • All points on a vertical line have the same x-coordinate.
  • Equation is:

x=h

where hhh is a constant (the x-value for all points on the line).

Example:
x=−2 means the line passes through all points with x=−2, like (-2, 0), (-2, 5), (-2, -3).


Line TypeEquationSlopeIntercepts
Horizontal liney=kSlope m=0y-intercept = k no x-intercept (unless k=0
Vertical linex=hSlope is undefinedx-intercept = h, no y-intercept (unless h=0)

  • Horizontal line: Draw a straight line through y=k parallel to the x-axis.
  • Vertical line: Draw a straight line through x=h parallel to the y-axis.

  • Write the equation of a horizontal line passing through (2, 5):

y=5

  • Write the equation of a vertical line passing through (-3, 4):

x=−3


Write the equation of:

  1. A horizontal line through (6, -1)
  2. A vertical line through (0, 3)
  3. A horizontal line through (-4, 0)
  4. A vertical line through (7, -5)

x = -1

The equation x = -1 tells you that every x-value is -1.

First plot some points that have an x-value of -1.

Now draw a line connecting the points.

The graph of x = -1 is a vertical line.

y = 8

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

First plot some points that have a y-value of 8.

Now draw a line connecting the points.

The graph of y = 8 is a horizontal line.

Let’s Practice!