Comparing the slopes of two lines tells you whether they are parallel or perpendicular1.
| Slopes | Relation |
|---|---|
| parallel | |
| perpendicular |
Two lines with equal slopes are parallel and never meet. For example and both have slope : they rise at the same rate as increases, so they stay a fixed distance apart and never cross. Indeed, setting gives , which no satisfies, so there is no solution.
Two lines whose slopes multiply to meet at a right angle. If is the slope perpendicular to a line of slope , then , so . The line with slope through is , and it crosses there at a right angle.
A line of slope rises by for every step of to the right, so it points along the direction ; a line of slope points along . Two directions are perpendicular exactly when their dot product vanishes.
One pair escapes this rule: a horizontal line and a vertical line . They plainly meet at a right angle, but has no slope at all, so no product can be formed. Whenever perpendicularity is decided by slopes, this case must be handled separately.
Taking the point on and applying the point-to-line distance formula to gives the following.
Because the lines are parallel, this value is the same wherever it is measured, and it is the distance between them.
The graph shows two parallel lines of slope and one line perpendicular to them, with the large dot at their right-angle crossing.