# Find the shortest distance between lines

Question:

Find the shortest distance between lines $\vec{r}=6 \hat{i}+2 \hat{j}+2 \hat{k}+\lambda(\hat{i}-2 \hat{j}+2 \hat{k})$

and $\vec{r}=-4 \hat{i}-\hat{k}+\mu(3 \hat{i}-2 \hat{j}-2 \hat{k})$.

Solution:

The given lines are

$\vec{r}=6 \hat{i}+2 \hat{j}+2 \hat{k}+\lambda(\hat{i}-2 \hat{j}+2 \hat{k})$

$\vec{r}=-4 \hat{i}-\hat{k}+\mu(3 \hat{i}-2 \hat{j}-2 \hat{k})$

It is known that the shortest distance between two lines, $\vec{r}=\vec{a}_{1}+\lambda \vec{b}_{1}$ and $\vec{r}=\vec{a}_{2}+\lambda \vec{b}_{2}$, is given by

$d=\left|\frac{\left(\vec{b}_{1} \times \vec{b}_{2}\right) \cdot\left(\vec{a}_{2}-\vec{a}_{1}\right)}{\left|\vec{b}_{1} \times \vec{b}_{2}\right|}\right|$            ...(3)

Comparing $\vec{r}=\vec{a}_{1}+\lambda \vec{b}_{1}$ and $\vec{r}=\vec{a}_{2}+\lambda \vec{b}_{2}$ to equations (1) and (2), we obtain

$\vec{a}_{1}=6 \hat{i}+2 \hat{j}+2 \hat{k}$

$\vec{b}_{1}=\hat{i}-2 \hat{j}+2 \hat{k}$

$\vec{a}_{2}=-4 \hat{i}-\hat{k}$

$\vec{b}_{2}=3 \hat{i}-2 \hat{j}-2 \hat{k}$

$\Rightarrow \vec{a}_{2}-\vec{a}_{1}=(-4 \hat{i}-\hat{k})-(6 \hat{i}+2 \hat{j}+2 \hat{k})=-10 \hat{i}-2 \hat{j}-3 \hat{k}$

$\Rightarrow \vec{b}_{1} \times \vec{b}_{2}=\left|\begin{array}{ccc}\hat{i} & \hat{j} & \hat{k} \\ 1 & -2 & 2 \\ 3 & -2 & -2\end{array}\right|=(4+4) \hat{i}-(-2-6) \hat{j}+(-2+6) \hat{k}=8 \hat{i}+8 \hat{j}+4 \hat{k}$

$\therefore\left|\vec{b}_{1} \times \vec{b}_{2}\right|=\sqrt{(8)^{2}+(8)^{2}+(4)^{2}}=12$

$\left(\vec{b}_{1} \times \vec{b}_{2}\right) \cdot\left(\vec{a}_{2}-\vec{a}_{1}\right)=(8 \hat{i}+8 \hat{j}+4 \hat{k}) \cdot(-10 \hat{i}-2 \hat{j}-3 \hat{k})=-80-16-12=-108$

Substituting all the values in equation (1), we obtain

$d=\left|\frac{-108}{12}\right|=9$

Therefore, the shortest distance between the two given lines is 9 units.