Mathematics » Introducing Graphs » Understand Slope of a Line

Finding the Slope of Horizontal and Vertical Lines

Finding the Slope of Horizontal and Vertical Lines

Do you remember what was special about horizontal and vertical lines? Their equations had just one variable.

  • horizontal line \(y=b;\) all the \(y\)-coordinates are the same.
  • vertical line \(x=a;\) all the \(x\)-coordinates are the same.

So how do we find the slope of the horizontal line \(y=4?\) One approach would be to graph the horizontal line, find two points on it, and count the rise and the run. Let’s see what happens in the figure below. We’ll use the two points \(\left(0,\phantom{\rule{0.2em}{0ex}}4\right)\) and \(\left(3,\phantom{\rule{0.2em}{0ex}}4\right)\) to count the rise and run.

The graph shows the x y-coordinate plane. The x-axis runs from -1 to 5. The y-axis runs from -1 to 7. A horizontal line passes through the labeled points “ordered pair 0, 4” and “ordered pair 3, 4”.

What is the rise?The rise is 0.
What is the run?The run is 3.
What is the slope?\(m=\frac{\text{rise}}{\text{run}}\)
 \(m=\frac{0}{3}\)
 \(m=0\)

The slope of the horizontal line \(y=4\) is \(0.\)

All horizontal lines have slope \(0\). When the \(y\)-coordinates are the same, the rise is \(0\).

Definition: Slope of a Horizontal Line

The slope of a horizontal line, \(y=b,\) is \(0.\)

Now we’ll consider a vertical line, such as the line \(x=3\), shown in the figure below. We’ll use the two points \(\left(3,\phantom{\rule{0.2em}{0ex}}0\right)\) and \(\left(3,\phantom{\rule{0.2em}{0ex}}2\right)\) to count the rise and run.

The graph shows the x y-coordinate plane. Both axes run from -5 to 5. A vertical line passes through the labeled points “ordered pair 3, 2” and “ordered pair 3, 0”.

What is the rise?The rise is 2.
What is the run?The run is 0.
What is the slope?\(m=\frac{\text{rise}}{\text{run}}\)
 \(m=\frac{2}{0}\)

But we can’t divide by \(0.\) Division by \(0\) is undefined. So we say that the slope of the vertical line \(x=3\) is undefined. The slope of all vertical lines is undefined, because the run is \(0.\)

Definition: Slope of a Vertical Line

The slope of a vertical line, \(x=a,\) is undefined.

Example

Find the slope of each line:

  1. \(\phantom{\rule{0.2em}{0ex}}x=8\phantom{\rule{0.2em}{0ex}}\)
  2. \(\phantom{\rule{0.2em}{0ex}}y=-5\)

Solution

\(\phantom{\rule{0.2em}{0ex}}x=8\)

This is a vertical line, so its slope is undefined.

\(\phantom{\rule{0.2em}{0ex}}y=-5\)

This is a horizontal line, so its slope is \(0.\)

Definition: Quick Guide to the Slopes of Lines

The figure shows 4 arrows. The first rises from left to right with the arrow point upwards. It is labeled “positive”. The second goes down from left to right with the arrow pointing downwards. It is labeled “negative”. The third is horizontal with arrow heads on both ends. It is labeled “zero”. The last is vertical with arrow heads on both ends. It is labeled “undefined.”

[Attributions and Licenses]


This is a lesson from the tutorial, Introducing Graphs and you are encouraged to log in or register, so that you can track your progress.

Log In

Share Thoughts