Skip to calculator

Learn

The four types of slope.

Positive, negative, zero and undefined — what each one looks like on a graph, what its equation is, and why a vertical line has no slope rather than an infinite one.

Positive slope

m > 0
XY−555run 6rise 6

The line rises from left to right. As x increases, y increases.

A positive slope means the two quantities move together. The larger the number, the steeper the climb: a slope of 5 is five times steeper than a slope of 1.

Negative slope

m < 0
XY−555run 6rise −6

The line falls from left to right. As x increases, y decreases.

Steepness is given by the size of the number, ignoring the sign. A slope of −4 is steeper than a slope of −1, and both descend.

Zero slope

m = 0
XY−555

The line is horizontal. y never changes, whatever x does.

The rise is zero, so the fraction is 0 divided by something, which is 0. The equation is always y = c. Note that zero is a perfectly good slope — it is not the same as having no slope.

Undefined slope

m is undefined
XY−555

The line is vertical. x never changes, so there is no slope at all.

The run is zero, and dividing by zero produces no value. The equation is always x = c. This is the only one of the four with no number you can write down.

Telling Zero and Undefined Apart

These two are swapped constantly, and the confusion is understandable — both describe a line that is "not really sloping". The distinction lives in which part of the fraction goes to zero.

horizontal: m = 0 ÷ run = 0
vertical: m = rise ÷ 0 = undefined

A phrase that sticks: zero rise, zero slope; zero run, no slope at all. Or think about walking the line. On a horizontal line you walk without climbing — a real, measurable steepness of nothing. On a vertical line you cannot walk it at all, and the question of steepness stops making sense.

Undefined Is Not Infinite

It is tempting to say a vertical line has infinite slope, and the intuition behind it is sound: as a line tilts closer and closer to vertical, its slope does grow without bound. 10, then 100, then 10,000.

But there is a difference between a quantity growing without limit as you approach a point and having a value at that point. At exactly vertical, the run is zero, and the division cannot be carried out. There is nothing to write down. "Undefined" says precisely that: the operation has no answer. "Infinite" would claim the operation produced one.

There is a practical consequence too. A vertical line has no y-intercept and cannot be written as y = mx + b at all. Its only equation is x = c, which is why slope-intercept form cannot describe every line.

Comparing Steepness

Steepness is the size of the slope, ignoring the sign. The sign only tells you the direction. So −8 is steeper than 3, even though 3 is the larger number:

  • |m| greater than 1 — the line is steeper than 45°.
  • |m| equal to 1 — exactly 45°, rising or falling.
  • |m| less than 1 — shallower than 45°.

Parallel and Perpendicular

Two lines can be compared by their slopes alone:

  • Parallel — equal slopes. They never meet, because they climb at exactly the same rate.
  • Perpendicular — slopes that multiply to −1. Each is the negative reciprocal of the other, so 2 pairs with −1/2, and 3/4 pairs with −4/3.

Horizontal and vertical lines are the exception that proves the rule. They are perpendicular to each other, but you cannot multiply their slopes to check, because one of them has no slope to multiply. The negative-reciprocal test only works when both lines have a defined slope.

To identify the type of any line from its own numbers, put them into the slope calculator — it names the type and explains the result in words alongside the graph.

Common Questions

What are the four types of slope?

Positive, negative, zero and undefined. A positive slope rises from left to right, a negative slope falls, a zero slope is a horizontal line, and an undefined slope belongs to a vertical line where the run is zero.

Is a vertical line’s slope zero or undefined?

Undefined. It is the horizontal line that has a slope of zero. The two are easy to swap by mistake: zero slope means no rise, undefined slope means no run.

Why is a vertical slope undefined rather than infinite?

Because division by zero has no result, not a very large one. As a line gets closer to vertical its slope does grow without bound, but at exactly vertical the calculation stops being possible. Calling it infinity would imply the arithmetic produced a value, and it did not.

Which type of slope is steepest?

A vertical line is the steepest possible, though it has no slope value. Among lines that do have a slope, steepness is measured by the size of the number regardless of sign, so −8 is steeper than 3.

How do parallel and perpendicular lines relate to slope?

Parallel lines have equal slopes. Perpendicular lines have slopes that multiply to −1, so each is the negative reciprocal of the other — a line with slope 2 is perpendicular to one with slope −1/2.