Shortest distance between two lines: skew and parallel lines
NCERT Class 12 Mathematics Chapter 11 Section 11.5
Quick answer
The shortest distance between two lines in space is 0 if they intersect, and for skew lines r = a + λb and r = a + μb it is d = |(b × b) · (a − a)| / |b × b|, measured along their common perpendicular. For parallel lines r = a + λb and r = a + μb, d = |b × (a − a)| / |b|. Skew lines are lines in space that are neither parallel nor intersecting, so they do not lie in one plane.
With your textbook
NCERT Mathematics Part II (Class 12), Chapter 11 “Three Dimensional Geometry”, Section 11.5 “Shortest Distance between Two Lines”, pages 385–390.
Open the official NCERT chapter (PDF, 2.1 MB, ncert.nic.in) (opens in a new tab)
Checked against the 2026-27 reprint on .
What are skew lines?
Skew lines and the shortest distance
- Skew lines are lines in space that are neither parallel nor intersecting, so they do not lie in one plane (NCERT Section 11.5, pages 385–386).
By the shortest distance between two lines we mean the join of a point in one line with one point on the other line so that the length of the segment so obtained is the smallest.
NCERT Mathematics Part II (Class 12), Section 11.5, page 386
In plain words: two lines in a plane either meet or are parallel; in space there is a third case. NCERT’s example is a room: a diagonal across the ceiling and a diagonal down one wall never meet and are not parallel (Fig 11.5). The shortest distance is 0 for intersecting lines, the perpendicular distance for parallel lines, and, for skew lines, the length of the segment perpendicular to both (pages 385–386).
Distance between two skew lines
For r = a + λb and r = a + μb, the vector b × b is perpendicular to both lines. The shortest distance is the projection of a − a, the join of a point on each line, on that direction (a projection found with a dot product, as in NCERT Section 10.6.2; NCERT pages 386–387):
Shortest distance between skew lines (NCERT page 387)
d = |(b × b) · (a − a)| / |b × b|
NCERT slip (page 387): the boxed result prints (a × a) in the top. The derivation above it (page 386), Example 9 (a − a = î − k̂) and the Summary (page 392) all use the difference a − a, which is right. In an exam, write a − a.
In Cartesian form, with points (x, y, z), (x, y, z) and direction ratios a, b, c and a, b, c, the top is the absolute value of the determinant with rows x − x, y − y, z − z; a, b, c; a, b, c, and the bottom is √((bc − bc)2 + (ca − ca)2 + (ab − ab)2) (page 387).
NCERT Example 9 (page 388): for r = î + ĵ + λ(2î − ĵ + k̂) and r = 2î + ĵ − k̂ + μ(3î − 5ĵ + 2k̂), b × b = 3î − ĵ − 7k̂ and a − a = î − k̂, so d = 10/√59.
Do the lines meet? Beyond the NCERT text: if b × b ≠ 0 (not parallel) and (b × b) · (a − a) = 0, the distance is 0 and the lines intersect. The same test finds a parameter that makes two lines meet (extras Q5).
Distance between parallel lines
If the lines are parallel, r = a + λb and r = a + μb, they lie in one plane, and b × b = 0, so the formula above fails. Instead (NCERT Section 11.5.2, pages 387–388):
Distance between parallel lines
d = |b × (a − a)| / |b|
NCERT Example 10 (pages 388–389): for a = î + 2ĵ − 4k̂, a = 3î + 3ĵ − 5k̂ and b = 2î + 3ĵ + 6k̂, b × (a − a) = −9î + 14ĵ − 4k̂, so d = √293/7.
Solved examples
Example 1: Two lines in vector form (NCERT Exercise 11.2, Q12, page 390)
Find the shortest distance between r = î + 2ĵ + k̂ + λ(î − ĵ + k̂) and r = 2î − ĵ − k̂ + μ(2î + ĵ + 2k̂).
b × b = −3î + 3k̂, of length 3√2, and a − a = î − 3ĵ − 2k̂. The dot product is −3 − 6 = −9.
Answer: d = 9/(3√2) = 3/√2.
Example 2: Two lines in Cartesian form (NCERT Exercise 11.2, Q13, page 390)
Find the shortest distance between (x + 1)/7 = (y + 1)/(−6) = (z + 1)/1 and (x − 3)/1 = (y − 5)/(−2) = (z − 7)/1.
The points are (−1, −1, −1) and (3, 5, 7), so a − a = 4î + 6ĵ + 8k̂. b × b = −4î − 6ĵ − 8k̂, of length √116 = 2√29, and the dot product is −116.
With NCERT’s Cartesian formula: the determinant with rows 4, 6, 8; 7, −6, 1; 1, −2, 1 is 4(−4) − 6(6) + 8(−8) = −116, and the root is √((−4)2 + (−6)2 + (−8)2) = √116, the same numbers.
Answer: d = 116/(2√29) = 2√29.
Example 3: Another pair (NCERT Exercise 11.2, Q14, page 390)
Find the shortest distance between r = î + 2ĵ + 3k̂ + λ(î − 3ĵ + 2k̂) and r = 4î + 5ĵ + 6k̂ + μ(2î + 3ĵ + k̂).
b × b = −9î + 3ĵ + 9k̂, of length √171 = 3√19, and a − a = 3î + 3ĵ + 3k̂. The dot product is −27 + 9 + 27 = 9.
Answer: d = 9/(3√19) = 3/√19.
Example 4: Parallel lines
Find the distance between (x − 1)/2 = (y − 2)/(−1) = z/2 and (x − 3)/2 = y/(−1) = (z + 1)/2.
Both have b = 2î − ĵ + 2k̂, with |b| = 3. With a − a = 2î − 2ĵ − k̂, b × (a − a) = 5î + 6ĵ − 2k̂, of length √65.
Answer: d = √65/3.
Example 5: Lines that meet
Show that (x − 1)/2 = (y + 1)/3 = z/1 and (x − 3)/1 = (y − 2)/2 = (z − 1)/1 intersect, and find the point.
b × b = î − ĵ + k̂ ≠ 0 and a − a = 2î + 3ĵ + k̂, with dot product 2 − 3 + 1 = 0, so d = 0. Equating the general points (1 + 2λ, −1 + 3λ, λ) and (3 + μ, 2 + 2μ, 1 + μ) gives λ = 1, μ = 0.
Answer: they meet at (3, 2, 1).
Common mistakes to avoid
Common mistake
Using the skew formula for parallel lines
For parallel lines b × b = 0, and the skew formula becomes 0/0. Use d = |b × (a − a)|/|b| instead.
Common mistake
Dropping the absolute value
The dot product in the top can be negative, as in Examples 1 and 2; a distance cannot. Take the absolute value.
Common mistake
Taking the points from unsimplified equations
In a Cartesian equation the point is (x, y, z) only when each numerator is x − x with coefficient 1: (x + 1)/7 gives x = −1.
Quick revision summary
- Lines in space intersect, are parallel, or are skew (neither, and not in one plane).
- Skew lines r = a + λb and r = a + μb: d = |(b × b) · (a − a)| / |b × b|, measured along the common perpendicular.
- Parallel lines r = a + λb and r = a + μb: d = |b × (a − a)| / |b|.
- d = 0 with b × b ≠ 0 means the lines intersect.
Formula sheet
- skew: d = |(b × b) · (a − a)| / |b × b|
- parallel: d = |b × (a − a)| / |b|
Questions students ask
How do you prove that two lines in space are skew?
To prove that two lines in space are skew, show that their direction ratios are not proportional, so they are not parallel, and that they do not meet; beyond the NCERT text, the quick test for the second part is (b × b) · (a − a) ≠ 0, which makes the shortest distance non-zero. For the line through (1, 2, −1) with direction ratios 2, −3, −2 and the line through (4, −2, 1) with direction ratios 2, 0, 1, b × b = −3î − 6ĵ + 6k̂, of length 9, and a − a = 3î − 4ĵ + 2k̂ give −9 + 24 + 12 = 27, so the lines are skew, 3 units apart. Equating their general points gives the same verdict: three equations in λ and μ with no common solution.
How are skew lines different from parallel lines?
Skew lines and parallel lines both never meet, but parallel lines have the same direction and lie in one plane, while skew lines have different directions and no plane contains both (NCERT Section 11.5, pages 385–387). Parallel lines also stay the same distance apart all along, whereas skew lines are closest at just one pair of points, the feet of their common perpendicular, and move apart without limit on either side. For the y-axis and the line through (0, 0, −5) parallel to î + ĵ, the point (0, t, 0) of the axis is √(t/2 + 25) from the other line: 5 at t = 0 but 15 at t = 20.
What are real-life examples of skew lines?
Real-life examples of skew lines are straight paths or edges that are not parallel and never meet, such as a flyover and a road passing under it at an angle, or, in a room, an edge of the ceiling and an edge of the floor that run in different directions. A box such as a room or a cube has 12 edges, and each edge is parallel to 3 others, meets 4 and is skew to the remaining 4, so its edges form 12 × 4/2 = 24 skew pairs. Two lines drawn on one flat surface, such as a sheet of paper, can never be skew, since they lie in one plane.
What is the shortest distance between a diagonal of a cube and an edge it does not meet?
For a cube of side a, the shortest distance between a diagonal joining opposite corners and an edge it does not meet is a/√2, half a face diagonal. With one corner at O and edges along the axes, the diagonal from O to (a, a, a) has direction ratios 1, 1, 1, and the edge from (a, 0, 0) to (a, a, 0) has direction ratios 0, 1, 0, so b × b = −î + k̂, of length √2, and the join aî of O and (a, 0, 0) gives |−a|/√2 = a/√2. Each diagonal meets 6 of the 12 edges at its two ends and is skew to the other 6, all at this distance: 2√2 for a cube of side 4.
Practice questions
Try each question first, then open the answer to check your working.
-
Q1. Find the shortest distance between r = (1 − t)î + (t − 2)ĵ + (3 − 2t)k̂ and r = (s + 1)î + (2s − 1)ĵ − (2s + 1)k̂ (NCERT Exercise 11.2, Q15, page 390).
Show answerHide answer
Reading off, a = î − 2ĵ + 3k̂, b = −î + ĵ − 2k̂, a = î − ĵ − k̂ and b = î + 2ĵ − 2k̂. Then b × b = 2î − 4ĵ − 3k̂, of length √29, and a − a = ĵ − 4k̂, with dot product −4 + 12 = 8. So d = 8/√29.
-
Q2. Find the shortest distance between the x-axis and the line through (0, 0, 2) parallel to the y-axis.
Show answerHide answer
b × b = î × ĵ = k̂ and a − a = 2k̂, so d = 2: the common perpendicular is the z-axis from the origin to (0, 0, 2).
-
Q3. Are the lines r = î + λ(î + ĵ) and r = 2î + μ(ĵ + k̂) skew? Find the shortest distance.
Show answerHide answer
b × b = î − ĵ + k̂ ≠ 0, and a − a = î gives the dot product 1. So d = 1/√3 ≠ 0: the lines are skew.
-
Q4. Find the distance between the parallel lines r = λ(î + ĵ + k̂) and r = î + μ(î + ĵ + k̂).
Show answerHide answer
b × (a − a) = (î + ĵ + k̂) × î = ĵ − k̂, of length √2, and |b| = √3, so d = √2/√3 = √(2/3).