What Is Distance Between Skew Lines?
Skew lines are lines in three dimensions that are not parallel and never meet. The distance between them is the length of the shortest segment joining them, which is perpendicular to both.
The formula takes the cross product of the two direction vectors, then projects the vector between the two points onto it: distance = |(P₂ − P₁) · (d₁ × d₂)| ÷ |d₁ × d₂|.
The calculator also tells you whether the lines are skew, parallel or intersecting, and gives the closest point on each line.
How to Use the Distance Between Skew Lines Calculator
- Enter a point on each line.
- Enter a direction vector for each line.
- Read the distance, the relationship and the closest points.
Distance Between Skew Lines Formula
Skew lines
Distance Between Skew Lines Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| P₁, P₂ | A point on each line | |
| d₁, d₂ | Direction vectors of the lines | |
| d₁ × d₂ | Cross product, perpendicular to both lines | |
| d | Shortest distance | Triple product over |d₁ × d₂| |
Distance Between Skew Lines Worked Example
With the example values loaded in the calculator above, the steps are:
- Line 1: P₁ = (1, 2, 3), d₁ = (2, 1, 4). Line 2: P₂ = (3, 5, 8), d₂ = (1, 3, 2).
- Normal to both lines: n = d₁ × d₂ = (-10, 0, 5), with length 11.1803.
- Vector between the points: P₂ − P₁ = (2, 3, 5).
- Distance = |(P₂ − P₁) · n| ÷ |n| = |5| ÷ 11.1803 = 0.447214.
- The closest points are (2.68, 2.84, 6.36) on line 1 and (2.28, 2.84, 6.56) on line 2. The segment between them is perpendicular to both lines.
Result: Distance between the lines = 0.447214; Relationship = Skew (they never meet and are not parallel).
Worked example
Take line 1 through (1, 2, 3) with direction (2, 1, 4), and line 2 through (3, 5, 8) with direction (1, 3, 2). The cross product d₁ × d₂ = (−10, 0, 5), with length 11.1803.
The vector between the points is (2, 3, 5), and its dot product with the cross product is −20 + 0 + 25 = 5. The distance is 5 ÷ 11.1803 = 0.4472, so the lines are skew.
Telling the cases apart
If d₁ × d₂ is the zero vector, the lines are parallel. Otherwise, if the triple product is zero they intersect, and if it is not zero they are skew.
Where Distance Between Skew Lines Is Used
Vector geometry homework
Find the shortest distance between two lines in space.
3D modelling
Check clearance between two straight edges or pipes.
Classifying lines
Decide whether two lines are skew, parallel or intersecting.
Common Distance Between Skew Lines Mistakes to Avoid
- Use any point on each line. The distance does not depend on the choice.
- A direction vector can be scaled without changing the answer.
Distance Between Skew Lines Terms and Definitions
- Skew lines
- Lines in 3D that are neither parallel nor intersecting.
- Cross product
- A vector perpendicular to two given vectors.
Distance Between Skew Lines FAQs
What is the distance between skew lines?
The length of the shortest segment between them. It is |(P₂ − P₁) · (d₁ × d₂)| divided by |d₁ × d₂|.
How can I tell if lines are skew?
They are skew if they are not parallel and the triple product is not zero.
What if the lines are parallel?
Then use |(P₂ − P₁) × d₁| ÷ |d₁|. The calculator switches to this automatically.
Do skew lines exist in 2D?
No. In a plane, two lines are either parallel or they intersect.