4.04h–4.04j - Finding shortest distances
Find perpendicular distances from points to lines and planes, and between parallel or skew lines. In 4.04h the objects are two lines; 4.04i covers a point and a line in two or three dimensions; 4.04j covers a point and a plane. You will choose the right normal or perpendicular rather than measuring an arbitrary joining segment.
A point and a line in two dimensions
Two cables follow the skew lines and . How close do the complete lines come, even though they never meet? We will find their separation without guessing two nearest points. First, consider the simpler distance from a point to a line.
You already know
The shortest segment from a point to a line or plane is perpendicular to it. A scalar product of zero tests perpendicular directions. A vector product gives a common perpendicular to two non-parallel directions.
Take and the line . Its normal is , of length 5. The expression is constant along the line. It changes from 10 on the line to 25 at ; moving one unit in the unit-normal direction changes it by 5. The perpendicular distance is therefore .
This explains both parts of the formula: the numerator measures the change in the line's constraint, and the denominator converts that change into a distance.
Distance from a point to a two-dimensional line
For and , where ,
In the formula booklet.
The modulus makes the distance non-negative on either side of the line. It is zero precisely when the point lies on the line. Vertical and horizontal lines work too: for , the formula becomes . There is no need to invent an infinite gradient.
Worked example 1: a supplied formula
Question. Find the exact distance from to .
Plan. Identify , then substitute into the point-line formula.
Why this step? The denominator is the length of a normal, not the length of the position vector of .
Answer. .
Check. The foot is : , and is normal with length 3.
Worked example 2 changes one feature: the constant appears on the left of the line equation. Rewriting it first prevents a sign error.
Worked example 2: the constant on the other side
Question. Find the exact distance from to .
Plan. Write the line as , then use the formula.
Why this step? The formula subtracts the right-hand constant. Here subtracting adds 10.
Answer. .
Check. lies on the line. The vector from to is , parallel to , with length 7.
Keep the entire signed numerator inside the modulus until it is evaluated.
Watch out
Wrong: , allowing a negative answer. Right: put the whole numerator in a modulus. The sign identifies a side of the line; distance has no sign.
Practise moving a constant and handling a negative numerator together.
A point and a line in three dimensions
For a line in space, find the foot by requiring its joining vector from the point to be perpendicular to the line's direction.
Let have position vector , and let a general point on the line be . At the nearest point, has zero scalar product with . Solve that scalar equation, then calculate . This works in two dimensions too, especially when a line is already given in vector form.
[DIAGRAM: asset_name: A perpendicular gives the minimum distance; asset_slug: h245_4_04h_j_perpendicular_distance; caption: Every other joining segment has an extra component along the line; description: Exact equal-scale two-dimensional diagram of P=(3,4), the line 3x+4y=10, foot F=(1.2,1.6), and another point Q on the line. PF is the sage perpendicular of length 3, PQ is a longer clay segment, and a right-angle marker at F shows the triangle PFQ.]

Perpendicular foot on a vector line
For a non-zero line direction , the foot from satisfies
The distance is .
Not in the formula booklet: learn it.
Why is this the minimum, rather than merely a perpendicular? For any other line point , is right-angled at , so . Equality holds only at . If already lies on the line, the same method gives and distance zero.
Worked example 3: finding the foot
Question. Find the shortest distance from to .
Plan. Impose , solve for , then find .
Why this step? Finding the distance from the starting point to would give an arbitrary joining length, not the minimum.
Answer. .
Check. , and lies on the line at .
Worked example 4 changes one feature: 's last coordinate becomes . The nearest foot now has a negative parameter, which is allowed on a complete line.
Worked example 4: a foot behind the starting point
Question. Find the exact shortest distance from to .
Plan. Apply the same perpendicularity condition with the new displacement.
Why this step? The parameter records position along the chosen direction; it is not itself a distance and need not be positive.
Answer. .
Check. .
The joining vector's perpendicularity is the decisive check, not the sign of the line parameter.
Watch out
Wrong: without including the unknown foot. Right: use , so the equation can locate the foot.
In a model with a finite cable, also check whether the foot lies between its endpoints. The complete-line minimum may be outside the cable; then the nearer endpoint gives the segment minimum.
Two parallel lines
For two parallel lines, choose any point on one and find its perpendicular distance to the other.
The choice of point does not affect the distance. Translating the point and its perpendicular foot by the same multiple of the common direction preserves both membership and perpendicularity. In two dimensions, convert one line to cartesian form and use the supplied point-line formula. In three dimensions, use the scalar-product foot method from the previous part. There is no separate parallel-line distance formula in the booklet.
Worked example 5: reduce to point and line
Question. Find the distance between
Plan. Verify parallel directions, then find the perpendicular distance from to .
Why this step? Parallel lines have a whole family of perpendicular joins. Fixing one endpoint leaves only one parameter to find.
Answer. .
Check. , and the non-zero distance confirms that the lines are distinct.
Worked example 6 changes one feature: the chosen starting point on the second line moves along that line. The foot moves too, but the distance stays fixed.
Worked example 6: another point on the same parallel line
Question. Find the distance between
Plan. Use for the point-to-line reduction.
Why this step? The second starting point has moved by , which is half its direction vector. It is another point on exactly the same second line.
Answer. .
Check. Both and have translated by , so their difference is unchanged.
In two dimensions the same reasoning can be very short. For and , any point of the second line makes the first numerator , giving distance . If the equations have differently scaled normals, first rescale the entire equations to the same left side. Coincident lines have distance zero.
Watch out
Wrong: taking the vector product of parallel directions and dividing by its magnitude. Their product is zero, so that expression is undefined. Right: reduce parallel lines to a point-line problem.
Check the relationship before choosing a two-line distance method.
The gap between skew lines
For non-parallel lines, a common perpendicular direction allows you to measure the gap without first finding its endpoints.
Let be positions of any chosen points on the two lines, with directions . Take a non-zero common perpendicular , supplied or constructed as . The component of along the unit normal is . Its absolute value is the separation.
Why can you choose any points? Changing them adds multiples of and to the joining vector. Those extra terms have zero scalar product with , so the normal component is unchanged. The two independent directions span the plane perpendicular to , so suitable movements along the lines remove the joining vector's entire component in that plane. The remaining join is parallel to and has the minimum length. This explains the formula without using any result about the magnitude of a vector product.
Shortest distance between skew lines
For skew lines with points and a non-zero common perpendicular ,
Either a suitable is supplied or you establish one, for example using the supplied vector-product formula.
In the formula booklet.
The common perpendicular need not be a unit vector: the denominator accounts for its length. For non-parallel intersecting lines the same normal component is zero, consistently giving zero distance. For parallel directions the vector product vanishes and must not be used as a normal in this formula.
Worked example 7: construct the common perpendicular
Question. Find the shortest distance between
Plan. Find a common perpendicular, then project the starting-point displacement onto it.
Why this step? The chosen joining vector is not generally perpendicular to either line. Projecting onto the common normal removes both along-line components.
Answer. .
Check. and . Its non-zero projected gap also confirms the non-parallel lines do not intersect.
Worked example 8 changes one feature: the second starting point's height changes from 5 to . The signed normal component reverses, but the distance does not.
Worked example 8: a negative scalar product
Question. Find the shortest distance between and .
Plan. Reuse the common perpendicular because the line directions have not changed.
Why this step? A negative projection tells you that the second line lies on the opposite side of the first line's parallel plane; it does not represent a negative gap.
Answer. .
Check. Replacing with changes the numerator's sign and leaves the distance unchanged.
Neither rescaling a valid normal nor reversing the joining vector can alter the distance.
Watch out
Wrong: using as the skew-line distance. That measures one arbitrary joining segment. Right: take only its component in a direction perpendicular to both lines, using the scalar product and dividing by .
The opening cables therefore come within units, however far apart the chosen starting points appear. Their separation is a projection, not an endpoint distance.
A point and a plane
For a plane, its normal already supplies the perpendicular direction. Measure how far the point's scalar product lies from the plane's constant, then divide by the normal's length.
For and a given point , take any plane point . Since , the joining vector's normal component is
Its magnitude is the perpendicular distance. This is the same projection idea as the skew-line formula, with the normal provided directly by the plane.
Distance from a point to a plane
For a point with position vector and a plane , where ,
In the formula booklet.
For , this is ; that coordinate expression follows by expanding the supplied vector formula. It gives zero for a point in the plane. Rescaling the whole plane equation multiplies numerator and denominator by the same absolute factor, leaving the distance unchanged.
Worked example 9: a cartesian plane
Question. Find the distance from to .
Plan. Read the normal and constant, then apply the supplied formula.
Why this step? The number 3 is the change in the plane expression, not yet a distance. The normal has length 3, so each unit of perpendicular travel changes that expression by 3.
Answer. .
Check. The foot is ; it lies on the plane and is 1 unit from .
Worked example 10 changes one feature: the point's height drops from 4 to 1, putting it on the other side of the plane.
Worked example 10: the other side of the plane
Question. Find the distance from to .
Plan. Evaluate the new signed constraint difference, then take its absolute value.
Why this step? The sign tells you which way to travel along the normal to reach the plane. The modulus gives the distance on either side.
Answer. .
Check. , and .
If the plane is given in parametric form, first find a normal and its constant as in the planes lesson. Only then apply the distance formula.
Watch out
Wrong: dividing by in the distance formula. That quantity occurs when finding a foot's parameter. Right: divide by to obtain a distance.
Choose the data before the formula: point-line in two dimensions uses its cartesian constraint; point-line in space and parallel lines use a perpendicular foot; skew lines use a common normal; point-plane uses the plane normal. Each route measures a perpendicular component, so each has the same geometric reason for giving the minimum.
Quick Recap
- A shortest joining segment is perpendicular; an arbitrary starting-point distance usually overestimates it.
- For a point and a line in space, find the foot using a zero scalar product, then take the joining vector's magnitude.
- Parallel lines reduce to a point-line problem; skew lines use the component along a common perpendicular.
- Point-line in two dimensions, skew-line and point-plane distance formulae are supplied; identify their signed constants carefully.
- Moduli make distances non-negative, and scaling a valid normal changes neither the plane nor the distance when the whole expression is scaled consistently.
The opening skew lines have separation , obtained by projecting their starting-point displacement onto .