![]() |
VOOZH | about |
In 3D space, two lines can either intersect at a point, be parallel to each other, or neither intersect nor be parallel, which are referred to as skew lines. The shortest distance between two lines in 3D space is the length of the perpendicular from a point on one line to the other.
When finding the shortest distance between two lines in 3D space, we consider three cases:
The shortest distance can be calculated using vector methods, involving the cross product of direction vectors and the dot product of related vectors. This concept is important in fields like physics, engineering, and computer graphics for tasks like proximity and collision detection.
Note: The alphabets written in bold represent a vector 'x' denotes the cross product (vector product).
Considering 2 lines in vector form as:
- v1 = a1 + c × b
- v2 = a2 + d × b
Where
How Does It Work?
- Identify points on each line and their direction vectors.
- Compute the vector between the points r2 − r1.
- Find the cross product of the direction vectors v1 × v2.
- Compute the dot product of r2−r1 and v1 × v2.
- Compute the magnitude of the cross product |v1 × v2|.
- Use the formula to find the shortest distance.
Question1: For the following lines in 3D space.
Find the shortest distance between these lines?
Solution:
v1: i - 2j + (i - j + k)
v2: i - 3j + k + (i - j + k)Here, b = i - j + k
a1 = i -2j
a2 = i - 3j + k
⇒ a2 - a1 = -j + kThus, |b| = √3 = 1.73
⇒ |b × (a2 - a1)| = √2 = 1.41Shortest distance = |b × (a2 - a1)|/|b| = 1.41/1.73 = 0.815
Question2: For the following lines in 3D space.
Find the shortest distance between these lines?
Solution:
The vector can be written in form as:
v1 = i - j - k + (2i - 3j + 4k)
v2 = 2i - 3j + k + 3(2i - 3j + 4k)Here, b = 2i - 3j + 4k
|b| = √(2)2 + (-3)2+ (4)2 = 5.385
a1 = i - j - k
a2 = 2i - 3j + k
a2 - a1 = i - 2j + 2k
b × (a2 - a1) = 2i - k
|b × (a2 - a1)| = √(2)2 + (1)2 = 2.236Now applying the shortest distance formula for parallel lines = |b × (a2 - a1)|/|b| = 2.236/5.385 = 0.415
Question 3: Given two lines in the Cartesian format as:
Find the shortest distance between these lines.
Solution:
The displacement vector of V1 is 2i + 3j + 4k, for V2 is 4i + 6j + 8k
The displacement vector V2 is a multiple of V1 as, 4i + 6j + 8k = 2 (2i + 3j + 4k)So the two given lines are parallel to each other.
a1 = 2i + j + 0k
a2 = 3i + 2j + 5k
a2 - a1 = i + j +5k
b = 2i + 3j + 4k|b| = √(2)2 + (3)2 + (4)2 = 5.385
b × (a2 - a1) = 11i - 6j - k
|b × (a2 - a1)| = 12.569shortest distance = |b × (a2 - a1)|/|b| = 12.569/5.385 = 2.334
Considering 2 lines in vector form as:
Here, c and d are the constants.
The shortest distance 2 skew lines =
Note: If two lines are intersecting then the shortest distance considering the two lines skew will automatically come out to be zero.
Question 1: Given two lines in vector form as:
Find the shortest distance between these lines.
Solution:
The given lines are skew lines.
b1 = 2i + j + k
b2 = 3i - j - k
a1 = i - j
a2 = i + j
⇒ a2 - a1 = 2jThus, (b1 × b2) = 7j
Shortest distance = |(b1 × b2)(a2 - a1)|/|(b1 × b2)| = 7j × 2j /7j = 14/7 = 2
Question 2: Given two lines in vector form as:
Find the shortest distance between these lines.
Solution:
The given lines are skew lines.
Shortest distance = |(b1 × b2)(a2 - a1)|/|(b1 × b2)|
b1 = 3i - j + 2k
b2 = i + 3j + 4k
a1 = 2i - j
a2 = i - j + 2k
⇒ a2 - a1 = -i + 2kThus, (b1 × b2) = -10i - 10j + 10k
⇒ |b1 × b2| = 17.320Thus, |(b1 × b2)(a2 - a1)| = (-10, -10, 10).(-1, 0, 2) = 10 + 0 + 20 = 30
Shortest distance = |30|/10√3 = 3/√3 = √3 = 1.732
Question 3: Given 2 lines in the plane, find the shortest distance between them.
Solution:
The given lines are skew lines.
a1 = i + j
a2 = 2j + k
b1 = 2i + 3j + 4k
b2 = i + 2j + 3k
⇒ a2 - a1 = (0, 2, 3) - (1, 1, 0) = (-1, 1, 1) = -i + j + kThus, (b1 × b2) = i - 2j + k
⇒ |b1 × b2| = 2.44Shortest distance =|(i - 2j + k)( -3i - j + k)| = √6 = 2.4494.
Numerator:
|(b1 × b2)⋅(a2 − a1)| = |(1, −2, 1) ⋅ (−1, 1, 1)| = | −1 −2 +1| = | −2| = 2.
Shortest distance is
distance = 2/√6 = √6/3 = 0.8165.