Shortest Distance Between Skew Lines Explained with Worked Examples

The shortest distance between skew lines and is , where .

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Shortest distance between skew lines means

Skew lines are not parallel and do not meet. The shortest distance is measured along the direction perpendicular to both, which is the cross product of the two direction vectors.

Project the vector joining a point on each line onto this common perpendicular. The scalar product with the unit normal does exactly that, giving the formula.

If is the zero vector, the lines are parallel and you use the point-to-line distance instead. If the projection is zero the lines meet.

What is it used for?

Skew lines pass each other without meeting. The shortest distance between them is along the segment that is perpendicular to both.

How to use shortest distance between skew lines

  1. Write each line in the form .
  2. Compute .
  3. Find and its scalar product with .
  4. Divide the absolute value by .

Graph

Two lines passing at height 3 (viewed from above)crossing: 3 units apart-3-2-1012345-3-2-1012345Two lines passing at height 3 (viewed from above)xyline 1Graph with x from -3 to 5 and y from -3 to 5. Shows the curve line 1; point crossing: 3 units apart at (2, 0).

Viewed from above the lines appear to cross, but one is 3 units above the other, so the shortest distance is 3.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: perpendicular lines

Find the distance between and .

Worked example
Answer
11
  1. n = (1,0,0) × (0,1,0)
  2. a₂ − a₁ = (0,0,1)

Example 2: lines at height 3

Find the distance between and .

Worked example
Answer
33
  1. n = (0,1,0) × (1,0,0)
  2. a₂ − a₁ = (−1,0,3)

Example 3: a slanted pair

Find the distance between and .

Worked example
Answer
13≈0.577\dfrac{1}{\sqrt3}\approx0.577
  1. n = (1,1,0) × (0,1,1)
  2. a₂ − a₁ = (1,0,0)

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

d₁ = (1, 0, 0), d₂ = (0, 1, 0)

n = d₁ × d₂ third component

1.

a₂ − a₁ = (0, 0, 3)

(a₂ − a₁)·n

3.

distance

3/|n|

3.

a₂ − a₁ = (1, 2, 5)

distance

5.

Word problems

Distance = |(a₂ − a₁)·n|/|n| where n = d₁ × d₂ is perpendicular to both lines.

n

d₁ × d₂ = (0, 0, 1).

  1. 1
  2. Check: ✓1

Dot product

(0, 0, 3)·(0, 0, 1).

  1. 3
  2. Check: ✓3

Distance Higher

3/1.

  1. 3
  2. Check: ✓3

Other offset Higher

a₂ − a₁ = (1, 2, 5).

  1. |5|/1
  2. Check: ✓5

Common mistakes

Forgetting to divide by |n|

dot only ✗

divide by |n| ✓

Unit normal.

Using d₁ + d₂

sum ✗

cross product ✓

Perpendicular.

Parallel lines

use this formula ✗

n = 0, use another method ✓

Degenerate.

Forgetting absolute value

negative ✗

|…| ✓

Distance.

Exam tips

  1. n = d₁ × d₂.
  2. Project a₂ − a₁ onto n.
  3. |·|/|n|.
  4. n = 0 ⇒ parallel lines.
  5. Check with a diagram.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. Distance: a₂ − a₁ = (0, 0, 7), n = (0, 0, 1) Foundation

7

2. Distance: a₂ − a₁ = (2, 0, 4), n = (0, 0, 2) Foundation

4

3. Distance: a₂ − a₁ = (1, 1, 6), n = (0, 0, 3) Foundation

6

4. n_z for d₁ = (1, 0, 0), d₂ = (0, 2, 0) Higher

2

5. Distance: a₂ − a₁ = (3, 4, 0), n = (0, 0, 1) Higher

0

6. Distance: (a₂ − a₁)·n = −12, |n| = 4 Higher

3

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Skew lines
Non-parallel, non-intersecting.
Common perpendicular
Shortest connector.
Cross product
d₁ × d₂.
Direction vector
d.
Projection
(a₂ − a₁)·n̂.
Position vector
a.

Frequently asked questions

What is the shortest distance between skew lines?

|(a₂ − a₁)·n|/|n| with n = d₁ × d₂.

What are skew lines?

Lines that are neither parallel nor intersecting.

What if n = 0?

The lines are parallel.

Why a cross product?

The common perpendicular is perpendicular to both directions.

Which page covers point-to-line distance?

distance from a point to a line.

Which page covers the vector form?

vector equation of a line.

More in Vectors and matrices and the formula sheets.