Things You'll Need
Instructions
Write down the vector representation of both lines. For this example, let line 1 (L1) and line 2 (L2) be such that L1 = x1 + x2t and L2 = x3 + x4s, where x1 and x3 are position vectors, x2 and x4 are vectors to which each line respectively runs parallel and the s and t variables are scalars by which the parallel vector in each line must be scaled to get the exact position of the line. These are the parametric forms of the lines and will take some practice with vector operations to determine, if they aren't already given.
Define a new vector as the distance between the position vectors x1 and x3. This will appears as vector x5 = x1 - x3.
Determine the length M of the mixed triple product of the vectors x5, x2 and x4. This appears as M = |x5 (dot) (x2 (cross) x4| where "(dot)" means "take the dot product" and "(cross)" means "take the cross product." Since the mixed triple product will be a scalar, the || brackets simply suggest taking the absolute value.
Determine the length N of the cross product of the vectors x2 and x4. This appears as N = |x2 (cross) x4|. Since this is a vector length, the || brackets suggest taking the square root of the sum of the squares of the vector components.
Divide the length of the triple product M by the length of the cross product N to get the distance D between the skew lines. This appears as D = M/N.