Projection onto a line and point-to-line distance — 9709 P3
Impose a zero scalar product to locate the foot.
Notes and key methods
For the line \(\displaystyle r=a\)+td and a point P with position p, the foot \(\displaystyle H=a+t_{0}d\) satisfies \(\displaystyle (p-H)\cdot d=0\). Hence \(\displaystyle t_{0}= \frac{(\mathbf{p}- \mathbf{a})\cdot \mathbf{d}}{\mathbf{d}\cdot \mathbf{d}}\).
After finding H, use |p−H| for the point-line distance and verify the perpendicular dot product. No vector product is needed.
Check the conditions
The line direction d is nonzero.
The foot is on the infinite line unless a segment restriction is stated.
Three worked examples
Example 1 · Foot of a perpendicular onto a line
A line is \(\mathbf r=\left[\begin{matrix}4\\2\\1\end{matrix}\right]+t\left[\begin{matrix}4\\2\\2\end{matrix}\right]\). Point P has position \(\left[\begin{matrix}9\\8\\5\end{matrix}\right]\). H is the foot of its perpendicular to the line.
The point H corresponds to parameter \(\displaystyle t=t_{0}\).
Find H and verify perpendicularity.
Find the exact distance from P to the line.
Find the y-coordinate of H.
Find the squared distance \(\displaystyle PH^{2}\).
Show the reasoning
(a)
\(0 = 0\) verifies that PH is perpendicular to the nonzero line direction.
The point-line distance is the magnitude of the perpendicular residual p−H.
Answer: \(\displaystyle \frac{\sqrt{93}}{3}\)
(c)
Use the same parameter in every component.
\(\displaystyle \frac{16}{3}\)
Answer: \(\displaystyle \frac{16}{3}\).
(d)
Subtract the foot from P and take the squared magnitude.
\(\displaystyle \frac{31}{3}\)
Answer: \(\displaystyle \frac{31}{3}\).
Example 2 · Foot of a perpendicular onto a line
A line is \(\mathbf r=\left[\begin{matrix}5\\2\\2\end{matrix}\right]+t\left[\begin{matrix}1\\2\\3\end{matrix}\right]\). Point P has position \(\left[\begin{matrix}11\\9\\3\end{matrix}\right]\). H is the foot of its perpendicular to the line.
The point H corresponds to parameter \(\displaystyle t=t_{0}\).
Find H and verify perpendicularity.
Find the exact distance from P to the line.
Find the y-coordinate of H.
Find the squared distance \(\displaystyle PH^{2}\).
Show the reasoning
(a)
\(0 = 0\) verifies that PH is perpendicular to the nonzero line direction.
The point-line distance is the magnitude of the perpendicular residual p−H.
Answer: \(\displaystyle \frac{15 \sqrt{42}}{14}\)
(c)
Use the same parameter in every component.
\(\displaystyle \frac{37}{7}\)
Answer: \(\displaystyle \frac{37}{7}\).
(d)
Subtract the foot from P and take the squared magnitude.
\(\displaystyle \frac{675}{14}\)
Answer: \(\displaystyle \frac{675}{14}\).
Example 3 · Foot of a perpendicular onto a line
A line is \(\mathbf r=\left[\begin{matrix}6\\2\\3\end{matrix}\right]+t\left[\begin{matrix}2\\2\\4\end{matrix}\right]\). Point P has position \(\left[\begin{matrix}8\\10\\5\end{matrix}\right]\). H is the foot of its perpendicular to the line.
The point H corresponds to parameter \(\displaystyle t=t_{0}\).
Find H and verify perpendicularity.
Find the exact distance from P to the line.
Find the y-coordinate of H.
Find the squared distance \(\displaystyle PH^{2}\).
Show the reasoning
(a)
\(0 = 0\) verifies that PH is perpendicular to the nonzero line direction.