# Math Help - Perpendicular distance between two lines

1. ## Perpendicular distance between two lines

The line L1 passes through the pt A, whose position vector is i-j-5k
and is parallel to the vector i-j-4k. The line L2 passes through the
point B, whose position vector is 2i-9j-14k and is parallel to the vector 2i+5j+6k. The point P on L1 and
the
point Q on L2 are such that PQ is perpendicular to both L1 and L2.

a) Find the length of PQ

I know the vector line of L1 and L2 is L1=i-j-5k+ t(i-j-4k)
L2=2i-9j-14k+s(2i+5j+6k)
The line PQ is perpendicular to both L1 and L2 so I know the common
perpendicular vector.
(1,-1,-4) and (2,5,6) gives a directonal vector of (14i-14j+7k) or
(2,-2,1)
As the distance is perpendicular it must be the minimum? But as each line has a different parameter , s and t, I can't put them into the straight line equation and differentiate.

The book gives an answer of 3, which is the smallest distance I was able to find between the two lines by using some trial and error with different values of s and t.

Thanks

2. Hi,

what are i, j, k? Are those the unit vectors?

The perpendicular distance is the minimum distance, yes.

You can compute that by taking a plane that contains L1 and is parallel to L2. The distance of B to that plane is the perpendicular distance.

If you want to compute the exact points P and Q, you can tage the general Points of L1 and L2, compute the vector between them, and then solve the system of linear equations where that difference is perpendicular to both L1 and L2.

Greets,

Andreas

3. Thanks for your help. As you said to, I found the perpendicular and substituted the parametric equations of one line into this. These 3 equations equal a pt on L2 and I found the parameter of the unit vector in the line PQ.

4. Originally Posted by woollybull
The line L1 passes through the pt A, whose position vector is i-j-5k
and is parallel to the vector i-j-4k. The line L2 passes through the
point B, whose position vector is 2i-9j-14k and is parallel to the vector 2i+5j+6k. The point P on L1 and
the
point Q on L2 are such that PQ is perpendicular to both L1 and L2.

a) Find the length of PQ

...
If you are only interested to find the length PQ without calculating the coordinates of P and Q then there is a shortcut:

Let $\vec u , \vec v$ denote the direction vectors of the 2 lines. Then the equations of the lines become:

$l_1: \vec r= \vec a + t\cdot \vec u$

$l_2: \vec r= \vec b + t\cdot \vec v$

With $\vec n = \vec u \times \vec v$ the perpendicular distance between the 2 skewed lines is calculated by:

$d=\dfrac{(\vec b - \vec a) \cdot \vec n}{|\vec n|}$

$\vec n = [1,-1,-4] \times [2,5,6] = [14, -14, 7]$ and $|[14, 14, -7]| = 21$
Then $d = \dfrac{([2, -9, -14] - [1, -1, -5]) \cdot [14, -14, 7]}{21}=\dfrac{[1, -8, -9] \cdot [14, -14, 7]}{21}=\dfrac{63}{21}=3$