Horizontal and vertical lines: equations and slope (IMRA 2026 publisher-initiated change)

Learn this with friends

MathsAlgebra 1 (TX TEKS) IMRA 2026 publisher-initiated changes4:304 check-ins

About this video

The video finds the equation and slope of a vertical line through (5, 1) and a horizontal line through (-3, -4). A vertical line has an equation like x = 5 and an undefined slope because the change in x is zero; a horizontal line has an equation like y = -4 and a slope of zero because the change in y is zero.

You'll be able to

  • write the equation of a vertical line as x = a number and a horizontal line as y = a number.
  • explain why a vertical line has an undefined slope.
  • explain why a horizontal line has a slope of zero.
  • translate 'parallel to' or 'perpendicular to' an axis into vertical or horizontal.

Key words

slope
How steep a line is: the change in y divided by the change in x between two points on the line.
undefined slope
The slope of a vertical line, which would mean dividing by a change in x of zero.
zero slope
The slope of a horizontal (flat) line, where y never changes as x changes.
parallel
Two lines that run in the same direction and never meet.
perpendicular
Two lines that meet at a right angle.
Transcript

- [Instructor] We're told that a line passes through the point 5,1 and is parallel to the y-axis. So what I'd like you to do is ideally draw it, but at least think about what is the slope of that line going to be, and what is the equation of that line going to be?

And you could figure out either of those in either order. Okay, so first let's try to visualize this. So let me draw my axes here. So that's my x-axis. This is my y-axis. Now the point 5,1, the x-coordinate is five, so it'll be one, two, three, four, five, and then one in the y direction.

So that's the point right over there. It goes through 5,1 and it's parallel to the y-axis. So it's going to go straight up and down. It's going to look like this. It's going to look like that. That is our line. So actually, let's figure out the equation before we do the slope.

What is the equation of this line going to be? Well, this line, no matter what y is, x is just going to be equal to five. So the equation here is just x equal five. It no way does it involve y. It's just always x is equaling five, and it equals that for all of the y's, and so it has a straight vertical line.

So maybe a more interesting question is what is the slope of this line? Well, you might already see, hey, this is straight vertical. Something fishy is going on here. But we could just take two points on the line. That's one way to define the slope. It is equal to the change in y over the change in x.

And let's just take two points on this line. Let's say the slope between the point 5,1, and actually let's say this point right over here, 5,2, that's also on the line. So what's our change in y? It's two minus one. So our change in y is two minus one. Over what's our change in x? well, the x is always five.

So any change in x between two points in this line is just going to be zero. So because we're dividing by zero, we would say that this slope is un, undefined. All right, now let's do another example, but this time, let's go in the other direction. So here we're told that a line passes through the point

- 3,-4 and is perpendicular to the y-axis. So let's also try to figure out its equation and its slope. So let me draw my axes here. So that's my x-axis. And let's see, this is -3,-4. So I want to make sure I have enough space to draw this. So maybe it looks something like this.

That's my y-axis. And then, let's see, I'm going to go -3. One, two, three. That's x equals -3. One, two, three, four, that's y equals -4. The point is going to be right over here. And the line is perpendicular to the y-axis. So perpendicular to the y-axis is really just another way of saying it's parallel to the x-axis.

So the line is going to go like this. It's going to go like that. Now what's the equation of that line? Well, no matter what x value you pick, the line, the value of y is always going to be equal to -4. So the equation is y is equal to -4. Now what's the slope? Well, same idea.

What's our change in y over change in x between two points on this? Well, let's say, let's pick the point, maybe it's easy to go to 0,-4, this point right over here. So that point right over there is 0,-4. So what's our change in y? Well, our change in y is going to be between, this is, remember, this is -3,-4.

Our change in y is -4 minus -4. We know where that's going. That's just going to be zero. Our change in x, we could say 0 minus -3, 0 minus -3. This is the numerator here's going to be zero, denominator here is going to be three. Well, this is just zero, no matter what two points you pick.

And they will have different x values. So the change in x will have some value here, so it's not going to be undefined like the first example. But the ys are going to be the same. Y is always equal to negative four. This line has a zero slope. And in general, when you think zero slope, you say, "Hey, there's no change in y for any change in x.

We just have a flat line."

Video © Khan Academy, used under CC BY-NC-SA. Watch on Khan Academy. Puzzicle is not affiliated with Khan Academy.