1

Consider the four points $A = (2, 4, 0), B = (3, 1, 1), C = (1, 1, 3), D = (0, 5, 1)$. Find the distance between the lines $(AB)$ and $(CD)$, i.e. the distance between the closest points on these two lines, by using this method:

Find parametric equations of the lines $(AB)$ and $(CD)$, and find the times at which the line segment connecting a point $P_1$ on $(AB)$ to a point $P_2$ on $(CD)$ is perpendicular to both lines. The length of this segment is then the distance between the lines.

The parametric equations of both lines are:

$$x = t+2$$ $$x = -3t+4$$ $$x = t$$

and

$$x = -t_1+ 1$$ $$x = 4t_1+1$$ $$x = -2t_1+3$$

the line segment connecting them would be:

$$ABCD = (-2,7,-3)$$

how can I find when the segment is perpendicular to both lines?

note $$AB \times CD = (2,1,1)$$

  • Read answer here: https://math.stackexchange.com/questions/2213165/find-shortest-distance-between-lines-in-3d – DonAntonio Sep 09 '23 at 15:55
  • @DonAntonio that method did not work forme notice $ABCD \cdot N = 0$ – VOZ ESTOICA Sep 09 '23 at 16:19
  • Take difference between these two points, it will give you direction ratios of line joining them. The dot product of these direction ratios with those of the two lines must be zero when they are perpendicular. This will give you some equations which will give you exact values of the parameters. – Tony Pizza Sep 09 '23 at 16:30
  • t =1 ?.........? – VOZ ESTOICA Sep 09 '23 at 16:32
  • @TonyPizza show me how to get the parameters – VOZ ESTOICA Sep 09 '23 at 16:33
  • @KingPalca I will call second parameter $s$. So two lines are $(t + 2, -3t + 4, t )$ and $(-s + 1, 4s +1, -2s + 3)$. The line joining these two points will have direction ratios $t + s + 1, -3t - 4s + 3, t + 2s - 3)$ which is perpendicular to $1, -3, 1$ as well as $-1, 4, -2$. Do the rest of the calculation (also check if I haven't made some mistake in entries). – Tony Pizza Sep 09 '23 at 16:40

2 Answers2

2

Hint: we can find component forms of both lines. Hence, smallest distance between two lines given in component form is: $$d=\frac{\pm\begin{vmatrix} x_1-x_2 & y_1-y_2 & z_1-z_2\\ l_1 & m_1 & n_1\\ l_2 & m_2 & n_2 \end{vmatrix}}{\sqrt{\begin{vmatrix} l_1 & m_1 \\ l_2 & m_2 \end{vmatrix}^2+\begin{vmatrix} m_1 & n_1 \\ m_2 & n_2 \end{vmatrix}^2+\begin{vmatrix} n_1 & l_1 \\ n_2 & l_2 \end{vmatrix}^2}}.$$

If the determinant in the numerator is equal to zero, the lines intersect each other.

1

The first line is

$ \ell_1 = P_1 + t d_1 $

with $P_1 = (2, 4, 0) $ and $ d_1 = (1 , -3 , 1 ) $

While the second line is given by

$ \ell_2 = (1,1,3) + s (-1, 4, -2) $

The vector extending from a point on $\ell_1$ to a point on $\ell_2$ is given by

$ v = P_2 + s d_2 - (P_1 + t d_1 ) = (P_2 - P1) + s d_2 - t d_1 \\ = (1,1,3) - (2, 4, 0) + s (-1, 4, -2) - t (1, -3, 1) \\ = (-1, -3, 3) + s (-1, 4, -2) - t (1, -3, 1) \\ = (-1 - s - t , - 3 + 4 s + 3 t , 3 - 2 s - t ) $

We want this vector to be perpendicular to $d_1$ and $d_2$, so we get the following two equations

$ v \cdot d_1 = 0 $, i.e. $(-1 - s - t, -3 + 4s + 3 t , 3 - 2 s - t) \cdot (1, -3, 1) = 0 $

and

$ v \cdot d_2 = 0 $, i.e. $(-1 -s -t , -3 +4s + 3 t, 3 -2 s - t) \cdot (-1, 4, -2) = 0 $

These two equations, after carrying out the dot product simplify to

$11 - 15 s - 11 t = 0$

$-17 + 21 s + 15 t = 0 $

Re-arranging, we get

$ 11 t + 15 s = 11 $

$ 15 t + 21 s = 17 $

Solving these two equations using Cramer's rule gives

$ t = \dfrac{ (11)(21) - (17)(15) }{ (11)(21) - (15)^2 } = -4 $

$ s = \dfrac{ (11)(17) - (15)(11) }{ (11)(21) - (15)^2 } = \dfrac{11}{3} $

Therefore, the first point on the first line is

$ P = P_1 + t d_1 = (2, 4, 0) - 4 (1, -3, 1) = (-2, 16, - 4) $

And the second point on the second line is

$ Q = P_2 + s d_2 = (1, 1, 3) + \dfrac{11}{3} (-1, 4, -2) = \dfrac{1}{3} (-8, 47, - 13 ) $

Therefore, the distance between the two lines is just the length $\overline{PQ}$

$\overline{PQ} = \dfrac{1}{3} \sqrt{ (-6 + 8)^2 + (48 - 47)^2 + (-12 + 13)^2 } = \dfrac{\sqrt{6}}{3} = \sqrt{ \dfrac{2}{3} } $

To verify this result, very quickly, with a more efficient method, calculate $d_1 \times d_2$:

$ N = d_1 \times d_2 = (1, -3, 1) \times (-1, 4, -2) = ( 2, 1 , 1 ) $

So the plane containing the first line and parallel to the second line is

$ \pi_1: N \cdot (r - P_1) = 0 $ , i.e. $2 (x- 2) + (y - 4) + z = 0$

(Note that $r = (x,y,z) $ )

Now use the distance formula, to find the distance of $P_2$ from $\pi_1$

$d = \dfrac{ | N \cdot (P_2 - P_1) | }{\sqrt{ N \cdot N }} = \dfrac{ |2 (-1) + (-3) + 3 |}{\sqrt{ 6} } = \dfrac{2}{\sqrt{6}} = \sqrt{ \dfrac{2}{3} } $

So the answers match.

Hosam Hajeer
  • 21,978