Module 3: Distance Between a Point and a Line or Plane
From the introduction, we realize that the (shortest) distance between two objects will be along a line which is perpendicular to both of them. We will use this concept in one moment. But before we do so, let us review the definition of the distance between two points:
Let p1 and
p2 be two points in the plane which are the heads of two vectors
→v1 and
→v2 as in the diagram below:
Then the distance between p1 and
p2 is the same as the norm of the difference between the two vectors:
d(p1,p2)=‖
We will avoid an example of this (you can check out a prior module on the norm, or similar hw questions). Instead: note how this offers a game plan on how we can compute the distance between a point p an another object:
- Find the direction perpendicular to a given object.
- Find a line through
p in that direction.
- Find where the point
q where this line intersects the object.
- Compute the distance between these two points.
In our first example, let's compute the distance between a point given by vector \vec{p} and the line
\ell given parametrically by
\vec{x}_0 + t\vec{v} as in the picture below:
Let us label \vec{q} the position on
\ell where the line through
\vec{p} and
\vec{q} meets
\ell orthogonally. Note that such a line will have direction
\vec{p} - \vec{q}. Since the direction of this line must be perpendicular to
\ell we use the dot product and create the equation:
(\vec{p} - \vec{q}) \cdot \vec{v} = 0.
Since \vec{q} lives on
\ell it must satisfy the equation
\vec{q} = \vec{x}_0 + t \vec{v} for some
t. We can solve for this
t we will know the exact value of
t to compute the location of
\vec{q}:
(\vec{p} - \vec{x}_0 - t \vec{v}) \cdot \vec{v} = 0 \Rightarrow t = \frac{(\vec{p} - \vec{x}_0) \cdot \vec{v}}{\|\vec{v}\|^2}.
Example:
Let's compute the distance between the point (1,0,-1) and the line given by
\begin{pmatrix}
5 \\ 0 \\ 1
\end{pmatrix} +
t \begin{pmatrix} -1 \\ 3 \\ 2
\end{pmatrix}.
To solve, compute \vec{q} - \vec{p} = \begin{pmatrix}4 \\ 0 \\ 2\end{pmatrix} + t\begin{pmatrix}-1 \\ 3 \\ 2\end{pmatrix}. We dot this against
\begin{pmatrix} -1 \\ 3 \\ 2 \end{pmatrix} and set to zero to find
0+14t = 0. Therefore we can use
t=0 in the equation of the line to find
\vec{q} =
\begin{pmatrix}
5 \\ 0 \\ 1
\end{pmatrix} We compute the distance between
\begin{pmatrix}
1 \\ 0 \\ -1
\end{pmatrix} and
\begin{pmatrix}
5 \\ 0 \\ 1
\end{pmatrix}to find that the distance between the point and the line is
\sqrt{20}. Note that it is possible to redo the above distance measure using projections, which can give a nice formula. I encourage you to try and make one!
We will now move to the situation of computing the distance between a point and a plane. We need to find the direction perpendicular to a plane. But this is actually simple if the plane is represented in the form Ax+By+Cz=D since we know that the vector
\begin{pmatrix} A \\ B \\C \end{pmatrix}is the normal direction to the plane! Therefore the line
\vec{p} + t\begin{pmatrix}A\\B\\C\\\end{pmatrix}
is perpendicular to the plane and passes through \vec{p}. We need only find where it intersects the plane!
Example:
Find the distance between the point (2,8,5) and the plane
3x+6y-3z=4.
First note that the line:
\begin{pmatrix}2\\8\\5\\\end{pmatrix} + t \begin{pmatrix}3\\6\\-3\\\end{pmatrix}
is orthogonal to the plane. To find \vec{q} substitute the
x-,
y-, and
z-coordinates given by the line above into the given equation of the plane:
3(2+3t) + 6(8+6t) -3(5-3t) = 4.
Solve this equation to find t=-\frac{35}{54}. Therefore the point
\vec{q} in the plane that we want is
\begin{pmatrix}2\\8\\5\\\end{pmatrix} - \frac{35}{54} \begin{pmatrix}3\\6\\-3\\\end{pmatrix}
(Do not worry about simplifying this).
Subtract \vec{p} from the above expression to get
-\frac{35}{54} \begin{pmatrix}3\\6\\-3\\\end{pmatrix}. Now compute the norm:
\left\| -\frac{35}{54} \begin{pmatrix}3\\6\\-3\\\end{pmatrix} \right\| = \frac{35}{54} \sqrt{54} = \frac{35}{\sqrt{54}}
to get the distance.
As in the case of the distance between a point and a line, it is possible to generate a nice formula for the distance between a point and a plane. Try to do it!