Class 12 Maths, Worked in Full Past papersGet updates
Chapter 11 · Three Dimensional Geometry

Exercise 11.2 · Q15: Shortest distance between two lines with parameters tt and ss

Exercise 11.2Shortest distance between skew lines · Section 11.5.1
The question

Find the shortest distance between the lines whose vector equations are

r⃗=(1−t)i^+(t−2)j^+(3−2t)k^\vec r = (1 - t)\hat i + (t - 2)\hat j + (3 - 2t)\hat k and

r⃗=(s+1)i^+(2s−1)j^−(2s+1)k^\vec r = (s + 1)\hat i + (2s - 1)\hat j - (2s + 1)\hat k

Exam answer

Separating the terms with the parameters:

r⃗=(i^−2j^+3k^)+t(−i^+j^−2k^)\begin{aligned} \vec r &= (\hat i - 2\hat j + 3\hat k) \\ &\quad + t(-\hat i + \hat j - 2\hat k) \end{aligned} r⃗=(i^−j^−k^)+s(i^+2j^−2k^)\begin{aligned} \vec r &= (\hat i - \hat j - \hat k) \\ &\quad + s(\hat i + 2\hat j - 2\hat k) \end{aligned}

Comparing with r⃗=a⃗1+tb⃗1\vec r = \vec a_1 + t\vec b_1 and r⃗=a⃗2+sb⃗2\vec r = \vec a_2 + s\vec b_2⁠:

a⃗1=i^−2j^+3k^\vec a_1 = \hat i - 2\hat j + 3\hat k⁠, b⃗1=−i^+j^−2k^\vec b_1 = -\hat i + \hat j - 2\hat k

a⃗2=i^−j^−k^\vec a_2 = \hat i - \hat j - \hat k⁠, b⃗2=i^+2j^−2k^\vec b_2 = \hat i + 2\hat j - 2\hat k

a⃗2−a⃗1=j^−4k^\vec a_2 - \vec a_1 = \hat j - 4\hat k b⃗1×b⃗2=∣i^j^k^−11−212−2∣=(−2+4)i^−(2+2)j^+(−2−1)k^=2i^−4j^−3k^\begin{aligned} \vec b_1\times\vec b_2 &= \begin{vmatrix} \hat i & \hat j & \hat k \\ -1 & 1 & -2 \\ 1 & 2 & -2 \end{vmatrix} \\ &= (-2 + 4)\hat i - (2 + 2)\hat j \\ &\quad + (-2 - 1)\hat k \\ &= 2\hat i - 4\hat j - 3\hat k \end{aligned} ∣b⃗1×b⃗2∣=4+16+9=29|\vec b_1\times\vec b_2| = \sqrt{4 + 16 + 9} = \sqrt{29} (b⃗1×b⃗2)⋅(a⃗2−a⃗1)=2(0)+(−4)(1)+(−3)(−4)=0−4+12=8\begin{aligned} &(\vec b_1\times\vec b_2)\cdot(\vec a_2 - \vec a_1) \\ &= 2(0) + (-4)(1) + (-3)(-4) \\ &= 0 - 4 + 12 = 8 \end{aligned}

The shortest distance is

d=∣(b⃗1×b⃗2)⋅(a⃗2−a⃗1)∣b⃗1×b⃗2∣∣=∣829∣\begin{aligned} d &= \left|\frac{(\vec b_1\times\vec b_2)\cdot(\vec a_2 - \vec a_1)}{|\vec b_1\times\vec b_2|}\right| \\ &= \left|\frac{8}{\sqrt{29}}\right| \end{aligned}

∴\therefore The shortest distance is 829\dfrac{8}{\sqrt{29}} units.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

These equations are vector equations of lines written component by component. Collecting the terms without the parameter and the terms with it puts each line in the form r⃗=a⃗+tb⃗\vec r = \vec a + t\vec b⁠: a point plus a multiple of a direction. Then the skew-lines formula applies as usual.

Given, to find, and the plan
Given
l1l_1⁠: r⃗=(1−t)i^+(t−2)j^+(3−2t)k^\vec r = (1 - t)\hat i + (t - 2)\hat j + (3 - 2t)\hat k⁠; l2l_2⁠: r⃗=(s+1)i^+(2s−1)j^−(2s+1)k^\vec r = (s + 1)\hat i + (2s - 1)\hat j - (2s + 1)\hat k⁠.
To find
The shortest distance dd between l1l_1 and l2l_2⁠.
Plan
(1) Rewrite each line as point + parameter ×\times direction. (2) Find a⃗2−a⃗1\vec a_2 - \vec a_1⁠. (3) Find b⃗1×b⃗2\vec b_1\times\vec b_2⁠. (4) Its length. (5) The dot product. (6) The formula. (7) Check by finding the closest points.

Basics you need

1Vector form of a line

r⃗=a⃗+λb⃗\vec r = \vec a + \lambda\vec b⁠: the vector multiplied by the parameter is the direction; the rest is a point (Section 11.3.1). The parameter may be called tt⁠, ss⁠, λ\lambda or μ\mu⁠. Basics: go to A, then walk λ copies of b

2Shortest distance between skew lines

For r⃗=a⃗1+λb⃗1\vec r = \vec a_1 + \lambda\vec b_1 and r⃗=a⃗2+μb⃗2\vec r = \vec a_2 + \mu\vec b_2 (Section 11.5.1):

d=∣(b⃗1×b⃗2)⋅(a⃗2−a⃗1)∣b⃗1×b⃗2∣∣.d = \left|\frac{(\vec b_1\times\vec b_2)\cdot(\vec a_2 - \vec a_1)}{|\vec b_1\times\vec b_2|}\right|.

Lesson: project onto the common perpendicular

3The cross product

b⃗1×b⃗2\vec b_1\times\vec b_2 is perpendicular to both b⃗1\vec b_1 and b⃗2\vec b_2 (Section 10.6.3). Basics: the cross product

4Projection

The projection of v⃗\vec v on the direction of n⃗\vec n has length ∣v⃗⋅n⃗∣∣n⃗∣\frac{|\vec v\cdot\vec n|}{|\vec n|} (Section 10.6.2). Basics: the shadow on the gap direction

Solution

  1. Separate the point and the direction

    r⃗=(1−t)i^+(t−2)j^+(3−2t)k^=(i^−2j^+3k^)+t(−i^+j^−2k^),r⃗=(s+1)i^+(2s−1)j^−(2s+1)k^=(i^−j^−k^)+s(i^+2j^−2k^).\begin{aligned} \vec r &= (1 - t)\hat i + (t - 2)\hat j + (3 - 2t)\hat k \\ &= (\hat i - 2\hat j + 3\hat k) + t(-\hat i + \hat j - 2\hat k), \\ \vec r &= (s + 1)\hat i + (2s - 1)\hat j - (2s + 1)\hat k \\ &= (\hat i - \hat j - \hat k) + s(\hat i + 2\hat j - 2\hat k). \end{aligned}

    So a⃗1=i^−2j^+3k^\vec a_1 = \hat i - 2\hat j + 3\hat k⁠, b⃗1=−i^+j^−2k^\vec b_1 = -\hat i + \hat j - 2\hat k⁠, a⃗2=i^−j^−k^\vec a_2 = \hat i - \hat j - \hat k⁠, b⃗2=i^+2j^−2k^\vec b_2 = \hat i + 2\hat j - 2\hat k⁠.

    Split each bracket into its constant part and its parameter part: 1−t1 - t gives 11 and −t-t⁠, so i^\hat i and −ti^-t\hat i⁠. Watch the last term of the second line: −(2s+1)k^=−k^−2sk^-(2s + 1)\hat k = -\hat k - 2s\hat k⁠, so the constant part is −k^-\hat k and the direction has −2k^-2\hat k⁠. Putting t=0t = 0 and s=0s = 0 gives the points S(1,−2,3)S(1, -2, 3) and T(1,−1,−1)T(1, -1, -1)⁠.
    Vector equation of a line, Section 11.3.1. Basics: a⃗ + λb⃗
  2. The joining vector a⃗2−a⃗1\vec a_2 - \vec a_1

    a⃗2−a⃗1=(1−1)i^+(−1+2)j^+(−1−3)k^=0i^+j^−4k^.\begin{aligned} \vec a_2 - \vec a_1 &= (1 - 1)\hat i + (-1 + 2)\hat j \\ &\quad + (-1 - 3)\hat k \\ &= 0\hat i + \hat j - 4\hat k. \end{aligned}
    This is ST→\overrightarrow{ST}⁠. Its i^\hat i component is 0, which must be kept in mind for the dot product.
    Vector joining two points (Section 10.5.2). Basics: points in space
  3. The cross product b⃗1×b⃗2\vec b_1\times\vec b_2

    b⃗1×b⃗2=∣i^j^k^−11−212−2∣=((1)(−2)−(−2)(2))i^−((−1)(−2)−(−2)(1))j^+((−1)(2)−(1)(1))k^=2i^−4j^−3k^.\begin{aligned} \vec b_1\times\vec b_2 &= \begin{vmatrix} \hat i & \hat j & \hat k \\ -1 & 1 & -2 \\ 1 & 2 & -2 \end{vmatrix} \\ &= \big((1)(-2) - (-2)(2)\big)\hat i \\ &\quad - \big((-1)(-2) - (-2)(1)\big)\hat j \\ &\quad + \big((-1)(2) - (1)(1)\big)\hat k \\ &= 2\hat i - 4\hat j - 3\hat k. \end{aligned}
    Each bracket has two signed products, so go slowly: −2+4=2-2 + 4 = 2⁠; 2+2=42 + 2 = 4⁠, with the middle minus sign giving −4-4⁠; −2−1=−3-2 - 1 = -3⁠. Check: 2(−1)+(−4)(1)+(−3)(−2)=02(-1) + (-4)(1) + (-3)(-2) = 0 and 2(1)+(−4)(2)+(−3)(−2)=02(1) + (-4)(2) + (-3)(-2) = 0⁠. It is not 0⃗\vec 0⁠, so the lines are not parallel.
    Determinant form of the cross product (Section 10.6.3). Basics: a⃗ × b⃗ stands up from both
  4. Its length

    ∣b⃗1×b⃗2∣=22+(−4)2+(−3)2=4+16+9=29.\begin{aligned} |\vec b_1\times\vec b_2| &= \sqrt{2^2 + (-4)^2 + (-3)^2} \\ &= \sqrt{4 + 16 + 9} = \sqrt{29}. \end{aligned}
    29 is prime, so 29\sqrt{29} does not simplify.
    Length of a vector. Basics: Pythagoras in 3D
  5. The dot product

    (b⃗1×b⃗2)⋅(a⃗2−a⃗1)=(2)(0)+(−4)(1)+(−3)(−4)=0−4+12=8.\begin{aligned} &(\vec b_1\times\vec b_2)\cdot(\vec a_2 - \vec a_1) \\ &= (2)(0) + (-4)(1) + (-3)(-4) \\ &= 0 - 4 + 12 = 8. \end{aligned}
    Multiply matching components of 2i^−4j^−3k^2\hat i - 4\hat j - 3\hat k and 0i^+j^−4k^0\hat i + \hat j - 4\hat k and add; (−3)(−4)=+12(-3)(-4) = +12⁠.
    a⃗⋅b⃗=a1b1+a2b2+a3b3\vec a\cdot\vec b = a_1b_1 + a_2b_2 + a_3b_3⁠. Basics: the dot product
  6. Put it into the formula

    d=∣(b⃗1×b⃗2)⋅(a⃗2−a⃗1)∣b⃗1×b⃗2∣∣=∣829∣=829.\begin{aligned} d &= \left|\frac{(\vec b_1\times\vec b_2)\cdot(\vec a_2 - \vec a_1)}{|\vec b_1\times\vec b_2|}\right| \\ &= \left|\frac{8}{\sqrt{29}}\right| = \frac{8}{\sqrt{29}}. \end{aligned}
    This is the length of the projection of ST→\overrightarrow{ST} on the unit vector along the common perpendicular. Rationalised, it is 82929\frac{8\sqrt{29}}{29}⁠; the answer key keeps 829\frac{8}{\sqrt{29}}⁠. The final formula for dd on page 387 of the book (set in bold) prints (a⃗2×a⃗1)(\vec a_2 \times \vec a_1) where (a⃗2−a⃗1)(\vec a_2 - \vec a_1) is meant; the derivation just before it uses the difference.
    Section 11.5.1, shortest distance between skew lines. Lesson: the shortest distance
  7. Check: find the closest points

    Let P=a⃗1+tb⃗1P = \vec a_1 + t\vec b_1 on l1l_1 and Q=a⃗2+sb⃗2Q = \vec a_2 + s\vec b_2 on l2l_2⁠. Then

    PQ→=(s+t)i^+(1+2s−t)j^+(−4−2s+2t)k^.\begin{aligned} \overrightarrow{PQ} &= (s + t)\hat i + (1 + 2s - t)\hat j \\ &\quad + (-4 - 2s + 2t)\hat k. \end{aligned}

    PQ→⋅b⃗1=0\overrightarrow{PQ}\cdot\vec b_1 = 0 and PQ→⋅b⃗2=0\overrightarrow{PQ}\cdot\vec b_2 = 0 give

    9+5s−6t=0,10+9s−5t=0,\begin{aligned} 9 + 5s - 6t &= 0, \\ 10 + 9s - 5t &= 0, \end{aligned}

    so t=3129t = \frac{31}{29} and s=−1529s = -\frac{15}{29}⁠. Then P(−229,−2729,2529)P\left(-\frac{2}{29}, -\frac{27}{29}, \frac{25}{29}\right)⁠, Q(1429,−5929,129)Q\left(\frac{14}{29}, -\frac{59}{29}, \frac{1}{29}\right) and

    PQ→=829(2i^−4j^−3k^),PQ=82929=829.\begin{aligned} \overrightarrow{PQ} &= \frac{8}{29}(2\hat i - 4\hat j - 3\hat k), \\ PQ &= \frac{8\sqrt{29}}{29} = \frac{8}{\sqrt{29}}. \end{aligned}
    S(1, −2, 3) T(1, −1, −1) P Q l₁ l₂ d = 8/√29
    Oblique projection, not to scale (lengths and right angles are not shown true). l1l_1 passes through S(1,−2,3)S(1, -2, 3) (t=0t = 0⁠) and l2l_2 through T(1,−1,−1)T(1, -1, -1) (s=0s = 0⁠). The common perpendicular PQPQ has length 829\frac{8}{\sqrt{29}}⁠; STST (dashed) is 17\sqrt{17}⁠.
    Solving the two linear equations: 6t−5s=96t - 5s = 9 and 5t−9s=105t - 9s = 10 give 29t=3129t = 31 (multiply the first by 9, the second by 5, and subtract). PQ→\overrightarrow{PQ} is a multiple of b⃗1×b⃗2\vec b_1\times\vec b_2⁠, as the formula assumes, and its length is the same dd⁠. Since d≠0d \ne 0 and the lines are not parallel, they are skew.
    The line of shortest distance is perpendicular to both lines (Section 11.5). Lesson: skew lines
Result

The shortest distance between the lines is 829\frac{8}{\sqrt{29}} units (=82929)\left(= \frac{8\sqrt{29}}{29}\right)⁠. The lines are skew.

(Textbook answer: 829\frac{8}{\sqrt{29}}⁠.)

Check it with numbers

29≈5.385165\sqrt{29} \approx 5.385165⁠, so d≈1.485563d \approx 1.485563⁠. The closest points are P≈P \approx (−0.068966, −0.931034, 0.862069)(-0.068966,\ -0.931034,\ 0.862069) at t≈1.068966t \approx 1.068966⁠, and Q≈Q \approx (0.482759, −2.034483, 0.034483)(0.482759,\ -2.034483,\ 0.034483) at s≈−0.517241s \approx -0.517241⁠; the distance between them is 1.4855631.485563 again. For comparison, ST=0+1+16=17≈4.123106ST = \sqrt{0 + 1 + 16} = \sqrt{17} \approx 4.123106⁠.

Common mistakes
  1. Mishandling −(2s+1)k^-(2s + 1)\hat k: it is −k^−2sk^-\hat k - 2s\hat k⁠, so a⃗2\vec a_2 has −k^-\hat k and b⃗2\vec b_2 has −2k^-2\hat k⁠. Taking +k^+\hat k or +2k^+2\hat k changes the answer.
  2. Reading b⃗1\vec b_1 as i^+j^+2k^\hat i + \hat j + 2\hat k: the parameter terms are −t-t⁠, +t+t and −2t-2t⁠, so b⃗1=−i^+j^−2k^\vec b_1 = -\hat i + \hat j - 2\hat k⁠.
  3. Using a⃗2×a⃗1\vec a_2\times\vec a_1 from the misprinted final formula for dd on page 387 (set in bold) instead of a⃗2−a⃗1\vec a_2 - \vec a_1⁠.
What to take away
  1. A vector equation written component by component can always be split into point + parameter ×\times direction.
  2. Then d=∣(b⃗1×b⃗2)⋅(a⃗2−a⃗1)∣∣b⃗1×b⃗2∣d = \frac{|(\vec b_1\times\vec b_2)\cdot(\vec a_2 - \vec a_1)|}{|\vec b_1\times\vec b_2|}⁠, whatever the parameters are called.
  3. Putting the parameter equal to 0 gives the point a⃗\vec a⁠; the coefficients of the parameter give b⃗\vec b⁠.

Every fact used, and where it comes from

FactUsed inSource
Vector equation r⃗=a⃗+λb⃗\vec r = \vec a + \lambda\vec b⁠: point and directionStep 1Section 11.3.1 (Basics)
Vector joining two pointsStep 2Section 10.5.2
b⃗1×b⃗2\vec b_1\times\vec b_2 as a determinant; it is perpendicular to both vectorsStep 3Section 10.6.3 (Basics)
d=∣(b⃗1×b⃗2)⋅(a⃗2−a⃗1)∣b⃗1×b⃗2∣∣d = \left|\frac{(\vec b_1\times\vec b_2)\cdot(\vec a_2 - \vec a_1)}{|\vec b_1\times\vec b_2|}\right|⁠; the final formula for dd on p. 387 (set in bold) misprints a⃗2−a⃗1\vec a_2 - \vec a_1 as a⃗2×a⃗1\vec a_2\times\vec a_1Steps 4 to 6Section 11.5.1 (Lesson)
Dot product in componentsSteps 3, 5, 7Section 10.6.1 (Basics)
Shortest segment is perpendicular to both skew linesStep 7Section 11.5 (Lesson)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →