Horizontal and Vertical Lines
Horizontal lines are parallel to the x-axis. Look at the graph below.
Notice that two points on the line are (-1, 3) and (2, 3).
Apply the formula:
So, the slope of the line is 0. In fact, all points along a horizontal line will have the same y-coordinate, so the slope of any horizontal line is 0.
What is the slope of a vertical line?
(-1, 2) and (-1, -3) are points on the line.
Apply the formula:
Division by 0 is undefined, so the slope of a vertical line is undefined.