Easily determine the shortest distance between any two lines in three-dimensional space, whether they are skew or parallel. Our intuitive tool helps you solve complex 3D geometry problems quickly, providing accurate results for academic or professional use. Simply input the coordinates of a point on each line and their respective direction vectors to get started.
Formula:
The shortest distance (d) between two lines defined by points P1(x1, y1, z1) and P2(x2, y2, z2) and their respective direction vectors V1(a1, b1, c1) and V2(a2, b2, c2) is given by:
For Skew Lines:d = | (P2 - P1) ⋅ (V1 × V2) | / | V1 × V2 |
For Parallel Lines:d = | (P2 - P1) × V1 | / | V1 |
Where:P1 and P2 are position vectors of points on Line 1 and Line 2.V1 and V2 are direction vectors of Line 1 and Line 2.⋅ denotes the vector dot product.× denotes the vector cross product.| | denotes the magnitude of a vector or the absolute value of a scalar.