F6 - Perpendicular distances

F6 - Perpendicular distances

The shortest route to a line or plane is perpendicular to it. You will find perpendicular feet and distances, then extend the same idea to two lines in space. Choosing the right normal matters: skew lines and parallel lines require different calculations.

Point-line distance by projection or cross product

A point is not on a line. Which point on the line is closest to it? Choosing the line's stated starting point rarely gives the shortest route. You need the foot of a perpendicular.

For a concrete case, let A=(1,0,1)A=(1,0,1), let the line have direction u=(1,1,0)\mathbf{u}=(1,1,0), and take P=(3,0,1)P=(3,0,1). Moving from AA along the line first brings you closer to PP, then takes you away again. At the closest point HH, the joining vector HP→\overrightarrow{HP} has zero scalar product with u\mathbf{u}.

Write the line as r=a+tu\mathbf{r}=\mathbf{a}+t\mathbf{u}, where u≠0\mathbf{u}\ne\mathbf{0}, and put v=p−a=AP→\mathbf{v}=\mathbf{p}-\mathbf{a}=\overrightarrow{AP}. If HH has parameter tt, then HP→=v−tu\overrightarrow{HP}=\mathbf{v}-t\mathbf{u}. Perpendicularity gives

(v−tu)⋅u=0⟹t=v⋅uu⋅u(\mathbf{v}-t\mathbf{u})\cdot\mathbf{u}=0 \quad\Longrightarrow\quad t=\frac{\mathbf{v}\cdot\mathbf{u}}{\mathbf{u}\cdot\mathbf{u}}

Since u≠0\mathbf{u}\ne\mathbf{0}, the denominator is positive. Once HH is found, the distance is ∣HP→∣|\overrightarrow{HP}|. Any other point QQ on the line makes a right triangle with PP and HH, so PQ2=PH2+HQ2≥PH2PQ^2=PH^2+HQ^2\ge PH^2. This proves the perpendicular route is shortest, including distance zero when PP lies on the line.

There is a second route when only the distance is wanted. The parallelogram spanned by u\mathbf{u} and v\mathbf{v} has area ∣v×u∣|\mathbf{v}\times\mathbf{u}|; it also has base ∣u∣|\mathbf{u}| and height equal to the required distance.

Point-line distance

For PP with position vector p\mathbf{p} and the line r=a+tu\mathbf{r}=\mathbf{a}+t\mathbf{u}, with u≠0\mathbf{u}\ne\mathbf{0},

D=∣(p−a)×u∣∣u∣D=\frac{|(\mathbf{p}-\mathbf{a})\times\mathbf{u}|}{|\mathbf{u}|}

Alternatively, find the foot h=a+tu\mathbf{h}=\mathbf{a}+t\mathbf{u} using t=((p−a)⋅u)/(u⋅u)t=((\mathbf{p}-\mathbf{a})\cdot\mathbf{u})/(\mathbf{u}\cdot\mathbf{u}), then calculate D=∣p−h∣D=|\mathbf{p}-\mathbf{h}|.

These distance and foot formulae are not in the formula booklet: learn the perpendicularity argument. The booklet supplies vector-product and resolved-part formulae.

Use projection when the foot itself is required; the cross product is often shorter when only distance is required.

Worked example 1: finding the perpendicular foot

Question. Find the point on L: r=(1,0,1)+t(1,1,0)L:\ \mathbf{r}=(1,0,1)+t(1,1,0) closest to P=(3,0,1)P=(3,0,1), and find the distance from PP to LL.

Plan. Make the joining vector perpendicular to the line, solve for tt, and calculate its length.

v=(3,0,1)−(1,0,1)=(2,0,0)form AP→t=(2,0,0)⋅(1,1,0)(1,1,0)⋅(1,1,0)=22=1project onto the directionH=(1,0,1)+(1,1,0)=(2,1,1)locate the footD=∣(3,0,1)−(2,1,1)∣=∣(1,−1,0)∣=2take the joining length\begin{aligned} \mathbf{v}&=(3,0,1)-(1,0,1)=(2,0,0) &&\text{form }\overrightarrow{AP}\\ t&=\frac{(2,0,0)\cdot(1,1,0)}{(1,1,0)\cdot(1,1,0)} =\frac22=1 &&\text{project onto the direction}\\ H&=(1,0,1)+(1,1,0)=(2,1,1) &&\text{locate the foot}\\ D&=|(3,0,1)-(2,1,1)|=|(1,-1,0)|=\sqrt2 &&\text{take the joining length} \end{aligned}

Answer. The closest point is (2,1,1)(2,1,1), at distance 2\sqrt2.

Check. The cross-product method gives (2,0,0)×(1,1,0)=(0,0,2)(2,0,0)\times(1,1,0)=(0,0,2), so D=2/2=2D=2/\sqrt2=\sqrt2, independently confirming the length.

Keep the line fixed and change only PP's height from 11 to 44. The line direction has zero third component, so the projection parameter will stay the same.

Worked example 2: using the area route

Question. Find the distance from P=(3,0,4)P=(3,0,4) to the same line L: r=(1,0,1)+t(1,1,0)L:\ \mathbf{r}=(1,0,1)+t(1,1,0).

Plan. Form the displacement from a point on the line, then divide the parallelogram area by the direction-vector length.

v=(2,0,3)subtract the line pointv×u=(2,0,3)×(1,1,0)=(−3,3,2)calculate the area vectorD=(−3)2+32+2212+12area divided by base=222=11\begin{aligned} \mathbf{v}&=(2,0,3) &&\text{subtract the line point}\\ \mathbf{v}\times\mathbf{u}&=(2,0,3)\times(1,1,0)=(-3,3,2) &&\text{calculate the area vector}\\ D&=\frac{\sqrt{(-3)^2+3^2+2^2}}{\sqrt{1^2+1^2}} &&\text{area divided by base}\\ &=\frac{\sqrt{22}}{\sqrt2}=\sqrt{11} \end{aligned}

Answer. 11\sqrt{11}.

Check. Projection still gives t=(2+0)/2=1t=(2+0)/2=1 and H=(2,1,1)H=(2,1,1). Now HP→=(1,−1,3)\overrightarrow{HP}=(1,-1,3), whose squared length is 1+1+9=111+1+9=11, and whose dot product with (1,1,0)(1,1,0) is zero.

In the cross-section below, both the line and the point lie in the page. To construct your own distance diagram, draw the line, mark a point AA on it and place PP off it. Drop a perpendicular from PP to the line, label its foot HH, and mark the right angle. The triangle AHPAHP separates movement along the line from the perpendicular distance; its page is the plane containing the line and PP, rather than necessarily a coordinate plane.

[DIAGRAM: asset_name: A perpendicular foot gives the shortest route; asset_slug: aqa7367-point-line-foot; caption: The displacement AP splits into a component along the line and the perpendicular HP; description: An equal-scale cross-section through A, H and P from Worked example 2. A is drawn at (0,0), H at (square root of two,0) and P at (square root of two,square root of eleven) in local orthogonal coordinates. The horizontal blue line extends through A and H. A dashed grey AP has length square root of thirteen, the blue AH has length square root of two and the clay perpendicular HP has length square root of eleven. A right-angle marker appears at H. The actual three-dimensional coordinates A equals (1,0,1), H equals (2,1,1) and P equals (3,0,4) are labelled separately.]
The displacement AP splits into a component along the line and the perpendicular HP

The diagram also explains the area formula: the same height is perpendicular to every base segment along the line. Reading off APAP instead would use the hypotenuse and overestimate the distance.

Watch out

Wrong: D=∣p−a∣D=|\mathbf{p}-\mathbf{a}|. This is the distance to the chosen point AA, not necessarily to the line. It gives the shortest distance only when that displacement is perpendicular to the line.

Find both the foot and distance for a fresh line.

Point-plane distance along a normal

To reach a plane by the shortest route, move along its normal. Movement within the plane can only make a joining segment longer.

For example, the distance from (2,1,1)(2,1,1) to x+2y+2z=1x+2y+2z=1 is not the equation's residual 2+2+2−1=52+2+2-1=5. That number uses the normal (1,2,2)(1,2,2), whose length is 33. Dividing by the normal length converts the residual into a distance.

For n⋅r=d\mathbf{n}\cdot\mathbf{r}=d, with n≠0\mathbf{n}\ne\mathbf{0}, choose any point AA in the plane. The scalar projection of AP→\overrightarrow{AP} onto the normal direction is

(p−a)⋅n∣n∣=n⋅p−d∣n∣\frac{(\mathbf{p}-\mathbf{a})\cdot\mathbf{n}}{|\mathbf{n}|} =\frac{\mathbf{n}\cdot\mathbf{p}-d}{|\mathbf{n}|}

It is signed, indicating which side of the plane contains PP. Its absolute value is the distance. To find the foot, subtract the vector projection onto the normal:

h=p−n⋅p−dn⋅nn\mathbf{h}=\mathbf{p} -\frac{\mathbf{n}\cdot\mathbf{p}-d}{\mathbf{n}\cdot\mathbf{n}}\mathbf{n}

This point lies in the plane because taking its dot product with n\mathbf{n} gives dd; its displacement from PP is a normal multiple. These two checks establish that it is the perpendicular foot.

Point-plane distance

For a plane ax+by+cz=dax+by+cz=d, where (a,b,c)≠(0,0,0)(a,b,c)\ne(0,0,0), and a point P=(x0,y0,z0)P=(x_0,y_0,z_0),

D=∣ax0+by0+cz0−d∣a2+b2+c2D=\frac{|ax_0+by_0+cz_0-d|}{\sqrt{a^2+b^2+c^2}}

Not in the formula booklet: learn it through the normal projection.

If the plane is given as ax+by+cz+e=0ax+by+cz+e=0, the numerator is ∣ax0+by0+cz0+e∣|ax_0+by_0+cz_0+e|. Keep the equation's sign convention consistent. A point already in the plane gives distance zero.

Worked example 3: one side of a plane

Question. Find the distance from P=(2,1,1)P=(2,1,1) to x+2y+2z=1x+2y+2z=1, and find the perpendicular foot.

Plan. Use the normalised residual for the distance, then subtract the normal projection for the foot.

n=(1,2,2),∣n∣=3read the normaln⋅p−d=2+2+2−1=5evaluate the residualD=∣5∣3=53H=(2,1,1)−59(1,2,2)subtract the normal projection=(139,−19,−19)\begin{aligned} \mathbf{n}&=(1,2,2),\quad |\mathbf{n}|=3 &&\text{read the normal}\\ \mathbf{n}\cdot\mathbf{p}-d&=2+2+2-1=5 &&\text{evaluate the residual}\\ D&=\frac{|5|}{3}=\frac53\\ H&=(2,1,1)-\frac59(1,2,2) &&\text{subtract the normal projection}\\ &=\left(\frac{13}{9},-\frac19,-\frac19\right) \end{aligned}

Answer. Distance 5/35/3; foot (13/9,−1/9,−1/9)(13/9,-1/9,-1/9).

Check. The foot satisfies 13/9+2(−1/9)+2(−1/9)=113/9+2(-1/9)+2(-1/9)=1. Also HP→=59(1,2,2)\overrightarrow{HP}=\tfrac59(1,2,2), so it is normal to the plane and has length 59(3)=5/3\tfrac59(3)=5/3.

Reflect the point through A=(1,0,0)A=(1,0,0), which lies in the plane. This changes PP to (0,−1,−1)(0,-1,-1), reversing the residual but preserving the distance.

Worked example 4: the other side of the same plane

Question. Find the distance from P=(0,−1,−1)P=(0,-1,-1) to x+2y+2z=1x+2y+2z=1, and find the perpendicular foot.

Plan. Keep the plane normal fixed and use the signed residual before taking the absolute value.

n⋅p−d=0−2−2−1=−5evaluate the new residualD=∣−5∣3=53distance is nonnegativeH=(0,−1,−1)−−59(1,2,2)subtract a negative projection=(59,19,19)\begin{aligned} \mathbf{n}\cdot\mathbf{p}-d&=0-2-2-1=-5 &&\text{evaluate the new residual}\\ D&=\frac{|-5|}{3}=\frac53 &&\text{distance is nonnegative}\\ H&=(0,-1,-1)-\frac{-5}{9}(1,2,2) &&\text{subtract a negative projection}\\ &=\left(\frac59,\frac19,\frac19\right) \end{aligned}

Answer. Distance 5/35/3; foot (5/9,1/9,1/9)(5/9,1/9,1/9).

Check. The foot satisfies 5/9+2/9+2/9=15/9+2/9+2/9=1. It is the reflection of the previous foot through (1,0,0)(1,0,0), so the two perpendicular segments have equal lengths, as symmetry predicts.

Multiplying the entire plane equation by any nonzero constant changes both numerator and denominator by the same absolute factor, so it cannot change the distance.

Watch out

Wrong: D=−5/3D=-5/3. A signed projection can be negative; a distance cannot. Take the absolute value of the residual and divide by the normal's length, not its squared length.

Use the formula with a new plane and a new point.

Distances between skew or parallel lines

For two skew lines, the shortest joining segment must be perpendicular to both directions. For two parallel lines, a joining segment perpendicular to their shared direction gives the shortest route.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account