Solution:
Key idea: For two non-parallel lines r=a1+λb1 and r=a2+μb2, the shortest distance (S.D.) is the length of their common perpendicular, given by
S.D.=b1×b2(a2−a1)⋅(b1×b2)
Step 1 — Write the first line in standard form.
In standard form the coefficients of x, y and z on top are all 1. Since 2y=1/2y and −12z=−1/12z, the first line is
1x+1=1/2y=−1/12z
Multiplying the direction ratios 1,21,−121 by 12 clears the fractions, so the first line passes through (−1,0,0) with direction ratios 12,6,−1.
a1=−i^,b1=12i^+6j^−k^
Step 2 — Write the second line in standard form.
In the same way, y+2=1y+2 and 6z−6=1/6z−1, so the second line is
1x=1y+2=1/6z−1
Multiplying the direction ratios 1,1,61 by 6 shows that the second line passes through (0,−2,1) with direction ratios 6,6,1.
a2=−2j^+k^,b2=6i^+6j^+k^
Step 3 — Find the vector joining the two given points.
We subtract the position vector of the first point from that of the second.
a2−a1=(0+1)i^+(−2−0)j^+(1−0)k^
a2−a1=i^−2j^+k^
Step 4 — Find the cross product of the directions and its magnitude.
The cross product b1×b2 is perpendicular to both lines, so it gives the direction of the common perpendicular.
b1×b2=i^126j^66k^−11
b1×b2=(6−(−6))i^−(12−(−6))j^+(72−36)k^
b1×b2=12i^−18j^+36k^
b1×b2=122+(−18)2+362
b1×b2=1764
b1×b2=42
Step 5 — Find the shortest distance.
We project a2−a1 on the common perpendicular by taking its dot product with b1×b2.
(a2−a1)⋅(b1×b2)=(1)(12)+(−2)(−18)+(1)(36)
(a2−a1)⋅(b1×b2)=84
Now we divide by the magnitude of the cross product.
S.D.=42∣84∣
S.D.=2
Therefore, the shortest distance between the lines is 2 units.