Horizontal & vertical lines | Mathematics I | High School Math | Khan Academy
What is the equation of the horizontal line through the point (-4, 6)?
So, let's just visualize this. Once you get the hang of it, you might not have to draw a graph, but for explanatory purposes, it might be useful.
So, (-4, 6), so that's going to be in the second quadrant. So, if this is my x-axis, that is my y-axis. Let's see, I'm going to go 4 in the x-direction. So, one, two, three, four, -4. And then, one, two, three, four, five, six in the y-direction. So, the point that we care about is going to be right over there, (-4, 6).
And they're saying, what is the equation of the horizontal line? It is a horizontal line, so it's just going to go straight left-right like this. That is what the line would actually look like. So, what is that equation?
Well, for any x, y is going to be equal to 6. This is the equation y is equal to 6. It doesn't matter what x you input here; you're going to get y equal 6. It just stays constant right over there.
So, the equation is y is equal to 6. Let's do another one of these.
So, here we are asked, what is the slope of the line y is equal to -4? So, let's visualize it, and then in the future, you might not have to draw it like this, but let's just draw our axes again, x-axis, y-axis, and the slope of the line y equals -4.
So, for whatever x you have, y is going to be -4. Let's say that's -4 right over there. And so, the line is y, the line is y = -4. So, I can draw it like this.
So, what's the slope of that? Well, slope is change in y for given change in x. And here, no matter what I change my x, y doesn't change. It stays at -4. My change in y over change in x, it doesn't matter what my change in x is; my change in y is always going to be zero. It's constant.
So, the slope here is going to be equal to zero. y doesn't change no matter how much you change x.
Let's do another one of these. These are, this is fun! All right, so now they are asking us, what is the slope of the line x = -3? Well, let me graph that one.
So, let's again draw my axes real fast, x-axis, y-axis. x is equal to -3, so -1, -2, -3. And so this line is going to look, let me, is going to look like this. No matter what y, or, well, you could say no matter what y is, x is going to be equal to -3. So, it would look like this: x is equal to -3.
So, what's the slope here? Well, it's undefined. A vertical line has an undefined slope. Remember, you want to do, what's your change in y for a change in x, change in y for a change in x?
Well, you could think about what's the slope as you approach this, but once again, that could be, some people would say maybe it's infinite, maybe it's negative infinity, but that's why it's undefined. A vertical line is going to have an undefined slope, so go with undefined.
Let's do one more. What is the equation of the vertical line through (-5, 2)?
So, let me do this one without even drawing it, and then I'll draw it right after that.
So, if we're talking about a vertical line, that means that x doesn't change. x doesn't change. If we were talking about a horizontal line, then we'd say y doesn't change. So, if x doesn't change, that means that x is just going to be equal to some constant value.
Well, if it contains the point (5, -2), so if it has the point where x is equal to 5, and if x never changes, it's a vertical line. Well, that means this equation has to be x is equal to 5.
And we can draw that out if it helps, so let me draw that out. So, whoops! Let me make sure that's a straight line. Okay, so we have x, and we have y, and so we have the point (5, -2). So, 1, 2, 3, 4, 5, -1, 2.
So, we want to have a vertical line that goes through that point. So, a vertical line, well, that just goes straight up and down, so it's just going to look like this. And so, notice x never changes. No matter what y is, x is equal to -5. This has an undefined slope. It is a vertical line. Its equation is x is equal to -5.