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.

## Integrated math 1

### Course: Integrated math 1>Unit 4

Lesson 3: Horizontal & vertical lines

# Slope of a horizontal line

When two points have the same y-value, it means they lie on a horizontal line. The slope of such a line is 0, and you will also find this by using the slope formula. Created by Sal Khan and Monterey Institute for Technology and Education.

## Want to join the conversation?

• I know this question is "dumb" but can someone explain me why is Y/X and not X/Y? explain me like im 5 :) • It is simply the way it has been defined. If some mathematician had decided hundreds of years ago that slope was run over rise, then we would all be taught that instead.

Of course, it probably also has a lot to do with how the coefficient is represented in slope-intercept form which also happens to be the most useful form for defining the line as a function.
• can someone explain to me how to get slope of parallel and perpendicular lines? • why is it called rise over run • Simply put, the slope is called "rise over run" because to get from point A to point B, we rise (move vertically) a certain amount of units and then run (move horizontally) a certain amount of units.

Example: If we have a slope of 2 on the line (y = 2x + 1), we rise 2 units and run 1 unit to get from one point to another. Note: 2 can be thought of 2/1 -- they are the same thing, right? Start at the point (0, 1). The next point on the graph would be (1, 3). How did we get there? We first started by moving 2 units up in the y direction then got to our destination by moving 1 unit in the x direction.

Example: If we have a slope of 3/4 on the line (y = (3/4)x), we rise 3 units in the y direction and then 4 units in the x direction. Start at point (0,0). How would we find a second point on the graph? Well, we rise 3 units giving us a y value of (3) and run 4 units giving us an x value of (4); that gives us an ordered pair of (4,3).

What would be our third point? Well, from our second point at (4,3), we rise 3 units and run 4 units; that gives us a point at (8,6).
• Why when I do the questions/quiz/practice is the correct answer sometimes 'Undefined' and not 0? • Great question!
It's something we definitely need to know, and we can calculate the answer as well!

★↔️ Horizontal lines, (flat side to side), always have Zero Slopes.

When we calculate the slope…
Difference of y ÷ Difference of x
∆y/∆x
the Numerator will always equal zero, because the y value subtraction on a Horizontal line is always the same number minus itself.

So…
Horizontal ↔️ Lines
the slope math: ∆y/∆x
will always = 0/∆x←zero on top
no matter what the Change in x is, it will always divide into zero, zero times.

Which is why a Horizontal line always has a Zero slope!

★↕️ Vertical lines, (straight up and down), always have Undefined Slopes.

When we calculate the slope…
Change in y ÷ by Change in x
∆y/∆x
the x subtraction in the Denominator always equals zero, (a number minus itself), so it becomes a divide by zero situation, in arithmetic we learned is Undefined.

So…
Vertical ↕️ Lines…
the slope math: ∆y/∆x
always = ∆y/0←zero on bottom
It doesn't matter what the y-difference is because it's divided by the x-difference (that is always zero), and division by zero is 'Undefined'.

Which is why a Vertical line always has an Undefined slope!

★So if we forget which is which, we can calculate the slope and see for ourselves!

(≧▽≦) I hope that helps someone!
• At the practice of this, they say that the slope of a vertical line is always undefined.
why ? • Because there is no change in x which also mean there is no change in y, it won't be considered to have a slope. (It's a line but It has no slope)
In mathematical way: slope = y/0 = undefined

Also if you learn trigonometry, slope = tan a (opposite over adjacent)
vertical line is 90 degree, tan 90 = undefined

Edit:
My mistake, there's actually change in y, you can check the explanation in this answer comment.

Also, you can compare it with horizontal lines, it has a slope because there is a change of x but since it doesn't change y value, slope in horizontal line is 0
While in vertical, there is no change on x so we call it undefined.

This happen because slope is rate of change in line. In math, we usually define rate of change as: change of vertical over change of horizontal.
• To make an equation with a horizontal line of a slope of 0 would it be y= or x=? • Is this question answerable: Find the slope of the line that goes through ordered pairs
(8,7) and (8,9). I know it is a vertical line but does that mean its impossible to calculate. • what if the Line is a diagnol that goes up then down but ends on -1 and starts on -1. Is the Slope still 0?   