Slope Sketch
Calculator Zero slope vs. undefined slope: why they are different

Untangle a common mix-up

Zero slope vs. undefined slope: why they are different

Horizontal, vertical and repeated-point cases explained side by side.

Zero and undefined slope often get confused because both involve a zero in the formula. The location of that zero makes all the difference: zero divided by a nonzero number is zero; division by zero is undefined.

CaseRiseRunResult
Horizontal0Nonzerom = 0
VerticalNonzero0Undefined slope
Same point twice00No unique line

Horizontal: the y values match

For A = (-3, 2) and B = (3, 2), the rise is 2 − 2 = 0 and the run is 3 − (-3) = 6. Therefore m = 0/6 = 0. The line is y = 2. Moving left or right never changes its height.

Vertical: the x values match

For A = (2, -2) and B = (2, 4), the rise is 6 and the run is 0. The expression 6/0 does not define a real number. The line is x = 2, and its slope is undefined, not zero.

It can be tempting to call the slope “infinity,” but the calculator reports undefined. Infinity is not a real-valued slope that can be substituted into y = mx + b. Very steep nonvertical lines can have very large positive or negative slopes; a vertical line is a separate case.

Identical points: not enough information

If both entries are (2, 4), then both the rise and run are zero. A horizontal line, a vertical line and infinitely many slanted lines all pass through (2, 4). Repeating one point does not choose among them.

A visual way to remember

A horizontal line has no vertical change, so the numerator vanishes. A vertical line has no horizontal change, so the denominator vanishes. Sketching a small rise-and-run triangle usually makes the distinction clearer than memorizing the labels.

Try the horizontal and vertical example buttons in the calculator. Read rise over run to reconnect the formula to a picture, or slope-intercept form to see which equations remain possible.