Lines and Slope || Chameleon Home || Ask Dr. Math

Horizontal and Vertical Lines

Lines that never slant up or down are called horizontal lines. Here is a picture of some horizontal lines:

These lines look parallel. Are they? Let's check by calculating their slopes.

m = (y2 - y1) / (x2 - x1)

Red line:
m = (3 - 3) / (3 - 1)
= 0 / 2
= 0
Blue line:
m = (2.5 - 2.5) / (5 - 2)
= 0 / 3
= 0
Green line:
m = (1 - 1) / (4 - 1)
= 0 / 3
= 0

All three horizontal lines have a slope of 0, so they must all be parallel. In fact, every horizontal line has a slope of 0. Why is this true? Since a horizontal line never moves up or down, its y-coordinates never change. That means the "change in y-coordinates" is 0. When we divide by the change in x-coordinates to find slope, our final answer will be 0.

Vertical lines go straight up and down. Here is a picture of a vertical line. In this picture, Joan's tongue is also vertical.

Joan's tongue and the green line look parallel. In fact, like horizontal lines, vertical lines are always parallel to each other. Will all vertical lines have the same slope?

Let's try to calculate the slope of the green line. We can pick any two points on the line for our calculation: let's use (1, 0) and (1, 4).

m = (y2 - y1) / (x2 - x1)
= (4 - 0) / (1 - 1)
= 4 / 0

We can't divide by zero, so we can't find the slope of this line. If we try to find the slope of Joan's tongue, will we run into the same problem? Let's use points (4, 2) and (4, 3).

m = (y2 - y1) / (x2 - x1)
= (3 - 2) / (4 - 4)
= 1 / 0

Once again, we can't find the slope because we can't divide by zero. Because we can't find it, we say that the slope is undefined. Whenever we try to find the slope of a vertical line, we will run into the dividing-by-zero problem. This means that the slope of every vertical line is undefined.