Here you will learn formula to find the distance between two lines in 3d in both vector form and cartesian form with example.
Letโs begin โ
Distance Between Two Lines in 3d
(a) Vector Form
Let \(l_1\) and \(l_2\) be two lines having vector equations
\(l_1\) : \(\vec{r}\) =ย \(\vec{a_1}\) + \(\lambda\)\(\vec{b_1}\)
and \(l_2\) : \(\vec{r}\) = \(\vec{a_2}\) + \(\mu\)\(\vec{b_2}\)
The shortest distance (S.D.) between two the two non-parallel lines \(\vec{r}\) = \(\vec{a_1}\) + \(\lambda\)\(\vec{b_1}\) and \(\vec{r}\) = \(\vec{a_2}\) + \(\mu\)\(\vec{b_2}\) is given by
S.D. = |\((\vec{b_1} \times \vec{b_2}).(\vec{a_2} -\vec{ a_1})\over |\vec{b_1} \times \vec{b_2}|\)|
Condition for two given lines to intersect :ย If given lines intersect, then the shortest distance between them is zero.
\((\vec{b_1} \times \vec{b_2}).(\vec{a_2} -\vec{ a_1})\) = 0
(b) Cartesian Form
Let the cartesian equation of two skew lines be
\(x โ x_1\over l_1\) = \(y โ y_1\over m_1\) = \(z โ z_1\over n_1\)
and \(x โ x_2\over l_2\) = \(y โ y_2\over m_2\) = \(z โ z_2\over n_2\)
Shortest Distance (S.D.) = \(\begin{vmatrix} x_2 โ x_1 & y_2 โ y_1 &ย z_2 โ z_1 \\ย l_1 & m_1 & n_1 \\ย l_2 & m_2 & n_2 \end{vmatrix}\over \sqrt{(m_1n_2 โ m_2n_1)^2 + (n_1l_1 โ l_1n_2)^2 + (l_1m_2 โ l_2m_1)^2}\)
Condition for two given lines to intersect :ย If given lines intersect, then the shortest distance between them is zero.
\(\begin{vmatrix} x_2 โ x_1 & y_2 โ y_1 &ย z_2 โ z_1 \\ย l_1 & m_1 & n_1 \\ย l_2 & m_2 & n_2 \end{vmatrix}\) = 0
Example : Find the shortest distance between the lines
\(\vec{r}\) = (\(4\hat{i} โ \hat{j}\)) + \(\lambda\)(\(\hat{i} + 2\hat{j} โ 3\hat{k}\))
and \(\vec{r}\) = (\(\hat{i} โ \hat{j} + 2\hat{k}\)) + \(\mu\)(\(2\hat{i} + 4\hat{j} โ 5\hat{k}\))
Solution : We know that the shortest distance between two lines \(\vec{r}\) = \(\vec{a_1}\) + \(\lambda\)\(\vec{b_1}\) and \(\vec{r}\) = \(\vec{a_2}\) + \(\mu\)\(\vec{b_2}\) is given by
d = |\((\vec{b_1} \times \vec{b_2}).(\vec{a_2} -\vec{ a_1})\over |\vec{b_1} \times \vec{b_2}|\)|
Comparing the given equation with the equations \(\vec{r}\) = \(\vec{a_1}\) + \(\lambda\)\(\vec{b_1}\) and \(\vec{r}\) = \(\vec{a_2}\) + \(\mu\)\(\vec{b_2}\) respectively.
\(\vec{a_1}\) = \(4\hat{i} โ \hat{j}\), \(\vec{a_2}\) = \(\hat{i} โ \hat{j} + 2\hat{k}\)
and \(\vec{b_1}\) = \(\hat{i} + 2\hat{j} โ 3\hat{k}\), \(\vec{b_2}\) = \(2\hat{i} + 4\hat{j} โ 5\hat{k}\)
\(a_2 โ a_1\) = \(-3\hat{i} + 0\hat{j} + 2\hat{k}\)
and \(b_1\times b_2\) = \(\begin{vmatrix} \hat{i} & \hat{j} &ย \hat{k} \\ย 1 & 2 & -3 \\ย 2 & 4 & -5 \end{vmatrix}\) = \(2\hat{i} โ \hat{j} + 0\hat{k}\)
(\(a_2 โ a_1\)).(\(b_1\times b_2\)) = \(-3\hat{i} + 0\hat{j} + 2\hat{k}\).\(2\hat{i} โ \hat{j} + 0\hat{k}\) = -6 + 0 + 0 = 0
and | \(b_1\times b_2\) | = \(\sqrt{4 + 1 + 0}\) = \(\sqrt{5}\)
\(\therefore\) Shortest Distance = |\((\vec{b_1} \times \vec{b_2}).(\vec{a_2} -\vec{ a_1})\over |\vec{b_1} \times \vec{b_2}|\)|ย
= |\(-6\over \sqrt{5}\)| = \(6\over \sqrt{5}\)