Math Core

Lesson 3.4 · Parallel and Perpendicular Lines

Equations of parallel and perpendicular lines

Now that you can find the slope of a parallel or perpendicular line, you can write its equation. This skill does real work in geometry: it lets you build perpendicular bisectors, drop a perpendicular from a point to a line, and measure the distance from a point to a line.

Two forms of a line

You need a slope and a point to pin down a line. Two equation forms are useful:

  • Slope-intercept form: y=mx+by = mx + b, where mm is the slope and bb is the yy-intercept.
  • Point-slope form: y−y1=m(x−x1)y - y_1 = m(x - x_1), where (x1,y1)(x_1, y_1) is any point on the line.

Point-slope form is usually the quickest way to start, because the problem hands you a point. You can then simplify to slope-intercept form.

Writing a parallel or perpendicular line

To write the line through a point PP that is parallel or perpendicular to a given line:

  1. Find the slope of the given line (solve for yy if needed).
  2. Parallel: use the same slope. Perpendicular: use the opposite reciprocal.
  3. Substitute that slope and the coordinates of PP into y−y1=m(x−x1)y - y_1 = m(x - x_1).
  4. Simplify to y=mx+by = mx + b and check that PP satisfies it.

Worked example: A parallel line through a point

Write an equation of the line through (4,−1)(4, -1) that is parallel to y=−3x+5y = -3x + 5.

The given slope is −3-3, so the new line also has slope −3-3. Use point-slope form:

y−(−1)=−3(x−4)y+1=−3x+12y=−3x+11\begin{aligned} y - (-1) &= -3(x - 4) \\ y + 1 &= -3x + 12 \\ y &= -3x + 11 \end{aligned}

Check: −3(4)+11=−1-3(4) + 11 = -1. ✓ The lines have the same slope and different yy-intercepts (55 and 1111), so they really are parallel.

Worked example: A perpendicular line through a point

Write an equation of the line through (−6,2)(-6, 2) that is perpendicular to 3x−2y=83x - 2y = 8.

Solve for yy: −2y=−3x+8-2y = -3x + 8, so y=32x−4y = \dfrac{3}{2}x - 4. The given slope is 32\dfrac{3}{2}, so the perpendicular slope is −23-\dfrac{2}{3}.

y−2=−23(x−(−6))y−2=−23x−4y=−23x−2\begin{aligned} y - 2 &= -\frac{2}{3}\bigl(x - (-6)\bigr) \\ y - 2 &= -\frac{2}{3}x - 4 \\ y &= -\frac{2}{3}x - 2 \end{aligned}

Check: −23(−6)−2=4−2=2-\dfrac{2}{3}(-6) - 2 = 4 - 2 = 2. ✓

The line y = −(2/3)x − 2 passes through (−6, 2) and is perpendicular to y = (3/2)x − 4.Open in grapher →

Horizontal and vertical lines

Slope rules break down when a slope is 00 or undefined, so handle these cases directly. A horizontal line through (a,b)(a, b) is y=by = b; a vertical line through (a,b)(a, b) is x=ax = a. Every horizontal line is perpendicular to every vertical line. For example, the line through (3,−2)(3, -2) perpendicular to y=5y = 5 is the vertical line x=3x = 3, and the line through (3,−2)(3, -2) parallel to y=5y = 5 is y=−2y = -2.

Perpendicular bisectors

Definition

Perpendicular bisector

The perpendicular bisector of a segment is the line that is perpendicular to the segment and passes through its midpoint. Every point on it is the same distance from the two endpoints.

To find its equation, you need the midpoint (x1+x22,y1+y22)\left(\dfrac{x_1 + x_2}{2}, \dfrac{y_1 + y_2}{2}\right) for the point and the opposite reciprocal of the segment's slope for the slope.

Worked example: Equation of a perpendicular bisector

Find the perpendicular bisector of the segment with endpoints A(−2,3)A(-2, 3) and B(4,−1)B(4, -1).

Midpoint: (−2+42,3+(−1)2)=(1,1)\left(\dfrac{-2 + 4}{2}, \dfrac{3 + (-1)}{2}\right) = (1, 1).

Slope of AB‾\overline{AB}: −1−34−(−2)=−46=−23\dfrac{-1 - 3}{4 - (-2)} = \dfrac{-4}{6} = -\dfrac{2}{3}, so the perpendicular slope is 32\dfrac{3}{2}.

y−1=32(x−1)⟹y=32x−12.y - 1 = \frac{3}{2}(x - 1) \quad\Longrightarrow\quad y = \frac{3}{2}x - \frac{1}{2}.

Check with a point on the line, such as (3,4)(3, 4): its distance to AA is 52+12=26\sqrt{5^2 + 1^2} = \sqrt{26} and its distance to BB is 12+52=26\sqrt{1^2 + 5^2} = \sqrt{26}. Equal, as they should be.

Distance from a point to a line

The distance from a point to a line is the length of the perpendicular segment from the point to the line. It's the shortest path from the point to any point on the line. To compute it:

  1. Write the line through the point perpendicular to the given line.
  2. Solve the system to find where the two lines meet (the foot of the perpendicular).
  3. Use the distance formula between the point and the foot.

Worked example: How far is the point from the line?

Find the distance from P(4,9)P(4, 9) to the line ℓ\ell: y=12x+2y = \dfrac{1}{2}x + 2.

Step 1. The slope of ℓ\ell is 12\dfrac{1}{2}, so the perpendicular slope is −2-2. The perpendicular through PP is y−9=−2(x−4)y - 9 = -2(x - 4), or y=−2x+17y = -2x + 17.

Step 2. Set the right sides equal:

12x+2=−2x+1752x=15x=6\begin{aligned} \frac{1}{2}x + 2 &= -2x + 17 \\ \frac{5}{2}x &= 15 \\ x &= 6 \end{aligned}

Then y=−2(6)+17=5y = -2(6) + 17 = 5, so the foot is F(6,5)F(6, 5). (Check on ℓ\ell: 12(6)+2=5\tfrac{1}{2}(6) + 2 = 5. ✓)

Step 3. PF=(6−4)2+(5−9)2=4+16=20=25≈4.47PF = \sqrt{(6 - 4)^2 + (5 - 9)^2} = \sqrt{4 + 16} = \sqrt{20} = 2\sqrt{5} \approx 4.47.

Common mistake

The point you are given is usually not the yy-intercept. For the line through (4,−1)(4, -1) with slope −3-3, writing y=−3x−1y = -3x - 1 is wrong, because (4,−1)(4, -1) doesn't satisfy it: −3(4)−1=−13-3(4) - 1 = -13. Use point-slope form, or substitute the point into y=mx+by = mx + b and solve for bb.

Tip

Always finish by plugging the given point into your equation. If it doesn't make the equation true, something went wrong. For a perpendicular line, also multiply the two slopes to confirm you get −1-1.

Practice

For the equation answers, you can type the whole equation, like y = 2x + 1, or just the right side.

Practice 1

Write an equation of the line through (3,10)(3, 10) that is parallel to y=2x−7y = 2x - 7.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 2

Write an equation of the line through (2,5)(2, 5) that is perpendicular to y=−14x+1y = -\dfrac{1}{4}x + 1.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 3

Write an equation of the line through (−1,4)(-1, 4) that is parallel to 5x+y=35x + y = 3.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 4

Write an equation of the line through (4,−1)(4, -1) that is perpendicular to 2x−3y=62x - 3y = 6.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 5

Which is an equation of the line through (−3,6)(-3, 6) that is perpendicular to the line x=2x = 2?

Practice 6

Write an equation of the perpendicular bisector of the segment with endpoints A(1,2)A(1, 2) and B(7,6)B(7, 6).

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 7

For what value of aa is the line ax+4y=8ax + 4y = 8 perpendicular to y=2x−1y = 2x - 1?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

Find the distance from the point P(−1,7)P(-1, 7) to the line y=x+2y = x + 2. Give an exact answer or round to the nearest hundredth.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.