Perpendicular Foot and Distance
Perpendicular Foot and Distance
Enter a point and ax+by+c=0 to find the perpendicular foot and shortest distance to the infinite line.
- 59 bytes
- COMP mode
Worked examples
Example 1
P(2,0) and l: x+y=4 are given. Find the shortest distance from P to l.
Answer
Standard solution (without a calculator)
- Rewrite: x+y−4=0; (x₀,y₀,a,b,c)=(2,0,1,1,−4)
- Calculate: t=(1(2)+1(0)−4)/(1²+1²)=−1
- Calculate: H=(2−1(−1),0−1(−1))=(3,1)
- Calculate: PH=|−1|√(1²+1²)=√2≈1.414213562
- Therefore: Answer B
Example 2
A building is at P(−1,5) and a vertical road is x=3. Find the perpendicular foot H and the shortest distance PH.
Answer
Standard solution (without a calculator)
- Rewrite: x−3=0; (x₀,y₀,a,b,c)=(−1,5,1,0,−3)
- Calculate: t=(1(−1)+0(5)−3)/(1²+0²)=−4
- Calculate: H=(−1−1(−4),5−0(−4))=(3,5)
- Calculate: PH=|−4|√1=4
- Therefore: Answer A
Example 3
A circle has centre R(4,7) and radius 3. The line l: 3x+4y−60=0 does not intersect it. (a) Find the perpendicular foot P from R to l. (b) Find RP. (c) Find the nearest point Q on the circle and its distance to l.
Answer
Standard solution (without a calculator)
- Rewrite: (x₀,y₀,a,b,c)=(4,7,3,4,−60); √(3²+4²)=5
- Calculate: t=(3(4)+4(7)−60)/25=−4/5; P=(4−3t,7−4t)=(6.4,10.2)
- Calculate: RP=|−4/5|(5)=4>3; (a) P=(6.4,10.2); (b) RP=4
- Calculate: (c) Q=R+(3/4)(P−R)=(4+(3/4)(2.4),7+(3/4)(3.2))=(5.8,9.4)
- Therefore: Shortest distance: 4−3=1; Q=(5.8,9.4)
When to use it
Enter a point and ax+by+c=0 to find the perpendicular foot and shortest distance to the infinite line.
Use it for
- Perpendicular Foot and Distance
You enter
- X=x₀ → Y=y₀ → A=a → B=b → C=c; ax+by+c=0
- Use COMP / Deg / Norm 1. Enter every value anew; blank EXE keeps the stored value rather than entering zero.
It shows
- Foot: x-coordinate → Foot: y-coordinate → Shortest distance
- Do not use this infinite-line result as a line-segment distance without checking the endpoints.
Check before starting
- a²+b²>0; a=b=0 ⇒ Math ERROR; Do not use this infinite-line result as a line-segment distance without checking the endpoints.
- Finite precision can affect nearly parallel lines, very large values or tiny differences; extreme data may give Math ERROR. This is numerical calculation, not symbolic algebra.
- These are original DSE-style exercises.
Checking access…