The equa­tion of a line is an equa­tion in xx and yy that is sat­is­fied by the coor­di­nates of every point on the line and by no other point. With it, ques­tions about the line become alge­bra: to test whether a point lies on the line, sub­sti­tute; to find where two lines meet, solve. This les­son finds the equa­tions of lines par­al­lel to the axes, and of a line given by one point and its slope, or by two of its points.

Lines par­al­lel to the axes

Every point on a hor­i­zon­tal line has the same yy-coor­di­nate. So the line par­al­lel to the xx-axis at a dis­tance bb from it is

y=by = b

(above the axis if b>0b > 0, below if b<0b < 0). In par­tic­u­lar, the xx-axis itself is y=0y = 0.

Sim­i­larly, every point on a ver­ti­cal line has the same xx-coor­di­nate, so the line par­al­lel to the yy-axis is

x=ax = a

and the yy-axis itself is x=0x = 0.

For exam­ple, the hor­i­zon­tal line through (3,−5)(3, -5) is y=−5y = -5, and the ver­ti­cal line through it is x=3x = 3.

Point-slope form

Result. The equa­tion of the line through the point (x1,y1)(x_1, y_1) with slope mm is

y−y1=m(x−x1)y - y_1 = m(x - x_1)

Why. Let P(x,y)P(x, y) be any point on the line other than (x1,y1)(x_1, y_1). The slope of the line, worked out from these two points, must be mm:

y−y1x−x1=m  ⟹  y−y1=m(x−x1)\displaystyle \frac{y - y_1}{x - x_1} = m \implies y - y_1 = m(x - x_1)

The point (x1,y1)(x_1, y_1) itself also sat­is­fies this equa­tion. Con­versely, any point sat­is­fy­ing it gives slope mm with (x1,y1)(x_1, y_1), so it lies on the line.

It is usual to give the final answer in the form ax+by+c=0ax + by + c = 0 with whole-num­ber coef­fi­cients.

Exam­ple 1

Find the equa­tion of the line through (2,−3)(2, -3) with slope 44.

y−(−3)=4(x−2)y+3=4x−84x−y−11=0\begin{aligned} y - (-3) &= 4(x - 2) \\ y + 3 &= 4x - 8 \\ 4x - y - 11 &= 0 \end{aligned}

Check: at (2,−3)(2, -3), 8+3−11=08 + 3 - 11 = 0.

Exam­ple 2

Find the equa­tion of the line through (3,4)(3, 4) with incli­na­tion 45°45°.

The slope is tan⁡45°=1\tan 45° = 1, so y−4=1(x−3)y - 4 = 1(x - 3), that is, x−y+1=0x - y + 1 = 0.

Two-point form

Result. The equa­tion of the line through (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2), where x1≠x2x_1 \neq x_2, is

y−y1=y2−y1x2−x1(x−x1)\displaystyle y - y_1 = \frac{y_2 - y_1}{x_2 - x_1}(x - x_1)

This is sim­ply the point-slope form with the slope worked out from the two points. (If x1=x2x_1 = x_2, the line is ver­ti­cal, with equa­tion x=x1x = x_1.)

Exam­ple 3

Find the equa­tion of the line through (1,2)(1, 2) and (5,−6)(5, -6).

The slope is −6−25−1=−84=−2\displaystyle \frac{-6 - 2}{5 - 1} = \frac{-8}{4} = -2. Then

y−2=−2(x−1)y−2=−2x+22x+y−4=0\begin{aligned} y - 2 &= -2(x - 1) \\ y - 2 &= -2x + 2 \\ 2x + y - 4 &= 0 \end{aligned}

Check with the sec­ond point: 2(5)+(−6)−4=02(5) + (-6) - 4 = 0.

Lines in a tri­an­gle

Two lines con­nected with a tri­an­gle are often asked for.

  • A median joins a ver­tex to the mid­point of the oppo­site side.
  • The per­pen­dic­u­lar bisec­tor of a seg­ment passes through its mid­point at right angles to it.

Exam­ple 4

The ver­tices of a tri­an­gle are A(1,4)A(1, 4), B(3,−2)B(3, -2) and C(5,6)C(5, 6). Find the equa­tion of the median through AA.

The mid­point of BCBC is (3+52,−2+62)=(4,2)\displaystyle \left(\frac{3 + 5}{2}, \frac{-2 + 6}{2}\right) = (4, 2). The median joins A(1,4)A(1, 4) to (4,2)(4, 2), with slope 2−44−1=−23\displaystyle \frac{2 - 4}{4 - 1} = -\frac{2}{3}:

y−4=−23(x−1)3y−12=−2x+22x+3y−14=0\displaystyle \begin{aligned} y - 4 &= -\frac{2}{3}(x - 1) \\ 3y - 12 &= -2x + 2 \\ 2x + 3y - 14 &= 0 \end{aligned}

Exam­ple 5

Find the per­pen­dic­u­lar bisec­tor of the seg­ment join­ing A(1,3)A(1, 3) and B(5,7)B(5, 7).

The mid­point is (3,5)(3, 5). The slope of ABAB is 7−35−1=1\displaystyle \frac{7 - 3}{5 - 1} = 1, so the per­pen­dic­u­lar slope is −1-1:

y−5=−(x−3)  ⟹  x+y−8=0y - 5 = -(x - 3) \implies x + y - 8 = 0

Every point on this line is the same dis­tance from AA as from BB.

Prac­tice

  1. Write the equa­tion of the line par­al­lel to the xx-axis through (3,−5)(3, -5).
  2. Write the equa­tion of the line par­al­lel to the yy-axis through (−2,7)(-2, 7).
  3. Find the equa­tion of the line through (1,3)(1, 3) with slope 22.
  4. Find the equa­tion of the line through (−2,4)(-2, 4) with slope −32\displaystyle -\frac{3}{2}.
  5. Find the equa­tion of the line through the ori­gin with incli­na­tion 150°150°.
  6. Find the equa­tion of the line through (2,5)(2, 5) and (4,9)(4, 9).
  7. Find the equa­tion of the line through (−1,3)(-1, 3) and (3,−5)(3, -5).
  8. Find the equa­tion of the line through (3,1)(3, 1) and (3,6)(3, 6).
  9. The ver­tices of a tri­an­gle are A(2,5)A(2, 5), B(−4,1)B(-4, 1), C(6,−3)C(6, -3). Find the median through AA.
  10. Find the per­pen­dic­u­lar bisec­tor of the seg­ment join­ing (−1,2)(-1, 2) and (3,6)(3, 6).

Answers

Show answers
  1. y=−5y = -5.
  2. x=−2x = -2.
  3. y−3=2(x−1)y - 3 = 2(x - 1), that is, 2x−y+1=02x - y + 1 = 0.
  4. y−4=−32(x+2)\displaystyle y - 4 = -\frac{3}{2}(x + 2) gives 2y−8=−3x−62y - 8 = -3x - 6, that is, 3x+2y−2=03x + 2y - 2 = 0.
  5. The slope is tan⁡150°=−13\displaystyle \tan 150° = -\frac{1}{\sqrt{3}}, so y=−x3\displaystyle y = -\frac{x}{\sqrt{3}}, that is, x+3y=0x + \sqrt{3}y = 0.
  6. The slope is 22: y−5=2(x−2)y - 5 = 2(x - 2), that is, 2x−y+1=02x - y + 1 = 0.
  7. The slope is −84=−2\displaystyle \frac{-8}{4} = -2: y−3=−2(x+1)y - 3 = -2(x + 1), that is, 2x+y−1=02x + y - 1 = 0.
  8. The xx-coor­di­nates are equal: x=3x = 3.
  9. The mid­point of BCBC is (1,−1)(1, -1), and the slope from AA is −1−51−2=6\displaystyle \frac{-1 - 5}{1 - 2} = 6. So y−5=6(x−2)y - 5 = 6(x - 2), that is, 6x−y−7=06x - y - 7 = 0.
  10. The mid­point is (1,4)(1, 4) and the slope of the seg­ment is 11, so the bisec­tor has slope −1-1: y−4=−(x−1)y - 4 = -(x - 1), that is, x+y−5=0x + y - 5 = 0.