Parallel and perpendicular lines

Comparing the slopes of two lines tells you whether they are parallel or perpendicular1.

SlopesRelation
m1=m2m_1 = m_2parallel
m1m2=1m_1 m_2 = -1perpendicular

Parallel lines

Two lines with equal slopes are parallel and never meet. For example y=2x1y = 2x - 1 and y=2x+3y = 2x + 3 both have slope 22: they rise at the same rate as xx increases, so they stay a fixed distance apart and never cross. Indeed, setting 2x1=2x+32x - 1 = 2x + 3 gives 1=3-1 = 3, which no xx satisfies, so there is no solution.

Perpendicular lines

Two lines whose slopes multiply to 1-1 meet at a right angle. If mm is the slope perpendicular to a line of slope 22, then 2m=12m = -1, so m=12m = -\dfrac{1}{2}. The line with slope 12-\dfrac{1}{2} through (1,1)(1, 1) is y=3x2y = \dfrac{3 - x}{2}, and it crosses y=2x1y = 2x - 1 there at a right angle.

Why the product is 1-1

A line of slope mm rises by mm for every step of 11 to the right, so it points along the direction (1,m)(1, m); a line of slope mm' points along (1,m)(1, m'). Two directions are perpendicular exactly when their dot product vanishes.

11+mm=0mm=11 \cdot 1 + m \cdot m' = 0 \quad \Longrightarrow \quad m m' = -1

The case that escapes the test

One pair escapes this rule: a horizontal line y=cy = c and a vertical line x=cx = c. They plainly meet at a right angle, but x=cx = c has no slope at all, so no product can be formed. Whenever perpendicularity is decided by slopes, this case must be handled separately.

The gap between parallel lines

Taking the point (0,1)(0, -1) on y=2x1y = 2x - 1 and applying the point-to-line distance formula to 2xy+3=02x - y + 3 = 0 gives the following.

20(1)+322+(1)2=45\frac{|2 \cdot 0 - (-1) + 3|}{\sqrt{2^2 + (-1)^2}} = \frac{4}{\sqrt{5}}

Because the lines are parallel, this value is the same wherever it is measured, and it is the distance between them.

Applications

  • Dropping a perpendicular from a point to a line
  • The perpendicular bisector of a segment
  • The tangent to a circle, which is perpendicular to the radius

The graph shows two parallel lines of slope 22 and one line perpendicular to them, with the large dot at their right-angle crossing.

  1. Perpendicular, Wikipedia