Shortest Distance Between Skew Lines Calculator

Enter a point and a direction for each line to find the distance between them.

Write the three coordinates, like (1, 2, 3).

Write the three components, like (1, 0, 0).

Write the three coordinates, like (1, 2, 3).

Write the three components, like (1, 0, 0).

Try

Result

You entereddistance between the lines through (0,0,0) and (0,1,1)\text{distance between the lines through } \left(0, 0, 0\right) \text{ and } \left(0, 1, 1\right)

1\displaystyle 1
Show the work
  1. Direction of the common perpendicular

    The shortest segment between two lines is at right angles to both, so it runs along d1×d2\mathbf{d}_1 \times \mathbf{d}_2.

    n=d1×d2=(1,0,0)×(0,1,0)=(0,0,1)\begin{aligned} \mathbf{n} &= \mathbf{d}_1 \times \mathbf{d}_2 \\ &= \left(1, 0, 0\right) \times \left(0, 1, 0\right) \\ &= \left(0, 0, 1\right) \end{aligned}
  2. Distance between skew lines

    Join a point on each line with p2−p1\mathbf{p}_2 - \mathbf{p}_1, then find how much of that join lies along the common perpendicular: the absolute value of the dot product with n\mathbf{n}, divided by the length of n\mathbf{n}.

    Using d=∣(p2−p1)⋅(d1×d2)∣∣d1×d2∣d = \frac{|(\mathbf{p}_2 - \mathbf{p}_1)\cdot(\mathbf{d}_1 \times \mathbf{d}_2)|}{|\mathbf{d}_1 \times \mathbf{d}_2|}

    p2−p1=(0,1,1)−(0,0,0)=(0,1,1),  d=∣(0,1,1)⋅(0,0,1)∣1=∣1∣1=11=1\mathbf{p}_2 - \mathbf{p}_1 = \left(0, 1, 1\right) - \left(0, 0, 0\right) = \left(0, 1, 1\right),\ \ d = \frac{\left|\left(0, 1, 1\right) \cdot \left(0, 0, 1\right)\right|}{\sqrt{1}} = \frac{\left|1\right|}{\sqrt{1}} = \frac{1}{1} = 1
  3. Result

    So the shortest distance between the two skew lines is 11.

Worked examples