Shortest Distances with Lines
Welcome, students, to a key idea in coordinate and three-dimensional geometry: finding the shortest distance between points, lines, and other geometric objects. In real life, this idea shows up when a drone chooses the fastest route to a charging station, a delivery robot avoids obstacles, or a bridge designer checks how far apart structures are. ππ In IB Mathematics: Analysis and Approaches HL, shortest-distance questions often combine algebra, vectors, and geometry, so they are a powerful test of reasoning.
What you need to know first
The shortest distance from a point to a line is measured along a perpendicular segment. This is the central idea behind many exam questions. If a line is given in coordinate form, vector form, or as an equation, the challenge is usually to identify the perpendicular direction and then calculate the length of the perpendicular segment.
The main terms you should know are:
- Distance: the length of the shortest path between two geometric objects.
- Perpendicular: meeting at a right angle, $90^\circ$.
- Direction vector: a vector that points along a line.
- Normal vector: a vector perpendicular to a line or plane.
- Projection: the βshadowβ of one vector or point onto another line or plane.
For a point $P$ and a line $l$, the shortest distance is always the length of the perpendicular from $P$ to $l$. If $A$ and $B$ are points on the line, then the direction of the line can be described by the vector $\mathbf{d}=\overrightarrow{AB}$. A vector perpendicular to this direction can help you build the shortest route.
Shortest distance from a point to a line in 2D
In two dimensions, a line can be written in many forms. A common vector form is
$$\mathbf{r}=\mathbf{a}+\lambda\mathbf{d},$$
where $\mathbf{a}$ is the position vector of a point on the line, $\mathbf{d}$ is the direction vector, and $\lambda$ is a scalar parameter.
Suppose a point has position vector $\mathbf{p}$. To find the shortest distance from the point to the line, you can use the idea of a perpendicular vector. If the line has equation $ax+by+c=0$, then a normal vector is $\mathbf{n}=\begin{pmatrix}a\b\end{pmatrix}$. The distance from $P(x_0,y_0)$ to the line is
$$d=\frac{|ax_0+by_0+c|}{\sqrt{a^2+b^2}}.$$
This formula is very useful because it gives the shortest distance directly. It works because the numerator measures how far the point is from satisfying the line equation, and the denominator scales that value to the true perpendicular distance.
Example in context
Find the distance from $P(2,3)$ to the line $3x-4y+8=0$.
Using the formula,
$$d=\frac{|3(2)-4(3)+8|}{\sqrt{3^2+(-4)^2}}=\frac{|6-12+8|}{5}=\frac{2}{5}.$$
So the shortest distance is $\frac{2}{5}$ units. This is a good example of how an algebraic equation becomes a geometric measurement. β
Using vectors to find the shortest distance
In HL work, vector methods are especially important because they connect geometry to algebra. A line in 2D or 3D can be written as
$$\mathbf{r}=\mathbf{a}+\lambda\mathbf{d},$$
and the distance from a point with position vector $\mathbf{p}$ to the line can be found using projection or a cross-product idea.
If $\mathbf{AP}=\mathbf{p}-\mathbf{a}$, then the component of $\mathbf{AP}$ perpendicular to the line gives the shortest distance. One way to think about it is:
$$\mathbf{AP}=\text{parallel component}+\text{perpendicular component}.$$
The perpendicular component is what we want.
In 2D, if $\mathbf{d}=\begin{pmatrix}u\v\end{pmatrix}$, then a perpendicular vector is $\begin{pmatrix}-v\u\end{pmatrix}$ or $\begin{pmatrix}v\\-u\end{pmatrix}$. This can help you form a right triangle and use trigonometry or projection.
For example, if a line has direction vector $\mathbf{d}=\begin{pmatrix}3\\4\end{pmatrix}$, then a perpendicular direction vector is $\begin{pmatrix}-4\\3\end{pmatrix}$. If you can express the vector from the line to the point, you can find the perpendicular length by projecting onto the normal direction.
The projection of a vector $\mathbf{u}$ onto a vector $\mathbf{v}$ is
$$\operatorname{proj}_{\mathbf{v}}\mathbf{u}=\frac{\mathbf{u}\cdot\mathbf{v}}{\mathbf{v}\cdot\mathbf{v}}\mathbf{v}.$$
This is useful because the shortest distance is the length of the part of $\mathbf{u}$ left after removing the projection onto the line.
Shortest distance between two parallel lines
Another common IB question is the distance between two parallel lines. If two lines are parallel, they have the same direction vector and the same normal vector. Since parallel lines never meet, the shortest distance is measured along a perpendicular segment between them.
If the lines are written as
$$ax+by+c_1=0$$
and
$$ax+by+c_2=0,$$
the distance between them is
$$d=\frac{|c_2-c_1|}{\sqrt{a^2+b^2}}.$$
Example
Find the distance between $2x-y+1=0$ and $2x-y-5=0$.
Here, $a=2$ and $b=-1$. So
$$d=\frac{|(-5)-1|}{\sqrt{2^2+(-1)^2}}=\frac{6}{\sqrt{5}}.$$
This method is efficient because you do not need to find a point on each line and then measure between them directly.
Shortest distance between skew lines in 3D
In three dimensions, new possibilities appear. Two lines may intersect, be parallel, or be skew. Skew lines do not meet and are not parallel. The shortest distance between skew lines is the length of the common perpendicular, a line segment that is perpendicular to both lines. This is one of the most important HL ideas in 3D geometry.
If one line passes through point $A$ with direction vector $\mathbf{d}_1$ and another passes through point $B$ with direction vector $\mathbf{d}_2$, then the vector
$$\mathbf{n}=\mathbf{d}_1\times\mathbf{d}_2$$
is perpendicular to both lines, provided the lines are not parallel. The shortest distance is then found by projecting $\overrightarrow{AB}$ onto the normal direction:
$$d=\frac{|\overrightarrow{AB}\cdot(\mathbf{d}_1\times\mathbf{d}_2)|}{|\mathbf{d}_1\times\mathbf{d}_2|}.$$
This formula is powerful because it combines dot product and cross product ideas.
Example
Let the lines be
$$\mathbf{r}=\begin{pmatrix}1\\0\\0\end{pmatrix}+\lambda\begin{pmatrix}1\\1\\0\end{pmatrix}$$
and
$$\mathbf{r}=\begin{pmatrix}0\\1\\1\end{pmatrix}+\mu\begin{pmatrix}0\\1\\1\end{pmatrix}.$$
Here, $\mathbf{d}_1=\begin{pmatrix}1\\1\\0\end{pmatrix}$ and $\mathbf{d}_2=\begin{pmatrix}0\\1\\1\end{pmatrix}$. Compute
$$\mathbf{d}_1\times\mathbf{d}_2=\begin{pmatrix}1\\-1\\1\end{pmatrix}.$$
Also,
$$\overrightarrow{AB}=\begin{pmatrix}-1\\1\\1\end{pmatrix}.$$
Then
$$\overrightarrow{AB}\cdot(\mathbf{d}_1\times\mathbf{d}_2)=(-1)(1)+(1)(-1)+(1)(1)=-1,$$
so the distance is
$$d=\frac{|-1|}{\sqrt{1^2+(-1)^2+1^2}}=\frac{1}{\sqrt{3}}.$$
This shows how 3D vector methods can turn a complicated spatial problem into a clean calculation.
Exam strategy and common mistakes
When solving shortest-distance questions, students, start by identifying the type of objects involved: point and line, two parallel lines, or two skew lines. Then choose the correct tool.
Useful strategies include:
- If the line is in Cartesian form in 2D, use the point-to-line distance formula.
- If the line is in vector form, use perpendicular or projection ideas.
- If two lines are parallel, measure the distance between one point on one line and the other line.
- If two lines are skew in 3D, use the cross product formula for the common perpendicular.
Common mistakes include:
- Using the ordinary distance formula between two points when the shortest distance should be perpendicular.
- Forgetting that the shortest distance is not always along the line joining two obvious points.
- Confusing direction vectors with normal vectors.
- Missing absolute values in distance formulas.
A good check is to ask: βIs my final segment perpendicular to the line or lines involved?β If not, the answer is probably not the shortest distance.
Conclusion
Shortest distances with lines bring together many core ideas from Geometry and Trigonometry: equations of lines, vectors, perpendicularity, projection, and spatial reasoning. In 2D, the shortest distance from a point to a line is found with a perpendicular segment or a direct formula. In 3D, the same idea extends to skew lines, where the common perpendicular gives the minimum distance. Mastering these methods helps you solve IB HL problems efficiently and understand how geometry describes real-world movement, design, and space. π
Study Notes
- The shortest distance from a point to a line is always measured along a perpendicular.
- For the line $ax+by+c=0$ and point $P(x_0,y_0)$, the distance is $d=\frac{|ax_0+by_0+c|}{\sqrt{a^2+b^2}}$.
- A line in vector form is $\mathbf{r}=\mathbf{a}+\lambda\mathbf{d}$, where $\mathbf{d}$ is a direction vector.
- A normal vector is perpendicular to a line or plane, and it is useful for finding shortest distances.
- For two parallel lines $ax+by+c_1=0$ and $ax+by+c_2=0$, the distance is $d=\frac{|c_2-c_1|}{\sqrt{a^2+b^2}}$.
- For skew lines in 3D, the shortest distance is the length of the common perpendicular.
- A useful formula for skew lines is $d=\frac{|\overrightarrow{AB}\cdot(\mathbf{d}_1\times\mathbf{d}_2)|}{|\mathbf{d}_1\times\mathbf{d}_2|}$.
- Projection helps separate a vector into parallel and perpendicular parts.
- Always check whether the answer represents a perpendicular distance, not just any distance.
- Shortest-distance methods connect algebra, vectors, and spatial reasoning across Geometry and Trigonometry.
