If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Algebra I (2018 edition)

### Course: Algebra I (2018 edition)>Unit 5

Lesson 4: Horizontal & vertical lines

# Horizontal & vertical lines

Worked examples identifying the equations and slope of horizontal and vertical lines.

## Want to join the conversation?

• Why is an equation in which you only have the value of y considered to have a slope of 0 (for example the equation at ) but an equation in which you only have the slope of x (for example the equation at ) considered to be undefined?
• Great question! The slope is the change in y over the change in x. In the horizontal line at , there is zero change in y, which means that the slope is 0 divided by the change in x. 0 divided by any number is 0, giving you a slope of 0.
For the example at , there is 0 change in x which means that the slope is the change in y over 0. Since you can't divide by 0, the slope is undefined.

If you don't understand why any number divided by 0 is undefined, I think this video explains it pretty well: https://www.khanacademy.org/math/algebra/x2f8bb11595b61c86:foundation-algebra/x2f8bb11595b61c86:division-zero/v/why-dividing-by-zero-is-undefined

Hope this helps! Great question and have a nice day!
• So if the line is vertical the slope is undefined and if the line is horizontal the slope is 0. Am I understanding it right?
• Dividing by 0 is undefined, this is why a vertical line has an undefined slope.

If this doesn't make sense, let me give you an example. let's say our change in y = 10
and for a vertical line, the change in x = 0 , the slope then equals to change in y/change in x. So 10/0, again, dividing by zero is undefined
• Why does a horizontal line have a slope of O, and a vertical line has an undefined slope?
• Remember, the slope of a line is "change in Y / change in X". You need to think of the slope as a fraction. The numerator tells you the change in Y -- how fast the Y coordinate is changing (how fast the line is going up/down). The denominator tells you the change in X -- how fast the X coordinate is changing (how fast the line is moving left/right).

Horizontal lines do not go up/down. They just move left to right. This means the change in Y = 0, while the change in X = 1. 0/1 = 0 as a slope.

Vertical lines go up/down, but they never go left or right. This means the change in Y = 1, while the change in X = 0. 1/0 = undefined.

Hope this helps.
• At , isn't it a change of -4 because y=-4?
• y=-4 is like y= 0x -4. In order for the x to be 'gone' you would need a zero at its coefficient. since the coefficient of the x is the slope then the slope is zero.
• ehh so if we have the equation of a vertical line, like X=4...it has the possibility for Y to have any value.. but why isn't the Y represented in the equation at all? Couldn't you say x=4 + y(any real numbers) ?
• Think of it this way... the reason "y" is not in the equation is because its coefficient = 0.
x + 0y = 4

You can't make it into x = 4 + y because it would no long be a vertical line.
Hope this helps.
• "this is fun"
• very fun :)
(1 vote)
• I should really be paying attention to the video instead of scrolling through comments.
• fr fr same
(1 vote)
• What's the difference between "0" and "undefined" as slope?
• Since the slope intercept general equation is y = mx + b, if you substitute 0 in for m, then 0x = 0 which disappears, so y = b. Zero slope gives a horizontal line that crosses the x axis at a given y value.
Then, if we tried to substitute an "undefined" value for m, we really could not, but lets just imagine that we try. 1/0 is the simplest undefined number. So y = 1/0 x + b
and once again imagining that I could multiply by 0 to get rid of it on the bottom (but 0/0 is still undefined), we would have 0y = 1x +ob, or just x=0. Thus, this would be a vertical line, but x is not limited to just 0, it could be any number. This vertical line will cross the y axis at a given x value. This would mean that it would also is not a function.