Two lines can relate to each other in exactly two special ways: they can run alongside each other forever, or they can cross at a square corner. Both relationships live entirely in the slope — one copies it, the other turns it a quarter turn. Drag the indigo line below and watch its two partners follow.
One line and its two partners
The two rules, and the one exception
Parallel means: copy the slope, change the intercept. Two lines are parallel exactly when m1 = m2andb1 ≠ b2. That second half matters — if the intercepts match too, you have not drawn two parallel lines, you have drawn the same line twice.
Perpendicular means: flip the fraction and change the sign. Two lines meet at a square corner exactly when m1 · m2 = −1, which is the same as saying m2 = −1 ÷ m1. Slope 2⁄3 pairs with −3⁄2; slope 5 pairs with −1⁄5.
The exception nobody warns you about. The product rule needs both slopes to exist and to be nonzero. A horizontal line has m = 0, and −1 ÷ 0 is undefined — so the formula simply refuses to answer. A vertical line has no slope at all, so it cannot be multiplied by anything. Yet horizontal and vertical lines obviously do meet at a perfect right angle. That pair is genuinely perpendicular; it is just the one pair you must recognize by sight instead of by arithmetic.
m = 0drag the line to begin
Anchor point — the corner where the right angle sits
x1−1
y1−1
Direction point — sets which way the line leans
x23
y22
Slide the parallel partner away3
Drag either dot straight on the grid, or nudge a slider with the arrow keys.