Straight Lines · Lesson 3 of 5
Distances from Points and Between Lines
“Derive perpendicular distance and connect it to parallel-line separation, perpendicular feet and triangle altitudes.”
• Explain why point-to-line distance is perpendicular distance. • Derive the general distance formula using coordinate triangle area. • Measure parallel-line separation after matching coefficients. • Find a perpendicular foot, perpendicular bisector and altitude. • Use absolute-value distance equations and handle special cases.
The Shortest Segment to a Line
Many segments join a point to a line, but their lengths are not all equal. The distance from the point to the line means the shortest length, attained by the perpendicular. This distinction matters whenever a question specifies a different direction of travel.
Let H be the foot of the perpendicular from P to a line, meaning H lies on the line and PH meets it at 90°. For another point Q on the line, the triangle PHQ is right-angled at H. Its hypotenuse PQ satisfies PQ²=PH²+HQ², so PQ≥PH, with equality only at Q=H. This explains the geometric meaning of the distance formula before we calculate it.
Deriving Distance from Triangle Area
We already know how to find a triangle’s area from its coordinates. We also know that its area is half the base times the perpendicular height. Applying both descriptions to a triangle built on the given line isolates exactly the height we need.
Write the line as Ax+By+C=0, with A and B not both zero. First suppose A, B and C are all nonzero so the line cuts both axes at distinct points Q=(−C/A,0) and R=(0,−C/B). For P=(x₁,y₁), use QR as the triangle base. If d is the perpendicular distance, 2Δ=d·QR. We can compute Δ and QR from their coordinates.
Divide twice the area by the base. The factor |C/(AB)| cancels, leaving a formula with no division by A, B or C separately. The intercept construction cannot itself justify cases in which one of those constants is zero, because its base then degenerates or fails to exist. We handle those cases explicitly next.
For a vertical line x=h, the formula gives |x₁−h|; for a horizontal line y=k it gives |y₁−k|, matching their obvious perpendicular distances. To include a line through the origin without a degenerate intercept triangle, translate the origin to any point off the line. Translation preserves lengths and A,B but changes the constant to a nonzero value, so the nondegenerate argument applies. Translating back leaves the expression Ax₁+By₁+C unchanged. Thus the formula covers every genuine straight line.
The numerator is the result of substituting P into the line equation. If it vanishes, P lies on the line and the distance is zero. Its sign alone tells which side of the line P occupies for the chosen coefficient signs; taking the absolute value turns that signed result into distance. The denominator adjusts for the scaling of the equation: multiplying A,B,C by t≠0 multiplies both numerator and denominator by |t|, leaving d unchanged.
Problem
Find the distance of (3,−5) from 3x−4y−26=0.
- 1.The coefficients are A=3, B=−4, C=−26.
- 2.Substitution gives 3×3+(−4)(−5)−26=9+20−26=3.
- 3.The denominator is √(3²+(−4)²)=√25=5.
- 4.Therefore d=|3|/5=3/5 unit. This is not the vertical difference to the line; it is the perpendicular length.
Problem
Find the distance of (−1,1) from 12(x+6)=5(y−2).
- 1.Expand both sides: 12x+72=5y−10.
- 2.Move everything to one side: 12x−5y+82=0.
- 3.Substitution at (−1,1) gives −12−5+82=65.
- 4.The coefficient denominator is √(144+25)=13, so distance=65/13=5 units.
Separation of Parallel Lines
Parallel lines have a constant separation because their perpendicular direction is the same everywhere. Choose any point on one line and measure its distance to the other. This turns the line-to-line question into the point-to-line question we have just solved.
For y=mx+c₁ and y=mx+c₂, take (0,c₁) on the first line. Write the second as mx−y+c₂=0. Substitution gives |c₂−c₁|, while the denominator is √(m²+1). This derivation also works when m=0, because the chosen point does not require dividing by m.
In general form, write both equations with exactly the same coefficients of x and y: Ax+By+C₁=0 and Ax+By+C₂=0. A point on the first satisfies Ax₁+By₁=−C₁. Substitute that identity into the point-to-line distance from the second: the numerator becomes |C₂−C₁|.
Problem
Find the distance between 3x−4y+7=0 and 3x−4y+5=0.
- 1.Both equations have A=3 and B=−4, so no rescaling is needed.
- 2.Their constant difference has magnitude |7−5|=2.
- 3.The shared denominator is √(9+16)=5.
- 4.Their separation is 2/5 unit.
Problem
Find the separation of 9x+6y−7=0 and 3x+2y+6=0.
- 1.The coefficient pairs are proportional, so the lines have parallel directions.
- 2.Multiply the second equation by 3: 9x+6y+18=0. Now both use A=9,B=6.
- 3.The distance is |−7−18|/√(81+36)=25/(3√13).
- 4.Subtracting −7 and 6 before matching coefficients would compare different equation scales and give a false distance.
Do not subtract constants from parallel equations until their x- and y-coefficients match. Do not remove the absolute value because a distance must be nonnegative. In a family such as l(x+y)+p=0, l must be nonzero for the equation to represent a line.
Problem
Find points on the x-axis at distance 4 from x/3+y/4=1.
- 1.Write the line as 4x+3y−12=0. A point on the x-axis is (t,0).
- 2.Distance=(|4t−12|)/5. Setting it equal to 4 gives |4t−12|=20.
- 3.The two branches are 4t−12=20 and 4t−12=−20.
- 4.Thus t=8 or t=−2. The required points are (8,0) and (−2,0).
- 5.Both substitute into the distance formula to give 4. Absolute values often produce two locations on opposite sides.
Perpendicular Feet, Bisectors and Altitudes
A distance formula returns a length; it does not automatically locate the endpoint of that length. To find the foot, build the perpendicular through the point and solve its intersection with the given line. This same construction finds triangle altitudes and explains perpendicular bisectors.
Problem
Find the foot from P=(−1,3) to 3x−4y−16=0.
- 1.The line has slope 3/4, so the perpendicular through P has slope −4/3.
- 2.Its equation is y−3=−(4/3)(x+1), or 4x+3y−5=0.
- 3.Solve 3x−4y=16 and 4x+3y=5. Multiplying by 3 and 4 respectively and adding gives 25x=68, so x=68/25.
- 4.Substitution in 4x+3y=5 gives y=−49/25. Hence H=(68/25,−49/25).
- 5.H satisfies the original equation. PH has length 31/5, agreeing with |3(−1)−4(3)−16|/5=31/5.
Problem
Find the perpendicular bisector of the segment from (3,4) to (−1,2).
- 1.The midpoint is M=(1,3).
- 2.The segment slope is (2−4)/(−1−3)=1/2, so the perpendicular slope is −2.
- 3.The line through M is y−3=−2(x−1), hence 2x+y−5=0.
- 4.It passes through the midpoint and is perpendicular to the segment. Points on it are equidistant from the endpoints.
Problem
For A=(2,3), B=(4,−1), C=(1,2), find the altitude from A.
- 1.An altitude runs through A perpendicular to the opposite side BC, extended if needed. The slope of BC is (2+1)/(1−4)=−1.
- 2.Therefore the altitude slope is 1 and its equation is y−3=x−2, or x−y+1=0.
- 3.The side BC has equation x+y−3=0. Its intersection with the altitude is H=(1,2), which happens to be C.
- 4.The altitude length is the distance from A to BC: |2+3−3|/√2=√2 units.
- 5.Check with AH=√((2−1)²+(3−2)²)=√2. An altitude length is measured to the opposite side’s line, not to an arbitrary endpoint.
Distance identities can be proved by substitution rather than by drawing a special triangle. If a line has nonzero intercepts a,b, write it as bx+ay−ab=0. Its distance p from the origin is |ab|/√(a²+b²), so 1/p²=(a²+b²)/(a²b²)=1/a²+1/b². Squaring removes the absolute value but does not change the distance’s meaning.
Problem
Let p and q be distances from the origin to x cos θ−y sin θ=k cos 2θ and x sec θ+y cosec θ=k. Show p²+4q²=k².
- 1.For the second line, sin θ and cos θ must both be nonzero; otherwise sec θ or cosec θ is undefined.
- 2.The first coefficient denominator is √(cos²θ+sin²θ)=1, so p=|k cos 2θ|.
- 3.For the second, sec²θ+cosec²θ=1/(sin²θ cos²θ), giving q=|k sin θ cos θ|.
- 4.Therefore p²+4q²=k²[cos²2θ+4sin²θ cos²θ].
- 5.Since 2sin θ cos θ=sin 2θ, the bracket becomes cos²2θ+sin²2θ=1. Thus p²+4q²=k².
Quiz
Distance from (0,0) to 3x+4y−10=0 is:
Before measuring parallel-line separation, first:
A zero numerator in point-to-line distance means:
Distance from (2,5) to x=−1 is:
What determines the foot from a point to a line?
For y=2x+1 and y=2x+6, the separation is:
Key Takeaways
• Point-to-line distance is the perpendicular length and is always nonnegative. • Triangle area and base length derive |Ax₁+By₁+C|/√(A²+B²). • The formula is unchanged when the whole line equation is rescaled. • Match A and B before applying the parallel-line constant-difference formula. • Find a perpendicular foot by solving the original line and a perpendicular through the point. • Altitudes, perpendicular bisectors and distance identities connect earlier coordinate tools.