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

Exercise 11.2 · Q12: Shortest distance between lines through i^+2j^+k^\hat i + 2\hat j + \hat k and 2i^−j^−k^2\hat i - \hat j - \hat k

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

Find the shortest distance between the lines

r⃗=(i^+2j^+k^)+λ(i^−j^+k^)\vec r = (\hat i + 2\hat j + \hat k) + \lambda(\hat i - \hat j + \hat k) and

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

Exam answer

Comparing with 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⁠:

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

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

a⃗2−a⃗1=i^−3j^−2k^\vec a_2 - \vec a_1 = \hat i - 3\hat j - 2\hat k b⃗1×b⃗2=∣i^j^k^1−11212∣=(−2−1)i^−(2−2)j^+(1+2)k^=−3i^+3k^\begin{aligned} \vec b_1\times\vec b_2 &= \begin{vmatrix} \hat i & \hat j & \hat k \\ 1 & -1 & 1 \\ 2 & 1 & 2 \end{vmatrix} \\ &= (-2 - 1)\hat i - (2 - 2)\hat j \\ &\quad + (1 + 2)\hat k \\ &= -3\hat i + 3\hat k \end{aligned} ∣b⃗1×b⃗2∣=9+0+9=32|\vec b_1\times\vec b_2| = \sqrt{9 + 0 + 9} = 3\sqrt2 (b⃗1×b⃗2)⋅(a⃗2−a⃗1)=(−3)(1)+0(−3)+3(−2)=−3+0−6=−9\begin{aligned} &(\vec b_1\times\vec b_2)\cdot(\vec a_2 - \vec a_1) \\ &= (-3)(1) + 0(-3) + 3(-2) \\ &= -3 + 0 - 6 = -9 \end{aligned}

The shortest distance is

d=∣(b⃗1×b⃗2)⋅(a⃗2−a⃗1)∣b⃗1×b⃗2∣∣=∣−932∣\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{-9}{3\sqrt2}\right| \end{aligned}

∴\therefore The shortest distance is 32=322\dfrac{3}{\sqrt2} = \dfrac{3\sqrt2}{2} units.

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

The one idea this problem is built on

The shortest segment between two skew lines is perpendicular to both lines, so it points along b⃗1×b⃗2\vec b_1\times\vec b_2⁠. Join a point of one line to a point of the other (we use a⃗1\vec a_1 and a⃗2\vec a_2⁠); the length of the shadow of this joining vector on the direction b⃗1×b⃗2\vec b_1\times\vec b_2 is the shortest distance, whichever two points we chose.

Given, to find, and the plan
Given
l1l_1⁠: r⃗=(i^+2j^+k^)+λ(i^−j^+k^)\vec r = (\hat i + 2\hat j + \hat k) + \lambda(\hat i - \hat j + \hat k)⁠; l2l_2⁠: r⃗=2i^−j^−k^\vec r = 2\hat i - \hat j - \hat k + μ(2i^+j^+2k^)+\ \mu(2\hat i + \hat j + 2\hat k)⁠.
To find
The shortest distance dd between l1l_1 and l2l_2⁠.
Plan
(1) Read off a⃗1,b⃗1,a⃗2,b⃗2\vec a_1, \vec b_1, \vec a_2, \vec b_2⁠. (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) Find its length. (5) Find the dot product. (6) Put everything into the formula. (7) Check by finding the closest points.

Basics you need

1Shortest 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

2The 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⁠; it is computed as a determinant with i^,j^,k^\hat i, \hat j, \hat k in the top row (Section 10.6.3). Basics: the cross product

3Projection

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

4Skew lines

Lines in space that are neither parallel nor intersecting (Section 11.5). Lesson: skew lines

Solution

  1. Read off the points and directions

    a⃗1=i^+2j^+k^,b⃗1=i^−j^+k^,a⃗2=2i^−j^−k^,b⃗2=2i^+j^+2k^.\begin{aligned} \vec a_1 &= \hat i + 2\hat j + \hat k, & \vec b_1 &= \hat i - \hat j + \hat k, \\ \vec a_2 &= 2\hat i - \hat j - \hat k, & \vec b_2 &= 2\hat i + \hat j + 2\hat k. \end{aligned}
    The vector multiplied by the parameter is the direction, the rest is a point. So l1l_1 passes through S(1,2,1)S(1, 2, 1) and l2l_2 through T(2,−1,−1)T(2, -1, -1)⁠. The brackets around i^+2j^+k^\hat i + 2\hat j + \hat k in the first equation only group the point; they change nothing.
    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=(2−1)i^+(−1−2)j^+(−1−1)k^=i^−3j^−2k^.\begin{aligned} \vec a_2 - \vec a_1 &= (2 - 1)\hat i + (-1 - 2)\hat j \\ &\quad + (-1 - 1)\hat k \\ &= \hat i - 3\hat j - 2\hat k. \end{aligned}
    This is ST→\overrightarrow{ST}⁠, from the point SS of l1l_1 to the point TT of l2l_2⁠: terminal minus initial, component by component.
    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^1−11212∣=((−1)(2)−(1)(1))i^−((1)(2)−(1)(2))j^+((1)(1)−(−1)(2))k^=−3i^+0j^+3k^.\begin{aligned} \vec b_1\times\vec b_2 &= \begin{vmatrix} \hat i & \hat j & \hat k \\ 1 & -1 & 1 \\ 2 & 1 & 2 \end{vmatrix} \\ &= \big((-1)(2) - (1)(1)\big)\hat i \\ &\quad - \big((1)(2) - (1)(2)\big)\hat j \\ &\quad + \big((1)(1) - (-1)(2)\big)\hat k \\ &= -3\hat i + 0\hat j + 3\hat k. \end{aligned}
    Expand along the top row; the j^\hat j term carries a minus sign, and here its bracket is 2−2=02 - 2 = 0⁠. The result is perpendicular to both directions: (−3)(1)+0(−1)+3(1)=0(-3)(1) + 0(-1) + 3(1) = 0 and (−3)(2)+0(1)+3(2)=0(-3)(2) + 0(1) + 3(2) = 0⁠. It is not the zero vector, so the lines are not parallel and the skew-lines formula applies.
    Determinant form of the cross product (Section 10.6.3). Basics: a⃗ × b⃗ stands up from both
  4. Its length

    ∣b⃗1×b⃗2∣=(−3)2+02+32=18=32.\begin{aligned} |\vec b_1\times\vec b_2| &= \sqrt{(-3)^2 + 0^2 + 3^2} \\ &= \sqrt{18} = 3\sqrt2. \end{aligned}
    18=9×218 = 9 \times 2 and 9=3\sqrt9 = 3⁠. Dividing by this length turns b⃗1×b⃗2\vec b_1\times\vec b_2 into the unit vector n^\hat n along the common perpendicular (equation (3) of Section 11.5.1).
    Length of a vector. Basics: Pythagoras in 3D
  5. The dot product

    (b⃗1×b⃗2)⋅(a⃗2−a⃗1)=(−3)(1)+(0)(−3)+(3)(−2)=−3+0−6=−9.\begin{aligned} &(\vec b_1\times\vec b_2)\cdot(\vec a_2 - \vec a_1) \\ &= (-3)(1) + (0)(-3) + (3)(-2) \\ &= -3 + 0 - 6 = -9. \end{aligned}
    Multiply matching components of −3i^+0j^+3k^-3\hat i + 0\hat j + 3\hat k and i^−3j^−2k^\hat i - 3\hat j - 2\hat k and add. The result is negative; that only means ST→\overrightarrow{ST} points against b⃗1×b⃗2\vec b_1\times\vec b_2⁠, and the modulus in the formula takes care of it.
    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∣∣=∣−932∣=32=322.\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{-9}{3\sqrt2}\right| = \frac{3}{\sqrt2} = \frac{3\sqrt2}{2}. \end{aligned}
    This is the length of the projection of ST→\overrightarrow{ST} on the unit vector n^\hat n along the common perpendicular, d=ST ∣cos⁡θ∣d = ST\,|\cos\theta|⁠. Cancel 3, then multiply top and bottom by 2\sqrt2 to rationalise. One misprint to watch: 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+λb⃗1P = \vec a_1 + \lambda\vec b_1 on l1l_1 and Q=a⃗2+μb⃗2Q = \vec a_2 + \mu\vec b_2 on l2l_2⁠. Then

    PQ→=(1+2μ−λ)i^+(−3+μ+λ)j^+(−2+2μ−λ)k^.\begin{aligned} \overrightarrow{PQ} &= (1 + 2\mu - \lambda)\hat i + (-3 + \mu + \lambda)\hat j \\ &\quad + (-2 + 2\mu - \lambda)\hat k. \end{aligned}

    PQPQ is shortest when it is perpendicular to both lines, PQ→⋅b⃗1=0\overrightarrow{PQ}\cdot\vec b_1 = 0 and PQ→⋅b⃗2=0\overrightarrow{PQ}\cdot\vec b_2 = 0⁠:

    2+3μ−3λ=0,−5+9μ−3λ=0,\begin{aligned} 2 + 3\mu - 3\lambda &= 0, \\ -5 + 9\mu - 3\lambda &= 0, \end{aligned}

    so μ=76\mu = \frac76 and λ=116\lambda = \frac{11}{6}⁠. Then P(176,16,176)P\left(\frac{17}{6}, \frac16, \frac{17}{6}\right)⁠, Q(133,16,43)Q\left(\frac{13}{3}, \frac16, \frac43\right) and

    PQ→=32i^−32k^,PQ=322=32.\begin{aligned} \overrightarrow{PQ} &= \frac32\hat i - \frac32\hat k, \\ PQ &= \frac32\sqrt2 = \frac{3}{\sqrt2}. \end{aligned}
    S(1, 2, 1) T(2, −1, −1) P Q l₁ l₂ d = 3/√2
    Oblique projection, not to scale (lengths and right angles are not shown true). l1l_1 passes through S(1,2,1)S(1, 2, 1) and l2l_2 through T(2,−1,−1)T(2, -1, -1)⁠. The common perpendicular PQPQ has length 32\frac{3}{\sqrt2}⁠; STST (dashed) is longer, 14\sqrt{14}⁠.
    This works the problem from scratch, without the formula, and gets the same distance. Subtracting the first condition from the second gives −7+6μ=0-7 + 6\mu = 0⁠. PQ→=−12(−3i^+3k^)\overrightarrow{PQ} = -\frac12(-3\hat i + 3\hat k) is a multiple of b⃗1×b⃗2\vec b_1\times\vec b_2⁠, as the formula assumes. Since d≠0d \ne 0 the lines do not meet, and Step 3 showed they are not parallel, so 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 32=322\frac{3}{\sqrt2} = \frac{3\sqrt2}{2} units. The lines are skew.

(Textbook answer: 322\frac{3\sqrt2}{2}⁠.)

Check it with numbers

2≈1.414214\sqrt2 \approx 1.414214⁠, so d≈2.121320d \approx 2.121320⁠. The closest points are P≈(2.833333, 0.166667, 2.833333)P \approx (2.833333,\ 0.166667,\ 2.833333) and Q≈(4.333333, 0.166667, 1.333333)Q \approx (4.333333,\ 0.166667,\ 1.333333)⁠; the distance between them is 1.52+0+1.52=4.5≈2.121320\sqrt{1.5^2 + 0 + 1.5^2} = \sqrt{4.5} \approx 2.121320 again. For comparison, ST=1+9+4=14≈3.741657ST = \sqrt{1 + 9 + 4} = \sqrt{14} \approx 3.741657⁠.

Common mistakes
  1. The middle term of the determinant. It is −((1)(2)−(1)(2))j^=0j^-\big((1)(2) - (1)(2)\big)\hat j = 0\hat j⁠; a zero component is still a component, and it contributes 00 to the dot product.
  2. Using a⃗2×a⃗1\vec a_2\times\vec a_1, copying the misprint in the final formula for dd on page 387 (set in bold). The formula needs the difference a⃗2−a⃗1\vec a_2 - \vec a_1⁠.
  3. Leaving the answer as −32-\frac{3}{\sqrt2}⁠. A distance is never negative; the modulus removes the sign of −9-9⁠.
  4. Dividing by ∣b⃗1∣ ∣b⃗2∣|\vec b_1|\,|\vec b_2| instead of ∣b⃗1×b⃗2∣|\vec b_1\times\vec b_2|⁠.
What to take away
  1. Skew lines: 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|}⁠.
  2. Check b⃗1×b⃗2≠0⃗\vec b_1\times\vec b_2 \ne \vec 0 first; if it were 0⃗\vec 0 the lines would be parallel and the distance would be ∣b⃗×(a⃗2−a⃗1)∣∣b⃗∣\frac{|\vec b\times(\vec a_2 - \vec a_1)|}{|\vec b|} (Example 10).
  3. The same steps in Example 9; rationalise the final surd.

Every fact used, and where it comes from

FactUsed inSource
Reading a⃗\vec a and b⃗\vec b from r⃗=a⃗+λb⃗\vec r = \vec a + \lambda\vec bStep 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)
n^=b⃗1×b⃗2∣b⃗1×b⃗2∣\hat n = \frac{\vec b_1\times\vec b_2}{|\vec b_1\times\vec b_2|}⁠, d=ST ∣cos⁡θ∣d = ST\,|\cos\theta|Steps 4, 6Section 11.5.1, equation (3) and Fig 11.6 (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_1Step 6Section 11.5.1 (Lesson)
Dot product in componentsSteps 3, 5, 7Section 10.6.1 (Basics)
Shortest segment is perpendicular to both skew lines; 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 →