Question: how to find the distance between two lines in 3d?
Answer: The skew lines are L=a+bt,M=c+ds. The distance between two points on L and M is D=(a+bt−c−ds)2=(e+bt−ds)2 where e=a−c. For this to be a minimum, taking partials, we want Ds=Dt=0.