Menu
Sign up Sign in

AI HL · AHL 4

Vectors

AHL 4.16

Shortest distance from a point to a line

AHL 4.16

Shortest distance from a point to a line

Target: I can write a general point B on a line and the vector from a given point A to B. (+3 more)

By the end of this section

Key points

The idea

  • The shortest distance from a point A to a line is measured along the perpendicular from A to the line.
  • Call the point where the perpendicular meets the line B. It is the foot of the perpendicular.
  • Two vectors are perpendicular when their scalar product is 0. That is the equation you use.

The four steps

  • Step 1: write a general point B on the line, \(\overrightarrow{OB} = \mathbf{a} + \lambda\mathbf{d}\).
  • Step 2: find \(\overrightarrow{AB} = \overrightarrow{OB} - \overrightarrow{OA}\). It still contains λ.
  • Step 3: solve \(\overrightarrow{AB} \cdot \mathbf{d} = 0\) for λ. Then put λ back to find B.
  • Step 4: the shortest distance is \(|\overrightarrow{AB}|\), with λ put in.

Watch for

  • If the line is in i, j, k form, rewrite it as a column first. A missing component is 0.
  • The scalar product uses the direction vector \(\mathbf{d}\), not the position vector \(\mathbf{a}\).
  • A line given by two points P and Q has direction vector \(\overrightarrow{PQ}\).

Explore: the shortest distance from a point to a line

Drag P. Slide R along the line r = a + λd until PR is perpendicular to the line. Find it by hand first, then press the button to check.

PR · d
Distance |PR|

Click P, then use the arrow keys to move it one unit. Click the slider and use the arrow keys to move R.

Slide R along the line.

  1. Slide R slowly from the left to the right. What happens to PR · d, and what happens to |PR|? Why does |PR| stop getting shorter exactly when PR · d reaches 0?
  2. Drag P to the other side of the line. Does the closest point R move? Does λ change?
  3. Drag P to a point on the line. What are PR · d and |PR| now?
  4. In the method, why is the scalar product with d used and not with a?

Worked examples

Problems like the ones in class. Pick one, try it, then open the working.
The foot of the perpendicular

The line \(l\) has equation \(\mathbf{r} = \begin{pmatrix}1\\0\\-3\end{pmatrix} + \lambda\begin{pmatrix}2\\-1\\2\end{pmatrix}\). The point \(A\) has coordinates \((-1, -3, 2)\). The point \(B\) lies on \(l\) and \(AB\) is perpendicular to \(l\). Find the coordinates of \(B\).

Working
  1. A general point B

    \(\overrightarrow{OB} = \begin{pmatrix}1\\0\\-3\end{pmatrix} + \lambda\begin{pmatrix}2\\-1\\2\end{pmatrix} = \begin{pmatrix}1 + 2\lambda\\-\lambda\\-3 + 2\lambda\end{pmatrix}\)

    B is on the line, so its position vector has this form for some value of λ.

  2. The vector AB

    \(\overrightarrow{AB} = \overrightarrow{OB} - \overrightarrow{OA} = \begin{pmatrix}2 + 2\lambda\\3 - \lambda\\-5 + 2\lambda\end{pmatrix}\)

    End point minus start point.

  3. Make it perpendicular

    \(\overrightarrow{AB} \cdot \begin{pmatrix}2\\-1\\2\end{pmatrix} = 0 \Rightarrow 2(2 + 2\lambda) - (3 - \lambda) + 2(-5 + 2\lambda) = 0 \Rightarrow -9 + 9\lambda = 0\)

    The shortest distance is along the perpendicular, so AB · d = 0. This gives one equation in λ.

  4. Solve for λ

    \(\lambda = 1\)

    Substitute back to find B.

  5. The foot of the perpendicular

    \(B\left(3, -1, -1\right)\)

    Put λ into the general point.

Video walkthrough coming
Shortest distance to a line

Find the shortest distance from the point \(A(2, 1, 3)\) to the line \(\mathbf{r} = \begin{pmatrix}0\\2\\-1\end{pmatrix} + \lambda\begin{pmatrix}1\\-2\\2\end{pmatrix}\).

Working
  1. A general point B

    \(\overrightarrow{OB} = \begin{pmatrix}0\\2\\-1\end{pmatrix} + \lambda\begin{pmatrix}1\\-2\\2\end{pmatrix} = \begin{pmatrix}\lambda\\2 - 2\lambda\\-1 + 2\lambda\end{pmatrix}\)

    B is on the line, so its position vector has this form for some value of λ.

  2. The vector AB

    \(\overrightarrow{AB} = \overrightarrow{OB} - \overrightarrow{OA} = \begin{pmatrix}-2 + \lambda\\1 - 2\lambda\\-4 + 2\lambda\end{pmatrix}\)

    End point minus start point.

  3. Make it perpendicular

    \(\overrightarrow{AB} \cdot \begin{pmatrix}1\\-2\\2\end{pmatrix} = 0 \Rightarrow (-2 + \lambda) - 2(1 - 2\lambda) + 2(-4 + 2\lambda) = 0 \Rightarrow -12 + 9\lambda = 0\)

    The shortest distance is along the perpendicular, so AB · d = 0. This gives one equation in λ.

  4. Solve for λ

    \(\lambda = \frac{4}{3}\)

    Substitute back to find B.

  5. The distance

    \(\overrightarrow{AB} = \begin{pmatrix}- \frac{2}{3}\\- \frac{5}{3}\\- \frac{4}{3}\end{pmatrix},\ |\overrightarrow{AB}| = \sqrt{5} = 2.24\)

    Put λ into AB and find its length. That length is the shortest distance.

Video walkthrough coming
A line in i, j, k form

Find the shortest distance from the point \(P(1, 2, 4)\) to the line \(\mathbf{r} = (4\mathbf{i} - \mathbf{j}) + \lambda(-3\mathbf{i} - \mathbf{j} + 2\mathbf{k})\).

Working
  1. Column form

    \(4\mathbf{i} - \mathbf{j} + \lambda(-3\mathbf{i} - \mathbf{j} + 2\mathbf{k}) \Rightarrow \mathbf{r} = \begin{pmatrix}4\\-1\\0\end{pmatrix} + \lambda\begin{pmatrix}-3\\-1\\2\end{pmatrix}\)

    Write the line as a column first. A missing component is 0.

  2. A general point B

    \(\overrightarrow{OB} = \begin{pmatrix}4\\-1\\0\end{pmatrix} + \lambda\begin{pmatrix}-3\\-1\\2\end{pmatrix} = \begin{pmatrix}4 - 3\lambda\\-1 - \lambda\\2\lambda\end{pmatrix}\)

    B is on the line, so its position vector has this form for some value of λ.

  3. The vector PB

    \(\overrightarrow{PB} = \overrightarrow{OB} - \overrightarrow{OP} = \begin{pmatrix}3 - 3\lambda\\-3 - \lambda\\-4 + 2\lambda\end{pmatrix}\)

    End point minus start point.

  4. Make it perpendicular

    \(\overrightarrow{PB} \cdot \begin{pmatrix}-3\\-1\\2\end{pmatrix} = 0 \Rightarrow -3(3 - 3\lambda) - (-3 - \lambda) + 2(-4 + 2\lambda) = 0 \Rightarrow -14 + 14\lambda = 0\)

    The shortest distance is along the perpendicular, so AB · d = 0. This gives one equation in λ.

  5. Solve for λ

    \(\lambda = 1\)

    Substitute back to find B.

  6. The distance

    \(\overrightarrow{PB} = \begin{pmatrix}0\\-4\\-2\end{pmatrix},\ |\overrightarrow{PB}| = 2 \sqrt{5} = 4.47\)

    Put λ into AB and find its length. That length is the shortest distance.

Video walkthrough coming
A drone and a mast

A drone flies along a straight line. Its position vector, in kilometres from a base, is \(\mathbf{r} = \begin{pmatrix}0\\6\\1\end{pmatrix} + \lambda\begin{pmatrix}2\\-1\\1\end{pmatrix}\), where \(\lambda\) is the time in hours. A radio mast stands at \(A(4, 4, 0)\). Find the shortest distance between the drone's path and the mast, in kilometres.

Working
  1. A general point B

    \(\overrightarrow{OB} = \begin{pmatrix}0\\6\\1\end{pmatrix} + \lambda\begin{pmatrix}2\\-1\\1\end{pmatrix} = \begin{pmatrix}2\lambda\\6 - \lambda\\1 + \lambda\end{pmatrix}\)

    B is on the line, so its position vector has this form for some value of λ.

  2. The vector AB

    \(\overrightarrow{AB} = \overrightarrow{OB} - \overrightarrow{OA} = \begin{pmatrix}-4 + 2\lambda\\2 - \lambda\\1 + \lambda\end{pmatrix}\)

    End point minus start point.

  3. Make it perpendicular

    \(\overrightarrow{AB} \cdot \begin{pmatrix}2\\-1\\1\end{pmatrix} = 0 \Rightarrow 2(-4 + 2\lambda) - (2 - \lambda) + (1 + \lambda) = 0 \Rightarrow -9 + 6\lambda = 0\)

    The shortest distance is along the perpendicular, so AB · d = 0. This gives one equation in λ.

  4. Solve for λ

    \(\lambda = \frac{3}{2}\)

    Substitute back to find B.

  5. The distance

    \(\overrightarrow{AB} = \begin{pmatrix}-1\\\frac{1}{2}\\\frac{5}{2}\end{pmatrix},\ |\overrightarrow{AB}| = \frac{\sqrt{30}}{2} = 2.74\)

    Put λ into AB and find its length. That length is the shortest distance.

Video walkthrough coming