# Vertical Lines & Horizontal Lines and Their Slopes

Hello, in my discrete mathematics for Information Technology, my instructor asked this question of us: Discuss in your own words if it makes sense that a vertical line has an infinite slope and a horizontal line has a slope of zero.

The slope of a vertical line is undefined.

The slope of a horizontal line is zero.

Think about what slope is and it will make sense. Slope is rise over run and and be found by using 2 points on the line, (x1,y1) and (x2,y2)

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

On a horizontal line all the y values are the same so y2-y1 will always be zero so the slope will be zero regardless of what x2-x1 equals.

On a vertical line all the x values are the same so x2-x1 will always be zero. Dividing by zero is undefined so the slope is undefined.

My brother has told me this is incorrect, but refuses to explain it. Can someone please confirm this?

• Consider lines getting more and more vertical (i.e. having steeper and steeper slope) and you'll see why it makes sense to say that a vertical line has infinite slope. Apr 4 '13 at 22:10

It's a good question from your instructor because it prompts you to think about infinity, and by thinking about infinity sufficiently precisely you can argue for both answers.

If this is to make any sense, it needs to be considered as a limiting case. But a vertical line is a limiting case of both a line with slope $+\infty$ and a line with slope $-\infty$. For instance, we can make this precise by considering a line with slope $m$ given by

$$\vec r(s)=\vec r_0+\frac s{\sqrt{1+m^2}}\pmatrix{1\\m}\;,$$

where $s$ is the distance along the line. If we take $m$ to $\pm\infty$, $\vec r(s)$ converges pointwise to $\vec r_0\pm s\vec e_z$, so the locus of the limits is a vertical line. Thus a vertical line can equally well be described by a slope of $+\infty$ or a slope of $-\infty$, so it makes no sense to say that it has slope $+\infty$.

But who said that "infinity" means $+\infty$? Consider the slope represented not on the real line, by the number $m$, but on the unit circle, by the point at which the line through $(0,m)$ and $(1,0)$ meets the unit circle. Now taking $m$ to $+\infty$ or $-\infty$ leads to the same limit point $(1,0)$. Nothing forces us to add two different infinities to the real line, one at each "end". Though this is useful for many purposes, it's not useful when we consider the real line as representing the set of possible slopes. The construction indicates how we can consistently add a single infinity to that set and consider both $m\to+\infty$ and $m\to-\infty$ as the same limit where the slope, represented on the unit circle, goes to the point $(1,0)$. In this sense, it makes sense to say that a vertical line has infinite slope.

Complicated proofs aside, there's a simple way to prove this on a coordinate plane:

Draw a vertical line going through (0,0). Think about the definition of a slope, $\Delta$Y/$\Delta$X. The change in Y ($\Delta$Y) can be anything, depending upon how far up the line you go - so let's call $\Delta$Y n. Now, the change in X ($\Delta$X) is zero. No matter how high up on the line you get - no matter what the value of Y is - $\Delta$X is always 0. So, we can say that the slope of a vertical line is n/0. But is that undefined? In a way, it is, so your brother isn't technically wrong. But it can also be thought of as infinity: Take a diagonal line with slope 1/1. 1/1 is the same as 1. Now, take a diagonal line with a steeper slope - let's say 2/1. 2/1 is the same as 2. If we take a steeper line, we find that $\Delta$Y/$\Delta$X gets bigger and bigger, until it approaches infinity - or, in other words, the limit of $\Delta$Y/$\Delta$X approaches infinity. In this way, the slope of a vertical line can be thought of as infinity - because once you get to that vertical line, the slope is infinity.

Side Note: This is how my math teacher showed that anything divided by 0 equals infinity - the slope of a straight line is both n/0, undefined, AND infinity, thus showing that n/0 equals infinity.

Presumably, your brother is thinking that the slope is infinity. You're actually both right - it's both undefined and infinity. You should decide for yourself how you want to respond to the question and your brother, but I think your safest bet is to explain that the slope is both undefined and infinity. However, you might want to say that the slope is infinity and leave it there - saying that it is undefined has the connotation of saying that it has no slope. That's obviously not true, but your instructor could take it that way.

Side Note #2: It's probably too late for this to help anything - almost two years late - but I hope this clears up any controversy or doubt you had in your mind as to what the slope of a vertical line is.

Hope this helped!

However, being charitable to your brother one might say that you and he are both correct. This seeming paradox stems from the fact that context matters. Assuming that Joriki's interpretation of your brother's answer accurately represents what your brother intended, then expanding the universe to include infinity results in an interpretation where a vertical line can be said to have an infinite slope. Your answer is also correct, if the universe of discourse is the restricted to the real numbers. In that case $a/0$ is undefined, as you indicated.

I'm not going to interfere in family matters; you kids will have to work it out on your own, through non-mathematical means. Hint: hitting and shouting are generally unproductive.

If a line had an undefined slope I would not be able to draw it. I can draw a vertical line. It must therefore have a defined slope.