# Could you please explain how you would use vector projection to find the closest approach between two skew lines.The vectors are in 3D

### 1 Answer | Add Yours

Let the two skew lines have equations

(x - x1)/ l1 = (y - y1)/m1 = (z - z1)/n1

(x - x2)/ l2 = (y - y2)/m2 = (z - z2)/n2

Then the shortest distance between the two is given by

D = A/B

where A = (x2-x1)(m1n2-n1m2)-(y2-y1)(l1m2-l2m1)+

(z2-z1)(l1m3-l3m1)

and B = sqrt( (m1n2-m2n1)^2 + (n1l2-n2l1)^2 +(l1m2-l2m1)^2)