# Thread: Shortest distance between skew lines

1. ## Shortest distance between skew lines

Say I have 2 skew lines and they've given me the equations of the lines as well as shortest distance between the lines. How would I find the points on the 2 lines, e.g. A on line 1 and B on line 2 such that AB is the shortest distance.

2. Originally Posted by acevipa
Say I have 2 skew lines and they've given me the equations of the lines as well as shortest distance between the lines. How would I find the points on the 2 lines, e.g. A on line 1 and B on line 2 such that AB is the shortest distance.
1. Draw a sketch.

2. A with $\vec a$ lies on $l_1$ that means: $\vec a = \overrightarrow{p_1} + k \cdot \vec u$.

B with $\vec b$ lies on $l_2$ that means: $\vec b = \overrightarrow{p_2} + t \cdot \vec v$.

The vector $\overrightarrow{AB}$ is collinear to $(\vec u \times \vec v)$

3. Solve for (k, t, s):

$
\left( \overrightarrow{p_2} + t \cdot \vec v \right) - \left( \overrightarrow{p_1} + k \cdot \vec u \right) = s \cdot (\vec u \times \vec v)$