Introduction

A fundamental concept in coordinate geometry is calculating the shortest distance between a point and a line. This is always the perpendicular distance.

1. Distance of a Point from a Line

The perpendicular distance (d) from a point P(x1,y1)P(x_1, y_1) to the line Ax+By+C=0Ax + By + C = 0 is given by the formula:

d=Ax1+By1+CA2+B2d = \frac{|Ax_1 + By_1 + C|}{\sqrt{A^2 + B^2}}

The numerator is the absolute value you get when you substitute the point's coordinates into the line's equation. The denominator normalizes this value by the magnitude of the line's direction vector.

2. Distance Between Two Parallel Lines

The distance between two parallel lines is the constant perpendicular distance between them. For two parallel lines given by:

L1:Ax+By+C1=0L_1: Ax + By + C_1 = 0

L2:Ax+By+C2=0L_2: Ax + By + C_2 = 0

The distance (d) between them is the difference in their constant terms, normalized by the same factor as above:

d=C1C2A2+B2d = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}

Note: This formula only works if the coefficients of x and y (A and B) are identical in both equations. If they are not, you must first manipulate one of the equations to make them match.

Distance d between two parallel lines:

L1:y=mx+c1L_1: y= mx + c1

L2:y=mx+c2L_2: y = mx + c2, is given by

d=c1c21+m2d = \frac{|c_1 - c_2|}{\sqrt{1 + m^2}}

Example 1: Distance of a Point from a Line

Question: Find the distance of the point (3, -5) from the line 3x4y26=03x - 4y - 26 = 0.

Solution:

We use the distance formula d=Ax1+By1+CA2+B2d = \frac{|Ax_1 + By_1 + C|}{\sqrt{A^2 + B^2}} with (x1,y1)=(3,5)(x_1, y_1) = (3,-5) and the line 3x4y26=03x-4y-26=0 (so A=3, B=-4, C=-26).

d=3(3)4(5)2632+(4)2=9+20269+16=325=35d = \frac{|3(3) - 4(-5) - 26|}{\sqrt{3^2 + (-4)^2}} = \frac{|9 + 20 - 26|}{\sqrt{9 + 16}} = \frac{|3|}{\sqrt{25}} = \mathbf{\frac{3}{5}}


Example 2: Distance Between Parallel Lines

Question: Find the distance between the parallel lines 3x4y+7=03x - 4y + 7 = 0 and 3x4y+5=03x - 4y + 5 = 0.

Solution:

The lines are parallel and their equations are already in a comparable form. We use the formula d=C1C2A2+B2d = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}.

Here, A=3,B=4,C1=7,C2=5A=3, B=-4, C_1=7, C_2=5.

d=7532+(4)2=225=25d = \frac{|7 - 5|}{\sqrt{3^2 + (-4)^2}} = \frac{|2|}{\sqrt{25}} = \mathbf{\frac{2}{5}}


Example 3: Normalizing Equations First

Question: Find the distance between the parallel lines x+2y1=0x+2y-1=0 and 2x+4y+5=02x+4y+5=0.

Solution:

The coefficients of x and y are not identical, so we cannot apply the formula directly. We must make them match first.

Step 1: Rewrite the second equation by dividing the entire equation by 2:

(2x+4y+5=0)÷2    x+2y+52=0(2x+4y+5=0) \div 2 \implies x+2y+\frac{5}{2}=0.

Step 2: Now we can compare it with the first line, x+2y1=0x+2y-1=0.

Here, A=1,B=2,C1=1,C2=5/2A=1, B=2, C_1=-1, C_2=5/2.

Step 3: Apply the distance formula.

d=C1C2A2+B2=15/212+22=7/25=725d = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}} = \frac{|-1 - 5/2|}{\sqrt{1^2 + 2^2}} = \frac{|-7/2|}{\sqrt{5}} = \mathbf{\frac{7}{2\sqrt{5}}}