Skip to content

Mathematics · Ch 6 — Line and Plane

Distance of a point from a line

6.2

Distance of a point from a line

Theorem 6.5 (distance of a point from a line). Given a line rˉ=aˉ+λbˉ\bar{r} = \bar{a} + \lambda\bar{b} and any point PP with position vector αˉ\bar{\alpha}, we want a formula for the perpendicular distance of PP from the line, without having to construct the actual foot of the perpendicular by hand every time. Let AA be the known base point of the line (position vector aˉ\bar{a}), and let MM be the foot of the perpendicular dropped from PP onto the line — so MM is the point on the line closest to PP, and PMPM is perpendicular to the line. Because MM lies on the line, the segment AMAM is exactly the projection of AP‾\overline{AP} onto the line's direction; and since the line runs parallel to bˉ\bar{b}, this is the same as the projection of AP‾\overline{AP} onto bˉ\bar{b} itself. Using the standard formula for the scalar projection of one vector onto another, AM=AP‾⋅bˉ∣bˉ∣=(αˉ−aˉ)⋅bˉ∣bˉ∣.AM = \frac{\overline{AP}\cdot\bar{b}}{|\bar{b}|} = \frac{(\bar{\alpha}-\bar{a})\cdot\bar{b}}{|\bar{b}|}. Now triangle AMPAMP is right-angled at MM (since PMPM is perpendicular to the line, and AMAM lies along the line), so Pythagoras' theorem gives PM2=AP2−AM2PM^2 = AP^2 - AM^2. Since AP=∣αˉ−aˉ∣AP = |\bar{\alpha}-\bar{a}|, this becomes PM2=∣αˉ−aˉ∣2−[(αˉ−aˉ)⋅bˉ∣bˉ∣]2,PM^2 = |\bar{\alpha}-\bar{a}|^2 - \left[\frac{(\bar{\alpha}-\bar{a})\cdot\bar{b}}{|\bar{b}|}\right]^2, and taking the square root gives the required distance: PM=∣αˉ−aˉ∣2−[(αˉ−aˉ)⋅bˉ∣bˉ∣]2.PM = \sqrt{|\bar{\alpha}-\bar{a}|^2 - \left[\frac{(\bar{\alpha}-\bar{a})\cdot\bar{b}}{|\bar{b}|}\right]^2}. In words: the squared distance from A to P splits, via Pythagoras, into a part running along the line (the squared projection, which measures how far along the line the foot of the perpendicular sits) and a part running perpendicular to the line (the actual distance we want) — so subtracting the along-line part from the full squared distance AP2AP^2 isolates exactly the perpendicular part. This one formula works whether the point PP is given directly with a position vector, or the line is given in Cartesian symmetric form (in which case it is easiest to first find the actual coordinates of the foot of the perpendicular M by demanding that PMPM be perpendicular to the line's direction, as the second worked example below does).

Worked examples.

Ex.(12). Find the length of the perpendicular from P(3,2,1)P(3,2,1) to the line rˉ=(7i^+7j^+6k^)+λ(−2i^+2j^+3k^)\bar{r} = (7\hat{i}+7\hat{j}+6\hat{k}) + \lambda(-2\hat{i}+2\hat{j}+3\hat{k}). This length is exactly the distance of P from the line, so Theorem 6.5 applies directly with αˉ=3i^+2j^+k^\bar{\alpha} = 3\hat{i}+2\hat{j}+\hat{k}, aˉ=7i^+7j^+6k^\bar{a} = 7\hat{i}+7\hat{j}+6\hat{k}, and bˉ=−2i^+2j^+3k^\bar{b} = -2\hat{i}+2\hat{j}+3\hat{k}. First, αˉ−aˉ=(3i^+2j^+k^)−(7i^+7j^+6k^)=−4i^−5j^−5k^\bar{\alpha}-\bar{a} = (3\hat{i}+2\hat{j}+\hat{k}) - (7\hat{i}+7\hat{j}+6\hat{k}) = -4\hat{i}-5\hat{j}-5\hat{k}, so ∣αˉ−aˉ∣2=(−4)2+(−5)2+(−5)2=16+25+25=66.|\bar{\alpha}-\bar{a}|^2 = (-4)^2+(-5)^2+(-5)^2 = 16+25+25 = 66. Next, the dot product with bˉ\bar{b}: (αˉ−aˉ)⋅bˉ=(−4)(−2)+(−5)(2)+(−5)(3)=8−10−15=−17(\bar{\alpha}-\bar{a})\cdot\bar{b} = (-4)(-2) + (-5)(2) + (-5)(3) = 8 - 10 - 15 = -17, and ∣bˉ∣=(−2)2+22+32=17|\bar{b}| = \sqrt{(-2)^2+2^2+3^2} = \sqrt{17}. Substituting into Theorem 6.5's formula: PM=66−(−1717)2=66−17=49=7 units.PM = \sqrt{66 - \left(\frac{-17}{\sqrt{17}}\right)^2} = \sqrt{66 - 17} = \sqrt{49} = 7\ \text{units}. (Here (−1717)2=28917=17\left(\frac{-17}{\sqrt{17}}\right)^2 = \frac{289}{17} = 17, which is why the projection term simplifies so cleanly to 1717.) …

Figure 1Fig. 6.3 — Distance of a point P(ᾱ) from the line r̄ = ā + λb̄: M is the foot of the perpendicular from P to the line
Fig. 1 — Fig. 6.3 — Distance of a point P(ᾱ) from the line r̄ = ā + λb̄: M is the foot of the perpendicular from P to the line

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.

What this figure shows. Fig. 6.3 (printed page 201) illustrates the right-angled triangle used to prove Theorem 6.5. A point P(αˉ)P(\bar{\alpha}) is drawn above a horizontal line that represents rˉ=aˉ+λbˉ\bar{r} = \bar{a} + \lambda\bar{b}, with the fixed point A(aˉ)A(\bar{a}) marked at its base and an arrow labelled bˉ\bar{b} showing the line's direction running to the right. A second point M is marked on the line directly below P, with a small square drawn at M to show that PM is perpendicular to the line — M is the foot of the perpendicular dropped from P. The segment AM is the projection of AP‾\overline{AP} onto the line, so triangle AMP is right-angled at M, and this right angle is …