Property — Point–line distance

To compute the distance of a point PP from the line through S0S_0 with direction unit vector v^\hat v:

  1. a=S0P\vec a=\vec{S_0 P};
  2. a=(av^)v^\vec a_\parallel = (\vec a\cdot\hat v)\,\hat v (component along the line);
  3. a=aa\vec a_\perp = \vec a - \vec a_\parallel;
  4. d=ad = |\vec a_\perp|.

Example

Let P(6;1;3)P(6;-1;-3) and the line through A(0;3;4)A(0;3;4), B(1;1;1)B(-1;-1;-1). Then v=(1;4;5)\vec v=(-1;-4;-5) and v^=v/42\hat v=\vec v/\sqrt{42}; moreover a=AP=(6;4;7)\vec a=\vec{AP}=(6;-4;-7). One obtains av^6,95\vec a\cdot\hat v \approx 6{,}95, whence a6,95v^\vec a_\parallel\approx 6{,}95\,\hat v, a=aa\vec a_\perp = \vec a - \vec a_\parallel and finally d=a7,26.d=|\vec a_\perp|\approx 7{,}26.

Topics: Analytic geometry in space
Concepts: Parallel component · Point-line distance · Line · Line in space
Skills: Analytic geometry · Using formulae