letx=

Coordinate geometry

Slopes of perpendicular lines

Two lines are perpendicular when their slopes multiply to −1: flip the slope and change its sign.

m1·m2=−1⇔m2=−1m1
Parallel linesm2=m1

Calculator

The live calculator needs JavaScript. The worked example below shows the same steps it would.

See it move

−12−10−8−6−4−224681012−6−4−2246slope 2
  • m₂ = −1/m₁ = −0.5; m₁ × m₂ = −1
  • Rotating a line by 90° swaps rise and run and changes one sign, so the slope becomes −run/rise.

What the symbols mean

m1
the slope of the first line (not 0)
m2
the slope of the perpendicular line

When to use it

Use it to write the equation of a line perpendicular to a given line (for example the normal to a curve, the perpendicular bisector of a segment, or the shortest path from a point to a line), and to check whether two lines or two sides of a shape meet at a right angle. It does not apply to horizontal and vertical lines: those are perpendicular, but a vertical line has no slope.

Worked example

A line has slope m₁ = 2. What is the slope of a line perpendicular to it?

  1. Start from the formula.

    m2=−1m1
  2. Substitute m1 = 2 and work it out.

    m2=−12
    =−0.5
  3. Check: 2×(−0.5)=−1. A parallel line would keep the same slope, 2.

Answer m₂ = −0.5

Why it works

Rotating a line by 90° turns a step of (1, m) into a step of (−m, 1), whose slope is 1/(−m)=−1/m.

Common mistakes

  • Only changing the sign (2 becomes −2) or only taking the reciprocal (2 becomes ½). Do both: −½.
  • Confusing perpendicular with parallel. Parallel lines have equal slopes.
  • Applying it to a horizontal line: its perpendicular is vertical, with undefined slope.