Parallel and perpendicular slopes, with the vertical-line exception

Parallel nonvertical lines share a slope. Perpendicular nonvertical lines have slopes whose product is −1—but vertical and horizontal lines need separate language.

LaTeX article Updated July 13, 2026

m=mm=1mm_{\parallel}=m\qquad m_{\perp}=-\frac1m

Parallel means equal direction

Distinct parallel lines rise and run at the same rate, so their slopes match. Their intercepts differ, which keeps the lines from being identical.

Two vertical lines are also parallel even though neither has a numerical slope.

y=3x+1y=3x8y=3x+1\quad\parallel\quad y=3x-8

Perpendicular means a quarter turn

For ordinary nonvertical lines, rotating the direction by ninety degrees swaps rise and run and reverses one sign. That creates the negative reciprocal.

Do not merely change the sign or merely take the reciprocal; both changes matter.

m=25m=52m=\frac25\Rightarrow m_\perp=-\frac52

Handle zero and undefined slopes directly

A horizontal line has slope zero, so its perpendicular partner is vertical and has undefined slope. The reciprocal formula cannot divide by zero.

Likewise, a vertical line is perpendicular to a horizontal line. State the equation x = constant or y = constant instead of inventing an infinite slope.

y=4x=2y=4\quad\perp\quad x=-2

Worked example

Common mistakes

  • Changing only the sign of the slope.
  • Applying the reciprocal rule to slope zero.
  • Using the original line's intercept for the new line.

Keep these ideas

  • Parallel lines share direction.
  • Perpendicular slopes are negative reciprocals when defined.
  • Horizontal and vertical lines are a special pair.
Vocab
Linear function
Math glossaryLinear function
f(x)=mx+bf(x)=mx+b

A function with constant rate of change.

Learn more
Slope
Math glossarySlope
m=ΔyΔxm=\frac{\Delta y}{\Delta x}

The vertical change divided by horizontal change on a nonvertical line.

Learn more
Rate of change
Math glossaryRate of change
ΔyΔx\frac{\Delta y}{\Delta x}

How much one quantity changes per unit change in another.

Learn more
Slope-intercept form
Math glossarySlope-intercept form
y=mx+by=mx+b

Displays a line's slope and vertical intercept directly.

Learn more
x-intercept
Math glossaryx-intercept
f(x)=0f(x)=0

A point where a graph meets the x-axis.

Learn more
Math glossary