I have the lines
$$\frac{x-1}{2} = 1-y = \frac{z-2}{3} \tag{1}$$
and
$$\frac{x+1}{4} = \frac{4-y}{2} = \frac{z+1}{6} \tag{2}$$
I want to compute the distance between them.
I started by putting them in vector form:
$$r_1 = (1,1,2) + x(2,-1,3) \tag{3}$$
and
$$r_2 = (-1,4,-1) + y(4,-2,6) \tag{4}$$
I then wanted to project a line connecting the two along the unit normal to both lines. However, when I computed the cross product of their directions, I get $(0,0,0)$. This led me to believe the distance between the lines is zero - which is not the case.
What have I done wrong?
The distance you want is the shortest distance which is perpendicular to both lines. Take any point on the two lines in terms of any parameter you want to assign say $k_1$ and $k_2$ suppose points are $P_1:(f_1(k_1),f_2(k_1),f_3(k_1)$ on $L_1$ and $P_2:(f_4(k_2),f_5(k_2),f_6(k_2)$ on $L_2$ . The direction cosine joining the two point, $P_2-P_1$ and if you find shortest distance these direction cosine should be perpendicular to both the lines. Solve for the variable $k_1$ and $k_2$ from these condition you got the points and thus the distance.