048Mathematics · Coordinate geometry

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
01

Worked examples

Example 1

P(2,0) and l: x+y=4 are given. Find the shortest distance from P to l.

  1. A.1
  2. B.√2
  3. C.2
  4. D.2√2
Answer
B — √2
Standard solution (without a calculator)
  1. Rewrite: x+y−4=0; (x₀,y₀,a,b,c)=(2,0,1,1,−4)
  2. Calculate: t=(1(2)+1(0)−4)/(1²+1²)=−1
  3. Calculate: H=(2−1(−1),0−1(−1))=(3,1)
  4. Calculate: PH=|−1|√(1²+1²)=√2≈1.414213562
  5. Therefore: Answer B
Do it on the calculator

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.

  1. A.H=(3,5), PH=4
  2. B.H=(-1,3), PH=2
  3. C.H=(3,-5), PH=10
  4. D.H=(-1,5), PH=0
Answer
A — H=(3,5), PH=4
Standard solution (without a calculator)
  1. Rewrite: x−3=0; (x₀,y₀,a,b,c)=(−1,5,1,0,−3)
  2. Calculate: t=(1(−1)+0(5)−3)/(1²+0²)=−4
  3. Calculate: H=(−1−1(−4),5−0(−4))=(3,5)
  4. Calculate: PH=|−4|√1=4
  5. Therefore: Answer A
Do it on the calculator

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
(a) P=(6.4,10.2); (b) RP=4; (c) Q=(5.8,9.4), Shortest distance = 1
Standard solution (without a calculator)
  1. Rewrite: (x₀,y₀,a,b,c)=(4,7,3,4,−60); √(3²+4²)=5
  2. Calculate: t=(3(4)+4(7)−60)/25=−4/5; P=(4−3t,7−4t)=(6.4,10.2)
  3. Calculate: RP=|−4/5|(5)=4>3; (a) P=(6.4,10.2); (b) RP=4
  4. Calculate: (c) Q=R+(3/4)(P−R)=(4+(3/4)(2.4),7+(3/4)(3.2))=(5.8,9.4)
  5. Therefore: Shortest distance: 4−3=1; Q=(5.8,9.4)
Do it on the calculator
02

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.

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.

Checking access…

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.