Further Maths/Lessons/Vectors/Finding Perpendiculars
Core Pure · Vectors · Year 1

Finding Perpendiculars

The shortest distance from a point to a line or plane always runs along a perpendicular — find the foot of that perpendicular, and the distance follows immediately.

19 min read 5 worked examples

Shortest distance from a point to a line

Method 38.1 — foot of perpendicular from a point to a line

To find the shortest distance from point $P$ to line $\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}$: let $F=\mathbf{a}+\lambda\mathbf{d}$ be a general point on the line. The vector $\vec{PF}$ is perpendicular to the line exactly when $\vec{PF}\cdot\mathbf{d}=0$. Solve this equation for $\lambda$ to find $F$, the foot of the perpendicular, then the distance is $|\vec{PF}|$.

A straight line in 3D with a point P not on the line, and a dashed perpendicular segment drawn from P down to a labelled point F on the line, showing the shortest distance from the point to the line
Fig. 1 — the foot of the perpendicular F is the unique point on the line closest to P, where PF meets the line at a right angle.
Example 1 · Shortest distance from a point to a line
Find the shortest distance from $P(1,0,2)$ to the line $\mathbf{r}=(2,1,0)+\lambda(1,1,-1)$.

General point on line: $F=(2+\lambda,1+\lambda,-\lambda)$. Then $\vec{PF}=F-P=(1+\lambda,1+\lambda,-\lambda-2)$.

$\vec{PF}\cdot(1,1,-1)=0$: $(1+\lambda)+(1+\lambda)-(-\lambda-2)=0 \Rightarrow 1+\lambda+1+\lambda+\lambda+2=0 \Rightarrow 3\lambda+4=0 \Rightarrow \lambda=-\tfrac43$.

$F=(2-\tfrac43,1-\tfrac43,\tfrac43)=(\tfrac23,-\tfrac13,\tfrac43)$. $\vec{PF}=(\tfrac23-1,-\tfrac13,\tfrac43-2)=(-\tfrac13,-\tfrac13,-\tfrac23)$.

$$|\vec{PF}|=\sqrt{\tfrac19+\tfrac19+\tfrac49}=\sqrt{\tfrac69}=\sqrt{\tfrac23}=\frac{\sqrt6}{3}$$

Shortest distance between two skew lines

Method 38.1b — shortest distance between two skew lines

For two skew lines with general points $F_1=\mathbf{a}_1+s\mathbf{d}_1$ and $F_2=\mathbf{a}_2+t\mathbf{d}_2$, the connecting vector $\vec{F_1F_2}$ is shortest exactly when it is perpendicular to both direction vectors at once. This gives two equations — $\vec{F_1F_2}\cdot\mathbf{d}_1=0$ and $\vec{F_1F_2}\cdot\mathbf{d}_2=0$ — which can be solved simultaneously for $s$ and $t$, and then $|\vec{F_1F_2}|$ is the shortest distance.

Example 2 · Shortest distance between two skew lines
Find the shortest distance between the lines $\mathbf{r}_1=(1,0,0)+s(1,1,0)$ and $\mathbf{r}_2=(0,2,1)+t(0,1,1)$.

General points: $F_1=(1+s,s,0)$, $F_2=(0,2+t,1+t)$.

$\vec{F_1F_2}=F_2-F_1=(-1-s,\,2+t-s,\,1+t)$.

Perpendicular to $\mathbf{d}_1=(1,1,0)$: $(-1-s)+(2+t-s)=0 \Rightarrow 1+t-2s=0$.

Perpendicular to $\mathbf{d}_2=(0,1,1)$: $(2+t-s)+(1+t)=0 \Rightarrow 3+2t-s=0$.

From the first equation, $t=2s-1$. Substituting into the second: $3+2(2s-1)-s=0 \Rightarrow 3s+1=0 \Rightarrow s=-\tfrac13$, so $t=-\tfrac53$.

$\vec{F_1F_2}=(-1+\tfrac13,\,2-\tfrac53+\tfrac13,\,1-\tfrac53)=(-\tfrac23,\,\tfrac23,\,-\tfrac23)$.

$$|\vec{F_1F_2}|=\sqrt{\tfrac49+\tfrac49+\tfrac49}=\sqrt{\tfrac{12}{9}}=\frac{2\sqrt3}{3}$$
Watch out

This method only gives the shortest distance for lines that are not parallel. If the two lines are parallel, the connecting segment between corresponding general points is never uniquely perpendicular to both (infinitely many perpendicular segments exist, all of equal length) — in that case, pick any point on one line and use the point-to-line method above against the other line instead.

Shortest distance from a point to a plane

Theorem 38.2 — distance from a point to a plane

For a plane $n_1x+n_2y+n_3z=d$ and a point $P=(p_1,p_2,p_3)$, the shortest distance is $$\text{distance}=\frac{|n_1p_1+n_2p_2+n_3p_3-d|}{|\mathbf{n}|}$$ where $\mathbf{n}=(n_1,n_2,n_3)$ is the normal vector. This follows from projecting the vector from any point on the plane to $P$ onto the (unit) normal direction.

Example 3 · Distance from a point to a plane
Find the shortest distance from $P(3,-1,2)$ to the plane $2x-y+2z=5$.

$\mathbf{n}=(2,-1,2)$, $|\mathbf{n}|=\sqrt{4+1+4}=3$.

$n_1p_1+n_2p_2+n_3p_3=2(3)-1(-1)+2(2)=6+1+4=11$.

Distance $=\dfrac{|11-5|}{3}=\dfrac63=2$.

Finding the foot of the perpendicular to a plane

Example 4 · Foot of the perpendicular to a plane
Find the foot of the perpendicular from $P(1,2,-3)$ to the plane $x+2y-2z=3$.

The perpendicular from $P$ has direction equal to the normal $\mathbf{n}=(1,2,-2)$, so its equation is $\mathbf{r}=(1,2,-3)+\lambda(1,2,-2)$.

Substitute into the plane: $(1+\lambda)+2(2+2\lambda)-2(-3-2\lambda)=3$

$1+\lambda+4+4\lambda+6+4\lambda=3 \Rightarrow 11+9\lambda=3 \Rightarrow \lambda=-\dfrac89$.

Foot: $x=1-\tfrac89=\tfrac19$, $y=2-\tfrac{16}{9}=\tfrac29$, $z=-3+\tfrac{16}{9}=-\tfrac{11}{9}$.

Foot of perpendicular: $\left(\tfrac19,\tfrac29,-\tfrac{11}{9}\right)$.

Example 5 · Combining line and plane distance methods
Verify the distance found in Example 2 by an alternative method: find the foot of the perpendicular from $P(3,-1,2)$ to the plane $2x-y+2z=5$, then compute the distance directly.

Perpendicular line: $\mathbf{r}=(3,-1,2)+\lambda(2,-1,2)$.

Substitute: $2(3+2\lambda)-(-1-\lambda)+2(2+2\lambda)=5$

$6+4\lambda+1+\lambda+4+4\lambda=5 \Rightarrow 11+9\lambda=5 \Rightarrow \lambda=-\dfrac23$.

Foot: $x=3-\tfrac43=\tfrac53$, $y=-1+\tfrac23=-\tfrac13$, $z=2-\tfrac43=\tfrac23$.

$\vec{PF}=\left(\tfrac53-3,-\tfrac13+1,\tfrac23-2\right)=\left(-\tfrac43,\tfrac23,-\tfrac43\right)$.

$|\vec{PF}|=\sqrt{\tfrac{16}{9}+\tfrac49+\tfrac{16}{9}}=\sqrt{\tfrac{36}{9}}=\sqrt4=2$ ✓ (matches Example 2).

Common mistake

When finding the foot of a perpendicular to a plane, the direction of the perpendicular line must be the plane's normal vector, not an arbitrary direction lying in the plane — using the wrong direction gives a line that doesn't meet the plane at a right angle.

Exam-style questions

Question 1 6 marks

Find the shortest distance from the point $Q(0,0,0)$ to the line $\mathbf{r}=(1,2,1)+\lambda(1,-1,1)$.

General point: $F=(1+\lambda,2-\lambda,1+\lambda)$. $\vec{QF}=F-Q=(1+\lambda,2-\lambda,1+\lambda)$. (M1)

$\vec{QF}\cdot(1,-1,1)=0$: $(1+\lambda)-(2-\lambda)+(1+\lambda)=0 \Rightarrow 3\lambda=0 \Rightarrow \lambda=0$ (M1, A1)

$F=(1,2,1)$, so $\vec{QF}=(1,2,1)$, and $|\vec{QF}|=\sqrt{1+4+1}=\sqrt6$ (M1, A1, A1)

Question 1b 7 marks

Find the shortest distance between the skew lines $\mathbf{r}_1=(2,0,1)+s(1,0,1)$ and $\mathbf{r}_2=(0,1,-1)+t(1,1,0)$.

General points: $F_1=(2+s,0,1+s)$, $F_2=(t,1+t,-1)$. $\vec{F_1F_2}=(t-2-s,\,1+t,\,-2-s)$ (M1, A1)

Perpendicular to $\mathbf{d}_1=(1,0,1)$: $(t-2-s)+(-2-s)=0 \Rightarrow t-2s-4=0$ (M1)

Perpendicular to $\mathbf{d}_2=(1,1,0)$: $(t-2-s)+(1+t)=0 \Rightarrow 2t-s-1=0$ (M1)

Solving simultaneously: $s=-\tfrac73$, $t=-\tfrac23$ (A1)

$\vec{F_1F_2}=\left(-\tfrac13,\tfrac13,\tfrac13\right)$, so distance $=\sqrt{\tfrac19+\tfrac19+\tfrac19}=\dfrac{1}{\sqrt3}=\dfrac{\sqrt3}{3}$ (M1, A1)

Question 2 5 marks

Find the shortest distance from $P(2,1,-1)$ to the plane $3x-4y+5z=10$, giving your answer to 3 significant figures.

$\mathbf{n}=(3,-4,5)$, $|\mathbf{n}|=\sqrt{9+16+25}=\sqrt{50}$ (M1, A1)

$n_1p_1+n_2p_2+n_3p_3=3(2)-4(1)+5(-1)=6-4-5=-3$ (M1)

Distance $=\dfrac{|-3-10|}{\sqrt{50}}=\dfrac{13}{\sqrt{50}}=1.84$ (3 s.f.) (A1, A1)

Question 3 6 marks

Find the foot of the perpendicular from $P(0,1,4)$ to the plane $x-y+z=2$, and hence find the shortest distance from $P$ to the plane.

Perpendicular line: $\mathbf{r}=(0,1,4)+\lambda(1,-1,1)$ (M1)

Substitute: $(\lambda)-(1-\lambda)+(4+\lambda)=2 \Rightarrow 3\lambda+3=2 \Rightarrow \lambda=-\tfrac13$ (M1, A1)

Foot: $\left(-\tfrac13,\tfrac43,\tfrac{11}{3}\right)$ (A1)

$\vec{PF}=\left(-\tfrac13,\tfrac13,-\tfrac13\right)$, $|\vec{PF}|=\sqrt{\tfrac19+\tfrac19+\tfrac19}=\sqrt{\tfrac13}=\dfrac{1}{\sqrt3}$ (M1, A1)