Skip to content
MasterMath

Parallel and Perpendicular Lines

Compare two slopes and find out whether the lines are parallel, perpendicular or simply crossing, and at what angle.

The lines are

—

The lines are—
Angle between them—
Product of the slopes—
Why—

How it was solved

    The formula

    parallel if m₁ = m₂ · perpendicular if m₁ × m₂ = −1

    Why it works

    Slope is direction, so two lines with the same slope point the same way and never meet. Perpendicularity is less obvious: rotating a line by 90° turns a slope of m into −1/m, which is why the product of perpendicular slopes is always −1.

    How to solve it by hand

    1. Compare the two slopes: equal means parallel
    2. Multiply them: −1 means perpendicular
    3. Otherwise the lines simply cross
    4. For the angle, take the arctangent of the difference over one plus the product

    What is worth knowing

    The −1 rule has one exception worth knowing: a vertical and a horizontal line are perpendicular, but the vertical one has no slope, so the product cannot be formed. It is the same edge case that makes the slope of a vertical line undefined rather than infinite. Parallel is also weaker than it sounds — two lines with the same slope and the same y-intercept are not parallel, they are the same line. Whether that counts as parallel is a convention that differs between textbooks, which is worth checking before an exam.

    Frequently asked questions

    When are two lines parallel?

    When they have the same slope. If the y-intercepts also match, they are the same line rather than two parallel ones.

    Why is the product of perpendicular slopes −1?

    Because rotating a line by 90° turns slope m into −1/m, and m × (−1/m) = −1.

    What about vertical and horizontal lines?

    They are perpendicular, but the rule cannot be applied: the vertical line has no slope to multiply.

    How do I find the angle between two lines?

    Take the arctangent of (m₂ − m₁) divided by (1 + m₁m₂). It gives the acute angle between them.