How do you find the shortest distance between two lines in space?
Answer in short
For skew lines r = a₁ + λb₁ and r = a₂ + μb₂, the shortest distance runs along b₁ × b₂: d = |(b₁ × b₂) · (a₂ − a₁)|/|b₁ × b₂|. For parallel lines r = a₁ + λb and r = a₂ + μb, d = |b × (a₂ − a₁)|/|b|.
Stuck on a question? Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2. Get it on Google Play
Three ways two lines can sit in space
In a plane, two lines either meet or are parallel. In space there is a third possibility. Two lines can:
- intersect: the shortest distance between them is 0;
- be parallel: the distance is the length of a perpendicular from a point of one line to the other;
- be skew: not parallel and never meeting. Skew lines are non-coplanar; no single plane holds both.
The shortest distance between two lines is the length of the shortest segment that joins a point of one line to a point of the other. For skew lines this segment is perpendicular to both lines.
Distance between two skew lines
Let the lines be r = a₁ + λb₁ and r = a₂ + μb₂. Take S on the first line (position vector a₁) and T on the second (a₂), so ST = a₂ − a₁. If PQ is the shortest segment, it is perpendicular to b₁ and b₂, so its unit vector is
n̂ = (b₁ × b₂)/|b₁ × b₂|.
The length PQ is the projection of ST on this direction (the projection idea from Chapter 10): PQ = |ST · n̂|. Hence
d = |(b₁ × b₂) · (a₂ − a₁)|/|b₁ × b₂|.
A picture you can check. Take l₁: r = 3î + λĵ (in the floor z = 0) and l₂: r = 4k̂ + μ(î + ĵ) (four units up). Here b₁ × b₂ = ĵ × (î + ĵ) = −k̂ and a₂ − a₁ = −3î + 4k̂, so d = |−4|/1 = 4. That matches the vertical segment from P(3, 3, 0) to Q(3, 3, 4) in the figure.
Example. For r = î + ĵ + λ(2î − ĵ + k̂) and r = 2î + ĵ − k̂ + μ(3î − 5ĵ + 2k̂):
- a₂ − a₁ = î − k̂;
- b₁ × b₂ = (2î − ĵ + k̂) × (3î − 5ĵ + 2k̂) = 3î − ĵ − 7k̂, of length √(9 + 1 + 49) = √59;
- (b₁ × b₂) · (a₂ − a₁) = 3 + 0 + 7 = 10.
So d = 10/√59. Solving for the ends of the common perpendicular (λ = 25/59 and μ = 7/59) gives the same length.
The Cartesian form
For (x − x₁)/a₁ = (y − y₁)/b₁ = (z − z₁)/c₁ and (x − x₂)/a₂ = (y − y₂)/b₂ = (z − z₂)/c₂, the same formula written out becomes
d = |D|/√((b₁c₂ − b₂c₁)² + (c₁a₂ − c₂a₁)² + (a₁b₂ − a₂b₁)²),
where D is the determinant with rows (x₂ − x₁, y₂ − y₁, z₂ − z₁), (a₁, b₁, c₁) and (a₂, b₂, c₂). The determinant is the scalar triple product (b₁ × b₂) · (a₂ − a₁), and the square root is |b₁ × b₂|.
Example. For (x + 1)/7 = (y + 1)/(−6) = (z + 1)/1 and (x − 3)/1 = (y − 5)/(−2) = (z − 7)/1: the points give 4, 6, 8, and b₁ × b₂ = −4î − 6ĵ − 8k̂. Then D = −16 − 36 − 64 = −116 and |b₁ × b₂| = √116, so d = 116/√116 = √116 = 2√29.
Distance between two parallel lines
Parallel lines r = a₁ + λb and r = a₂ + μb lie in one plane. Let S and T be the points a₁ and a₂, and let P be the point of the first line nearest to T, so that TP is perpendicular to it. If θ is the angle between ST and b, then PT = |ST| sin θ, and |b × ST| = |b||ST| sin θ. So
d = |PT| = |b × (a₂ − a₁)|/|b|.
Example. For b = 2î + ĵ + 2k̂, a₁ = î + ĵ + k̂ and a₂ = 3î + 4ĵ + 5k̂: a₂ − a₁ = 2î + 3ĵ + 4k̂, b × (a₂ − a₁) = −2î − 4ĵ + 4k̂ of length 6, and |b| = 3, so d = 2. Check: along the lines S and T are (b · ST)/|b| = 15/3 = 5 apart, and 5² + 2² = 29 = |ST|².
Read next: equation of a line in space and angle between two lines, the Chapter 11 notes and the NCERT solutions for Exercise 11.2 Questions 12–15 and the Miscellaneous Exercise.
Practice
-
If (b₁ × b₂) · (a₂ − a₁) = 0 for two non-parallel lines, the lines:
Show answer
Answer: (b) intersect
-
The distance between the parallel lines r = λk̂ and r = 2î + μk̂ is:
Show answer
Answer: (c) 2
-
For r = î + λĵ and r = 3k̂ + μî, the vector b₁ × b₂ is:
Show answer
Answer: (b) −k̂
-
Find the shortest distance between r = λî and r = 2k̂ + μĵ.
Show answer
Answer: b₁ × b₂ = î × ĵ = k̂ and a₂ − a₁ = 2k̂, so d = |k̂ · 2k̂|/|k̂| = 2. (The x-axis and a line parallel to the y-axis at height 2.)
Questions students ask
What are skew lines?
Lines in space that are not parallel and never meet. No plane contains both. A straight road on a flyover and a road passing underneath it in another direction give an everyday picture of such lines.
Why is the shortest distance along b₁ × b₂?
If PQ is the shortest segment from one line to the other, moving P or Q along its line would only make PQ longer unless PQ is perpendicular to that line. So PQ is perpendicular to both b₁ and b₂, which is the direction of b₁ × b₂.
How do I check whether two given lines intersect?
If the direction ratios are not proportional, compute (b₁ × b₂) · (a₂ − a₁). If it is 0, the lines meet; otherwise they are skew and the formula gives the distance.
Stuck on a question?
Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2.
Get it on Google Play Open in browser
For parents: after the trial, the plan renews monthly by UPI or card autopay. You can cancel anytime in the app.