The Perpendicular Distance Formula

The distance of a point from a line always means the perpendicular distance — the length of the shortest segment from the point to the line.

Key Point (Distance of a point from a line): The distance of P(x1,y1)P(x_1, y_1) from the line Ax+By+C=0Ax + By + C = 0 is

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

Perpendicular distance from a point to a line and between parallel lines

The derivation (triangle-area argument). Let the line meet the axes at Q(CA,0)Q\left(-\frac{C}{A}, 0\right) and R(0,CB)R\left(0, -\frac{C}{B}\right). The perpendicular PMPM from PP to the line is the height of triangle PQRPQR on base QRQR, so

area(PQR)=12QRPMPM=2area(PQR)QR\text{area}(\triangle PQR) = \frac{1}{2}\, QR \cdot PM \quad\Rightarrow\quad PM = \frac{2\,\text{area}(\triangle PQR)}{QR}

Computing the area from the three coordinates gives C2ABAx1+By1+C\frac{|C|}{2|AB|}\,|Ax_1 + By_1 + C|, and QR=CABA2+B2QR = \frac{|C|}{|AB|}\sqrt{A^2 + B^2}. Dividing, everything except the formula cancels:

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

How to use it: put the line in general form first, substitute the point into the left side, take the absolute value, divide by A2+B2\sqrt{A^2 + B^2}.

For example: the distance of (3,5)(3, -5) from 3x4y26=03x - 4y - 26 = 0:

d=3(3)4(5)2632+(4)2=9+20265=35d = \frac{|3(3) - 4(-5) - 26|}{\sqrt{3^2 + (-4)^2}} = \frac{|9 + 20 - 26|}{5} = \frac{3}{5}

Special case: the distance of the origin from Ax+By+C=0Ax + By + C = 0 is simply CA2+B2\frac{|C|}{\sqrt{A^2 + B^2}}.

The absolute value is essential: Ax1+By1+CAx_1 + By_1 + C is positive for points on one side of the line and negative on the other, but a distance must come out non-negative either way.

Distance Between Parallel Lines

Parallel lines can be written with the same AA and BB: Ax+By+C1=0Ax + By + C_1 = 0 and Ax+By+C2=0Ax + By + C_2 = 0. Picking any point on one line and dropping a perpendicular to the other gives:

Key Point (Distance between parallel lines):

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

For example: the lines 3x4y+7=03x - 4y + 7 = 0 and 3x4y+5=03x - 4y + 5 = 0 are at distance

d=759+16=25d = \frac{|7 - 5|}{\sqrt{9 + 16}} = \frac{2}{5}

Warning: the formula needs matching coefficients. For 3x4y+7=03x - 4y + 7 = 0 and 6x8y+5=06x - 8y + 5 = 0, first divide the second by 2 to get 3x4y+52=03x - 4y + \frac{5}{2} = 0, and only then apply the formula: d=7525=910d = \frac{|7 - \frac{5}{2}|}{5} = \frac{9}{10}.

Two constructions used constantly:

A line parallel to Ax+By+C=0Ax + By + C = 0 through (x1,y1)(x_1, y_1) keeps the same A,BA, B:

A(xx1)+B(yy1)=0A(x - x_1) + B(y - y_1) = 0

A line perpendicular to Ax+By+C=0Ax + By + C = 0 through (x1,y1)(x_1, y_1) swaps the coefficients and one sign:

B(xx1)A(yy1)=0B(x - x_1) - A(y - y_1) = 0

Both follow from slopes: the given line has slope AB-\frac{A}{B}, so a parallel line repeats it and a perpendicular line uses BA\frac{B}{A}.

[Board Tip] In distance calculations, the single most common slip is forgetting to move the equation into general form first. 12(x+6)=5(y2)12(x + 6) = 5(y - 2) must become 12x5y+82=012x - 5y + 82 = 0 before substituting the point — substituting into a non-standard form gives garbage that still looks like a number.

Solved Examples

Example 1: Reduce to slope-intercept form

Reduce to slope-intercept form and read off slope and yy-intercept: (i) x+7y=0x + 7y = 0 (ii) 6x+3y5=06x + 3y - 5 = 0 (iii) y=0y = 0.

Solution:

Step 1 — (i) Solve for yy. y=17xy = -\frac{1}{7}x: slope 17-\frac{1}{7}, yy-intercept 00.

Step 2 — (ii) Solve for yy. y=2x+53y = -2x + \frac{5}{3}: slope 2-2, yy-intercept 53\frac{5}{3}.

Step 3 — (iii) Read directly. y=0x+0y = 0 \cdot x + 0: slope 0, intercept 0 — the xx-axis itself.

Takeaway: "Reduce" just means solve for yy — the two numbers you need then sit in plain sight.

Example 2: Reduce to intercept form

Reduce to intercept form and find the intercepts: (i) 3x+2y12=03x + 2y - 12 = 0 (ii) 4x3y=64x - 3y = 6 (iii) 3y+2=03y + 2 = 0.

Solution:

Step 1 — (i) Divide by 12. x4+y6=1\frac{x}{4} + \frac{y}{6} = 1: intercepts 4 and 6.

Step 2 — (ii) Divide by 6. x3/2+y2=1\frac{x}{3/2} + \frac{y}{-2} = 1: intercepts 32\frac{3}{2} and 2-2.

Step 3 — (iii) Recognise the special case. y=23y = -\frac{2}{3} is parallel to the xx-axis — no xx-intercept, hence NO intercept form.

Takeaway: Divide by the constant to force a 1 on the right; horizontal and vertical lines refuse the form entirely.

Example 3: First distance computation

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

Perpendicular distance from a point to a line and between parallel lines

Solution:

Step 1 — Substitute into the numerator. 3(3)4(5)26=9+2026=33(3) - 4(-5) - 26 = 9 + 20 - 26 = 3.

Step 2 — Compute the denominator. 32+(4)2=5\sqrt{3^2 + (-4)^2} = 5.

Step 3 — Divide. d=35=35d = \frac{|3|}{5} = \frac{3}{5}.

Takeaway: Numerator: plug the point in; denominator: root of the coefficient squares — nothing else.

Example 4: Put it in general form first

Find the distance of the point (1,1)(-1, 1) from the line 12(x+6)=5(y2)12(x + 6) = 5(y - 2).

Solution:

Step 1 — Convert to general form. 12x+72=5y1012x + 72 = 5y - 10, i.e. 12x5y+82=012x - 5y + 82 = 0.

Step 2 — Substitute. 12(1)5(1)+82=125+82=6512(-1) - 5(1) + 82 = -12 - 5 + 82 = 65.

Step 3 — Divide. d=65144+25=6513=5d = \frac{65}{\sqrt{144 + 25}} = \frac{65}{13} = 5.

Takeaway: ALWAYS move to Ax+By+C=0Ax + By + C = 0 before substituting — a non-standard form gives a wrong number that looks right.

Example 5: Points at a given distance

Find the points on the xx-axis whose distances from the line x3+y4=1\frac{x}{3} + \frac{y}{4} = 1 are 4 units.

Solution:

Step 1 — General form. Multiply by 12: 4x+3y12=04x + 3y - 12 = 0.

Step 2 — Set up the distance equation. For (a,0)(a, 0): 4a125=4\frac{|4a - 12|}{5} = 4.

Step 3 — Solve both signs. 4a12=±204a - 12 = \pm 20: a=8a = 8 or a=2a = -2.

Step 4 — Report both points. (8,0)(8, 0) and (2,0)(-2, 0) — one on each side of the line.

Takeaway: Removing an absolute value always spawns two cases — geometrically, one point on each side.

Example 6: Parallel lines

Find the distance between (i) 3x4y+7=03x - 4y + 7 = 0 and 3x4y+5=03x - 4y + 5 = 0, (ii) 15x+8y34=015x + 8y - 34 = 0 and 15x+8y+31=015x + 8y + 31 = 0, (iii) l(x+y)+p=0l(x + y) + p = 0 and l(x+y)r=0l(x + y) - r = 0.

Solution:

Step 1 — (i). Matching coefficients already: d=759+16=25d = \frac{|7 - 5|}{\sqrt{9 + 16}} = \frac{2}{5}.

Step 2 — (ii). 225+64=17\sqrt{225 + 64} = 17: d=343117=6517d = \frac{|-34 - 31|}{17} = \frac{65}{17}.

Step 3 — (iii). Coefficients l,ll, l: d=p(r)2l2=p+r2ld = \frac{|p - (-r)|}{\sqrt{2l^2}} = \frac{|p + r|}{\sqrt{2}\,|l|}.

Takeaway: The formula is one subtraction once the coefficient pairs match — check that first, every time.

Example 7: Parallel and perpendicular constructions

(i) Find the line parallel to 3x4y+2=03x - 4y + 2 = 0 through (2,3)(-2, 3). (ii) Find the line perpendicular to x7y+5=0x - 7y + 5 = 0 with xx-intercept 3.

Solution:

Step 1 — (i) Keep the coefficients. 3(x+2)4(y3)=03(x + 2) - 4(y - 3) = 0, i.e. 3x4y+18=03x - 4y + 18 = 0.

Step 2 — (ii) Perpendicular slope. Given slope 17\frac{1}{7} → perpendicular slope 7-7, through (3,0)(3, 0).

Step 3 — (ii) Write it. y=7(x3)y = -7(x - 3), i.e. 7x+y21=07x + y - 21 = 0.

Takeaway: Parallel: same A,BA, B, adjust CC via the point. Perpendicular: swap coefficients, flip one sign.

Example 8: Angle and a right-angle condition

(i) Find the angles between 3x+y=1\sqrt{3}x + y = 1 and x+3y=1x + \sqrt{3}y = 1. (ii) The line through (h,3)(h, 3) and (4,1)(4, 1) meets 7x9y19=07x - 9y - 19 = 0 at right angles: find hh.

Solution:

Step 1 — (i) Slopes. 3-\sqrt{3} and 13-\frac{1}{\sqrt{3}}.

Step 2 — (i) Angle formula. tanθ=13+31+1=2/32=13\tan\theta = \left|\frac{-\frac{1}{\sqrt{3}} + \sqrt{3}}{1 + 1}\right| = \frac{2/\sqrt{3}}{2} = \frac{1}{\sqrt{3}}: θ=30°\theta = 30°, and the obtuse partner is 150°150°.

Step 3 — (ii) Perpendicularity. 134h79=1\frac{1 - 3}{4 - h} \cdot \frac{7}{9} = -1: 149(4h)=1\frac{-14}{9(4 - h)} = -1 gives 9(4h)=149(4 - h) = 14, so h=229h = \frac{22}{9}.

Takeaway: Report both the acute and obtuse angles unless the question specifies — they always pair to 180°180°.

Example 9: The parallel-line identity

Prove that the line through (x1,y1)(x_1, y_1) parallel to Ax+By+C=0Ax + By + C = 0 is A(xx1)+B(yy1)=0A(x - x_1) + B(y - y_1) = 0.

Solution:

Step 1 — Same slope. The proposed equation has coefficients A,BA, B, hence slope AB-\frac{A}{B} — parallel to the given line.

Step 2 — Passes through the point. Substituting (x1,y1)(x_1, y_1): A0+B0=0A \cdot 0 + B \cdot 0 = 0 ✓.

Step 3 — Conclude. A line with the right slope through the right point — exactly the claim. ∎

Takeaway: This identity is the fastest parallel-line constructor — no slope computation, no rearrangement.

Example 10: Right bisector

Find the equation of the right bisector of the segment joining (3,4)(3, 4) and (1,2)(-1, 2).

Solution:

Step 1 — Midpoint. (1,3)(1, 3).

Step 2 — Perpendicular slope. Segment slope 2413=12\frac{2-4}{-1-3} = \frac{1}{2}; bisector slope 2-2.

Step 3 — Point-slope. y3=2(x1)y - 3 = -2(x - 1), i.e. 2x+y5=02x + y - 5 = 0.

Takeaway: Right bisector = midpoint + negative-reciprocal slope — two ingredients, one line.

Example 11: Foot of the perpendicular

Find the foot of the perpendicular from (1,3)(-1, 3) to the line 3x4y16=03x - 4y - 16 = 0.

Solution:

Step 1 — Write the perpendicular line. Given slope 34\frac{3}{4} → perpendicular slope 43-\frac{4}{3} through (1,3)(-1, 3): y3=43(x+1)y - 3 = -\frac{4}{3}(x + 1), i.e. 4x+3y5=04x + 3y - 5 = 0.

Step 2 — Intersect the two lines. Solve 3x4y=163x - 4y = 16 and 4x+3y=54x + 3y = 5: multiply and add to eliminate — x=6825x = \frac{68}{25}, y=4925y = -\frac{49}{25}.

Step 3 — Conclude. The foot is (6825,4925)\left(\frac{68}{25}, -\frac{49}{25}\right).

Takeaway: Foot of perpendicular = intersection of the line with its perpendicular through the point.

Example 12: Perpendicular data

(i) The perpendicular from the origin to y=mx+cy = mx + c meets it at (1,2)(-1, 2): find mm and cc. (ii) In ABC\triangle ABC with A(2,3)A(2, 3), B(4,1)B(4, -1), C(1,2)C(1, 2), find the equation and length of the altitude from AA.

Solution:

Step 1 — (i) Slope from the foot. Origin to (1,2)(-1, 2): slope 2-2; the line is perpendicular: m=12m = \frac{1}{2}.

Step 2 — (i) Find cc. (1,2)(-1, 2) on the line: 2=12+c2 = -\frac{1}{2} + c, so c=52c = \frac{5}{2}.

Step 3 — (ii) Altitude's equation. BCBC has slope 2+114=1\frac{2+1}{1-4} = -1; altitude slope 1 through AA: xy+1=0x - y + 1 = 0.

Step 4 — (ii) Altitude's length. Line BCBC: x+y3=0x + y - 3 = 0; distance from A(2,3)A(2,3): 2+332=2\frac{|2 + 3 - 3|}{\sqrt{2}} = \sqrt{2}.

Takeaway: An altitude is a perpendicular construction plus a point-to-line distance — both from this section's toolkit.

Example 13: A clean distance identity

If pp is the distance of the origin from the line with intercepts aa and bb, show that 1p2=1a2+1b2\frac{1}{p^2} = \frac{1}{a^2} + \frac{1}{b^2}.

Solution:

Step 1 — General form of the intercept line. xa+yb=1\frac{x}{a} + \frac{y}{b} = 1 becomes bx+ayab=0bx + ay - ab = 0.

Step 2 — Distance from the origin. p=aba2+b2=aba2+b2p = \frac{|{-ab}|}{\sqrt{a^2 + b^2}} = \frac{|ab|}{\sqrt{a^2 + b^2}}.

Step 3 — Square and invert. 1p2=a2+b2a2b2=1b2+1a2\frac{1}{p^2} = \frac{a^2 + b^2}{a^2b^2} = \frac{1}{b^2} + \frac{1}{a^2}. ∎

Takeaway: Origin distances need only CA2+B2\frac{|C|}{\sqrt{A^2+B^2}} — the identity is one clean algebraic split.