# Find (in terms of n) the shortest distance between lines L and M.

The line L has equation:$$r=(i-4k)+t(i+2j-2k)$$ The line M has equation $$r=(4i+nj+5k)+s(7i+3j-4k)$$ where n is a constant.

Find (in terms of n) the shortest distance between lines L and M.

Here's what I've tried:

The direction vector of the line perpendicular to both L and M is $(2i+10j+11k)$.

So I tried to find the vector equation of the line perpendicular to both L and M then I can find the intersection of this line with L and M. (I failed to continue)

Then I tried to express the distance between the two lines in terms of $n$ and $t$

((1+t)-(4+7t))i+((2t)-(n+3t))j+((-4-2t)-(5-4t))k

but I'm not sure whether the two 't' in the equation of L and M is the same..

-
Change one $t$ to a letter $s$ instead. – Will Jagy Jul 29 '12 at 4:58

So you want $t,s,b$ such that $$i-4k+t(i+2j-2k)+b(2i+10j+11k)=4i+nj+5k+s(7i+3j-4k)$$ That's three linear equations in the three unknowns $t,s,b$ (and the parameter $n$), so you should be able to solve for the three unknowns (in terms 0f $n$). From the value of $b$ you can easily calculate the distance between the lines (as a function of $n$).