How do you find the distance betweeen two parallel lines in #3# dimensional space?

3 Answers
Mar 11, 2018

One way...

Explanation:

If you have two parallel lines in #3# dimensional space then they can be described parametrically by:

#l_1(t) = bb(p) + t bb(v)#

#l_2(t) = bb(q) + t bb(v)#

where #bb(p) = (p_1, p_2, p_3)# and #bb(q) = (q_1, q_2, q_3)# are points through which the two lines pass, #bb(v) = < v_1, v_2, v_3 ># is the vector describing their common direction and #t# is a real parameter.

The plane:

#v_1 x + v_2 y + v_3 z = 0#

is normal to both lines and each line intersects it in exactly one point.

For the line #l_1#, the point of intersection satisfies:

#(bb(p)+t bb(v)) * bb(v) = 0#

Hence:

#t = -(bb(p) * bb(v)) / (bb(v) * bb(v))#

and the point of intersection is:

#bb(p) - ((bb(p) * bb(v)) / (bb(v) * bb(v))) bb(v)#

Similarly, the point of intersection of #l_2# with the normal plane is:

#bb(q) - ((bb(q) * bb(v)) / (bb(v) * bb(v))) bb(v)#

The distance between the lines is the distance between these two points:

#sqrt((bb(q)-bb(p)-(((bb(q)-bb(p)) * bb(v)) / (bb(v) * bb(v))) bb(v)) * (bb(q)-bb(p)-(((bb(q)-bb(p)) * bb(v)) / (bb(v) * bb(v))) bb(v)))#

Mar 11, 2018

Distance: #(|bbu xx (bbq-bbp)|)/absbbu#

Explanation:

Note: This formula only works for finding the shortest distance between two parallel lines

Finding the (shortest) distance between two parallel lines is the same as finding the distance between a line and point.

Let the line #l# going through the point #P# with position vector #bbp# in the direction of #bbu# have equation #bbr=bbp + lambdabbu#. Let #Q# with position vector #bbq# be a point on the line parallel to #l# and #M# be the point on #l# closest to #Q#.

Consider the triangle #PQM# having an interior angle of #vartheta# between #PM# (ie., #bbu#) and #PQ# (ie., #bbq-bbp#).

Then

#abs(bb(MQ))=abs(bbp-bbq)sinvartheta=(|bbu xx (bbq-bbp)|)/absbbu#

Remark: If #vartheta>pi"/"2#, then the expression remains the same as #sin(pi-vartheta)=sinvartheta#

Mar 11, 2018

See below

Explanation:

Given two parallel lines #L_1,L_2#

#L_1-> p = p_1 + lambda_1 vec v#
#L_2->p=p_2+lambda_2 vec v#

with #abs(vec v) = 1#

then

#d^2 = norm(p_2-p_1)^2- << p_2-p_1, vec v >> ^2#

then

#d = sqrt(norm(p_2-p_1)^2- << p_2-p_1, vec v >> ^2)#

NOTE

#<< cdot, cdot >># represents the scalar product of two vectots