Math Lab
Home/Class XI/Ch 9/Distance from a point to a line; parallel-line distance

Distance from a point to a line; parallel-line distance

In the previous subtopic we learned how to write a line and read off its slope and intercepts. Now we measure things from a line: the perpendicular distance from a point to the line, and the distance between two parallel lines.

The distance formula

Theorem. The perpendicular distance from a point P(x0,y0)P(x_0, y_0) to the line Ax+By+C=0A x + B y + C = 0 is d=Ax0+By0+CA2+B2.\boxed{d = \frac{|A x_0 + B y_0 + C|}{\sqrt{A^2 + B^2}}.}

Proof sketch. Drop a perpendicular from PP to the line, meeting it at QQ. The vector PQ\overrightarrow{PQ} is along the normal direction (A,B)/A2+B2(A, B)/\sqrt{A^2 + B^2}. The signed length of PQ\overrightarrow{PQ} along the normal is (Ax0+By0+C)/A2+B2-(A x_0 + B y_0 + C)/\sqrt{A^2 + B^2} (computed by substituting PP into the linear function and projecting). The unsigned distance is the absolute value.

Distance between parallel lines

If two lines are parallel, write them with the same A,BA, B: Ax+By+C1=0,Ax+By+C2=0.A x + B y + C_1 = 0, \quad A x + B y + C_2 = 0. Pick any point on the second line (e.g., (C2/A,0)(-C_2/A, 0)) and apply the formula: d=A(C2/A)+0+C1A2+B2=C1C2A2+B2.d = \frac{|A \cdot (-C_2/A) + 0 + C_1|}{\sqrt{A^2 + B^2}} = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}.

So dparallel=C1C2A2+B2.\boxed{d_{\text{parallel}} = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}.}

A common mistake: if the two equations have different A,BA, B scales (like 2x+3y=52x + 3y = 5 and 4x+6y=114x + 6y = 11), first scale them to match. The second is 2x+3y=11/22x + 3y = 11/2, so C1C2=511/2=1/2|C_1 - C_2| = |5 - 11/2| = 1/2, d=(1/2)/13d = (1/2)/\sqrt{13}.

Worked examples

Example 1. Distance from (2,3)(2, 3) to 3x+4y10=03 x + 4 y - 10 = 0.

d=32+43109+16=85=85d = \dfrac{|3 \cdot 2 + 4 \cdot 3 - 10|}{\sqrt{9 + 16}} = \dfrac{|8|}{5} = \dfrac{8}{5}.

Example 2. Distance from origin to 5x12y+26=05 x - 12 y + 26 = 0.

d=0+0+2625+144=2613=2d = \dfrac{|0 + 0 + 26|}{\sqrt{25 + 144}} = \dfrac{26}{13} = 2.

Example 3. Distance between 3x+4y10=03 x + 4 y - 10 = 0 and 3x+4y+5=03 x + 4 y + 5 = 0.

d=1059+16=155=3d = \dfrac{|-10 - 5|}{\sqrt{9 + 16}} = \dfrac{15}{5} = 3.

Example 4. Find the equation of the line parallel to 4x3y8=04 x - 3 y - 8 = 0 at distance 22 from it.

Equations: 4x3y+c=04 x - 3 y + c = 0. Distance from origin must shift by 22: c(8)16+9=2c+8=10c=2\dfrac{|c - (-8)|}{\sqrt{16 + 9}} = 2 \Rightarrow |c + 8| = 10 \Rightarrow c = 2 or c=18c = -18. So two lines: 4x3y+2=04 x - 3 y + 2 = 0 and 4x3y18=04 x - 3 y - 18 = 0.

Example 5. Find a point on the line y=xy = x which is equidistant from the lines 4x+3y5=04 x + 3 y - 5 = 0 and 5x+12y13=05 x + 12 y - 13 = 0.

Let the point be (t,t)(t, t). Distances: d1=4t+3t55=7t55d_1 = \dfrac{|4t + 3t - 5|}{5} = \dfrac{|7t - 5|}{5}, d2=5t+12t1313=17t1313d_2 = \dfrac{|5t + 12 t - 13|}{13} = \dfrac{|17 t - 13|}{13}.

Equate: 137t5=517t1313 |7t - 5| = 5 |17t - 13|. Two cases:

(a) 13(7t5)=5(17t13)13(7t - 5) = 5(17 t - 13): 91t65=85t656t=0t=091 t - 65 = 85 t - 65 \Rightarrow 6 t = 0 \Rightarrow t = 0. Point: (0,0)(0, 0).

(b) 13(7t5)=5(17t13)13(7t - 5) = -5(17 t - 13): 91t65=85t+65176t=130t=65/8891 t - 65 = -85 t + 65 \Rightarrow 176 t = 130 \Rightarrow t = 65/88. Point: (65/88,65/88)(65/88, 65/88).

Try it yourself

  1. Distance from (0,0)(0, 0) to 3x+4y25=03 x + 4 y - 25 = 0.
  2. Distance from (1,2)(1, 2) to x+y7=0x + y - 7 = 0.
  3. Distance from (3,5)(-3, 5) to 5x12y+26=05 x - 12 y + 26 = 0.
  4. Distance between 2x3y+1=02 x - 3 y + 1 = 0 and 4x6y5=04 x - 6 y - 5 = 0.
  5. Distance between x+y4=0x + y - 4 = 0 and x+y+2=0x + y + 2 = 0.
  6. Find the equation of the line parallel to 3x+4y10=03 x + 4 y - 10 = 0 at distance 55.
  7. A line passes through (2,3)(2, 3) at distance 11 from origin. Find its slope.
  8. Find the locus of a point equidistant from x=3x = 3 and y=5y = 5.
  9. Show that the foot of the perpendicular from origin to 4x+3y25=04 x + 3 y - 25 = 0 is (4,3)(4, 3).
  10. Find the distance from (2,1)(2, -1) to the line through (1,2)(1, 2) and (4,1)(4, -1).
  11. Find the orthogonal distance from (1,1)(1, 1) to the line y=x+4y = x + 4.
  12. Find a point on the xx-axis equidistant from the lines y=xy = x and y=x+6y = -x + 6.

Pitfalls / Tricks

  • Always use the absolute value in the numerator.
  • For parallel lines, the coefficients of xx and yy must be identical before subtracting constants.
  • The denominator A2+B2\sqrt{A^2 + B^2} never depends on the point.
  • Insight. The signed expression Ax0+By0+CA2+B2\dfrac{A x_0 + B y_0 + C}{\sqrt{A^2 + B^2}} tells you not just the distance but the side of the line on which (x0,y0)(x_0, y_0) lies , positive on one side, negative on the other.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Distance from point to line
6 questions · pick the best answer
Q1

Q2

Q3

Q4

Q5

Q6