Foot of Perpendicular from a Point to a Line
For:
$$\vec r=\vec a+\lambda\vec d$$
and point $$p$$ with position vector $$\vec p$$, let the foot be $$h$$:
$$\vec h=\vec a+\lambda\vec d$$
The perpendicularity condition is:
$$(\vec p-\vec h)\cdot\vec d=0$$
Hence:
$$\lambda=\frac{(\vec p-\vec a)\cdot\vec d}{|\vec d|^2}$$
Usage
- Used to locate the perpendicular projection of a point onto a line.