Parallel and Perpendicular Lines

Two straight lines written as y = mx + c relate to each other through their gradients alone. There are two special cases worth knowing by heart:

\text{parallel: } m_1 = m_2 \qquad \text{perpendicular: } m_1 m_2 = -1

The intercepts c can be anything — they only slide the lines up or down. It is the gradient that decides how a pair of lines sit relative to one another.

Parallel lines share a gradient

Two lines are parallel when they never meet — they tilt by exactly the same amount. So their gradients are equal:

m_1 = m_2

For example y = 2x + 1 and y = 2x - 4 are parallel: both climb 2 up for every 1 across. Their different intercepts just place one above the other.

Perpendicular lines have negative-reciprocal gradients

Two lines are perpendicular when they cross at a right angle. Their gradients multiply to -1:

m_1 m_2 = -1 \qquad\Longleftrightarrow\qquad m_2 = -\frac{1}{m_1}

We call -\tfrac{1}{m_1} the negative reciprocal: flip the fraction and change the sign. If a line has gradient m_1 = 2, a line perpendicular to it has gradient m_2 = -\tfrac{1}{2}, and indeed 2 \times (-\tfrac{1}{2}) = -1.

See it move

Drag the gradient slider for the first line. Its parallel partner always copies the gradient (just shifted down), and its perpendicular partner always takes the negative reciprocal, meeting it at a right angle.