Distance from a Point to a Line

The distance from a point to a line is defined as the shortest distance, which is the length of the perpendicular line segment from the point to the line.


1 Distance from a Point to a Line in

Two common methods:


1.1 Method 1: Using the Cartesian Equation of the Line

If the line is given by and the point is , the distance is:


1.2 Example : Distance in using Cartesian Form

Find the distance from point to the line .


Solution

Here , and .

The distance is 3 units.


1.3 Method 2: Using Vector Projection (More general, also applies to )

Let the line be given by

where:

  • is the position vector of a point on the line
  • is the direction vector of the line

Let be the external point.

  1. Form the vector .
  2. The distance is the magnitude of the component of that is perpendicular to .
    This can be found using the cross product (in ) or by finding the projection. An easier way for (and ) is related to area of a parallelogram.

    The area of the parallelogram formed by and is (for ).

    This area is also .
    So,

    This formula is primarily for .

    For , we can "embed" into by adding a z-component of 0.


1.4 Example : Distance in using Vector Method

Find the distance from to the line


Solution
  • Point on the line , so .
  • Direction vector .
  • Point , so .
  • Vector .

Using the specific formula derived from the cross product concept:


2 Distance from a Point to a Line in

Let the line be , and the point be . is the point on the line corresponding to . Vector .

The distance is given by the formula:

This formula arises from the fact that , where is the angle between and .
Also, (from right-triangle trigonometry where is opposite to and is hypotenuse).


2.1 Example : Distance in

Find the distance from the point to the line .


Solution

From the line equation: is a point on the line, so . The direction vector is . The external point is , so .

Vector

Now calculate the cross product :

Now find the magnitudes:

The distance :

The distance is units.


2.2 Thinking Question : Zero Distance

What does it mean if the calculated distance from a point to a line is zero?
How would look in this case?


Solution

If the distance , it means the point lies on the line . The formula for distance is

For (and assuming is not the zero vector, which it can't be for a line),
we must have .
This implies (the zero vector).
The cross product of two non-zero vectors is the zero vector if and only if the vectors are collinear (parallel).
So, if is on the line, the vector (connecting two points on the line) must be parallel to the direction vector of the line.


3 Distance Between Two Skew Lines in

Skew lines are lines in that are not parallel and do not intersect. The shortest distance between them is the length of a unique line segment that is perpendicular to both lines.

Let the two skew lines be:

Here, (with position vector ) is a point on , and (with position vector ) is a point on . The direction vectors are and .

  1. The vector is a common normal, i.e., it is perpendicular to both and . This vector gives the direction of the shortest distance segment.
  2. Form a vector connecting a point on to a point on , for example, .
  3. The distance between the skew lines is the absolute value of the scalar projection of onto the common normal .

The numerator is the absolute value of the scalar triple product, which represents the volume of the parallelepiped formed by the vectors , , and . The denominator is the area of the base parallelogram formed by and . Volume / Base Area = Height, which is the distance.


3.1 Example : Distance Between Skew Lines

Find the distance between the skew lines: ,


Solution

From the line equations:

, so . Direction vector . , so . Direction vector .

First, check if they are skew. and are not parallel. Try to find intersection:

This is false. So lines do not intersect, and are not parallel, thus they are skew.

Vector connecting points on the lines:

Common normal vector :

Magnitude of the common normal:

Dot product for the numerator of the distance formula:

The distance :

The distance between the skew lines is units.


3.2 Thinking Question : Parallel Lines Distance as Skew Lines?

What happens if you try to use the skew lines distance formula for two parallel lines? , (note same direction vector )


Solution

If the lines are parallel, their direction vectors and are scalar multiples, i.e., . For simplicity, assume . The common normal vector in the formula is . If and are parallel, then (the zero vector). The formula for distance is

This would lead to

This form is indeterminate, meaning the formula for skew lines is not directly applicable to parallel lines. For parallel lines, you would use the distance from a point on one line to the other line (using the formula from Section 9.5, Distance from a Point to a Line in ).


4 Homework
4.1 Question 5.1 (Easy)

Find the distance from the point to the line in .


Solution

The formula for the distance from a point to a line is:

Here, .
The line is , so .

To rationalize the denominator:

Answer: The distance is units.


4.2 Question 5.2 (Medium)

Find the distance from the point to the line in .


Solution

The formula for the distance from a point to a line is:

where is a point on the line (from ) and .

Here, , so .
From the line : , so .
Direction vector .

Vector :

Cross product :

Magnitude of the cross product:

Magnitude of the direction vector :

The distance :

Answer: The distance is units.


4.3 Question 5.3 (Harder)

Find the shortest distance between the skew lines:


Solution

The formula for the distance between skew lines and is:

From the line equations:

  • , so .
    Direction vector .
  • , so .
    Direction vector .

Vector connecting points on the lines:

Common normal vector :

Magnitude of the common normal:

Dot product for the numerator:

The distance :

Answer: The shortest distance between the skew lines is units.

Powered by Typsite