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

Exercise 11.2 · Q13: Shortest distance between two lines in Cartesian form

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

Find the shortest distance between the lines

x+17=y+1−6=z+11\frac{x + 1}{7} = \frac{y + 1}{-6} = \frac{z + 1}{1} and x−31=y−5−2=z−71\frac{x - 3}{1} = \frac{y - 5}{-2} = \frac{z - 7}{1}

Exam answer

The first line passes through (−1,−1,−1)(-1, -1, -1) with direction ratios 7,−6,17, -6, 1⁠; the second through (3,5,7)(3, 5, 7) with direction ratios 1,−2,11, -2, 1⁠. So

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

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

a⃗2−a⃗1=4i^+6j^+8k^\vec a_2 - \vec a_1 = 4\hat i + 6\hat j + 8\hat k b⃗1×b⃗2=∣i^j^k^7−611−21∣=(−6+2)i^−(7−1)j^+(−14+6)k^=−4i^−6j^−8k^\begin{aligned} \vec b_1\times\vec b_2 &= \begin{vmatrix} \hat i & \hat j & \hat k \\ 7 & -6 & 1 \\ 1 & -2 & 1 \end{vmatrix} \\ &= (-6 + 2)\hat i - (7 - 1)\hat j \\ &\quad + (-14 + 6)\hat k \\ &= -4\hat i - 6\hat j - 8\hat k \end{aligned} ∣b⃗1×b⃗2∣=16+36+64=116=229\begin{aligned} |\vec b_1\times\vec b_2| &= \sqrt{16 + 36 + 64} \\ &= \sqrt{116} = 2\sqrt{29} \end{aligned} (b⃗1×b⃗2)⋅(a⃗2−a⃗1)=(−4)(4)+(−6)(6)+(−8)(8)=−16−36−64=−116\begin{aligned} &(\vec b_1\times\vec b_2)\cdot(\vec a_2 - \vec a_1) \\ &= (-4)(4) + (-6)(6) + (-8)(8) \\ &= -16 - 36 - 64 = -116 \end{aligned}

The shortest distance is

d=∣(b⃗1×b⃗2)⋅(a⃗2−a⃗1)∣b⃗1×b⃗2∣∣=∣−116229∣\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{-116}{2\sqrt{29}}\right| \end{aligned}

∴\therefore The shortest distance is 5829=229\dfrac{58}{\sqrt{29}} = 2\sqrt{29} units.

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

The one idea this problem is built on

A line in Cartesian form gives the same two things as the vector form: a point (from the numerators) and a direction (from the denominators). So write a⃗1,b⃗1,a⃗2,b⃗2\vec a_1, \vec b_1, \vec a_2, \vec b_2 and use the skew-lines formula: the shortest distance is the length of the projection of the joining vector a⃗2−a⃗1\vec a_2 - \vec a_1 on the common perpendicular direction b⃗1×b⃗2\vec b_1\times\vec b_2⁠.

Given, to find, and the plan
Given
l1l_1⁠: x+17=y+1−6=z+11\frac{x + 1}{7} = \frac{y + 1}{-6} = \frac{z + 1}{1}⁠; l2l_2⁠: x−31=y−5−2=z−71\frac{x - 3}{1} = \frac{y - 5}{-2} = \frac{z - 7}{1}⁠.
To find
The shortest distance dd between l1l_1 and l2l_2⁠.
Plan
(1) Read points and directions, and write them as vectors. (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 with the Cartesian formula. (8) See why the given points are the closest points.

Basics you need

1Reading the Cartesian form

x−x1a=y−y1b=z−z1c\frac{x - x_1}{a} = \frac{y - y_1}{b} = \frac{z - z_1}{c} passes through (x1,y1,z1)(x_1, y_1, z_1) and is parallel to ai^+bj^+ck^a\hat i + b\hat j + c\hat k (Section 11.3.1). Basics: a line is a point plus a direction

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. Points and directions as vectors

    x−(−1)7=y−(−1)−6=z−(−1)1\frac{x - (-1)}{7} = \frac{y - (-1)}{-6} = \frac{z - (-1)}{1} passes through S(−1,−1,−1)S(-1, -1, -1)⁠; x−31=y−5−2=z−71\frac{x - 3}{1} = \frac{y - 5}{-2} = \frac{z - 7}{1} passes through T(3,5,7)T(3, 5, 7)⁠. So

    a⃗1=−i^−j^−k^,b⃗1=7i^−6j^+k^,a⃗2=3i^+5j^+7k^,b⃗2=i^−2j^+k^.\begin{aligned} \vec a_1 &= -\hat i - \hat j - \hat k, & \vec b_1 &= 7\hat i - 6\hat j + \hat k, \\ \vec a_2 &= 3\hat i + 5\hat j + 7\hat k, & \vec b_2 &= \hat i - 2\hat j + \hat k. \end{aligned}
    Each numerator x+1x + 1 is x−(−1)x - (-1)⁠, so every coordinate of SS is −1-1⁠. The denominators, with their signs, are the direction ratios, and direction ratios a,b,ca, b, c give the direction vector ai^+bj^+ck^a\hat i + b\hat j + c\hat k⁠.
    Cartesian equation (3) and the Remark of Section 11.3.1. Basics: point plus direction
  2. The joining vector a⃗2−a⃗1\vec a_2 - \vec a_1

    a⃗2−a⃗1=(3+1)i^+(5+1)j^+(7+1)k^=4i^+6j^+8k^.\begin{aligned} \vec a_2 - \vec a_1 &= (3 + 1)\hat i + (5 + 1)\hat j \\ &\quad + (7 + 1)\hat k \\ &= 4\hat i + 6\hat j + 8\hat k. \end{aligned}
    This is ST→\overrightarrow{ST}⁠. Subtracting −1-1 adds 1 to each coordinate of TT⁠.
    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^7−611−21∣=((−6)(1)−(1)(−2))i^−((7)(1)−(1)(1))j^+((7)(−2)−(−6)(1))k^=−4i^−6j^−8k^.\begin{aligned} \vec b_1\times\vec b_2 &= \begin{vmatrix} \hat i & \hat j & \hat k \\ 7 & -6 & 1 \\ 1 & -2 & 1 \end{vmatrix} \\ &= \big((-6)(1) - (1)(-2)\big)\hat i \\ &\quad - \big((7)(1) - (1)(1)\big)\hat j \\ &\quad + \big((7)(-2) - (-6)(1)\big)\hat k \\ &= -4\hat i - 6\hat j - 8\hat k. \end{aligned}
    Expand along the top row, with a minus sign on the j^\hat j term. Check: (−4)(7)+(−6)(−6)+(−8)(1)(-4)(7) + (-6)(-6) + (-8)(1) =−28+36−8=0= -28 + 36 - 8 = 0 and (−4)(1)+(−6)(−2)+(−8)(1)(-4)(1) + (-6)(-2) + (-8)(1) =−4+12−8=0= -4 + 12 - 8 = 0⁠, so it is perpendicular to both lines. 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∣=16+36+64=116=229.\begin{aligned} |\vec b_1\times\vec b_2| &= \sqrt{16 + 36 + 64} \\ &= \sqrt{116} = 2\sqrt{29}. \end{aligned}
    116=4×29116 = 4 \times 29 and 4=2\sqrt4 = 2⁠; 29 is prime, so 29\sqrt{29} does not simplify further.
    Length of a vector. Basics: Pythagoras in 3D
  5. The dot product

    (b⃗1×b⃗2)⋅(a⃗2−a⃗1)=(−4)(4)+(−6)(6)+(−8)(8)=−16−36−64=−116.\begin{aligned} &(\vec b_1\times\vec b_2)\cdot(\vec a_2 - \vec a_1) \\ &= (-4)(4) + (-6)(6) + (-8)(8) \\ &= -16 - 36 - 64 = -116. \end{aligned}
    Multiply matching components and add. Notice that a⃗2−a⃗1=4i^+6j^+8k^\vec a_2 - \vec a_1 = 4\hat i + 6\hat j + 8\hat k is exactly −(b⃗1×b⃗2)-(\vec b_1\times\vec b_2)⁠; Step 8 explains what that means.
    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∣∣=∣−116229∣=5829=582929=229.\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{-116}{2\sqrt{29}}\right| = \frac{58}{\sqrt{29}} \\ & = \frac{58\sqrt{29}}{29} = 2\sqrt{29}. \end{aligned}
    Cancel 2, then rationalise: 5829×2929=582929\frac{58}{\sqrt{29}} \times \frac{\sqrt{29}}{\sqrt{29}} = \frac{58\sqrt{29}}{29}⁠, and 58=2×2958 = 2 \times 29⁠. The modulus makes the distance positive. As in the other shortest-distance questions, note that 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.
    Section 11.5.1, shortest distance between skew lines. Lesson: the shortest distance
  7. Check with the Cartesian formula

    Section 11.5.1 also gives the distance directly from the Cartesian data, as a determinant over a square root. The determinant has rows x2−x1,y2−y1,z2−z1x_2 - x_1, y_2 - y_1, z_2 - z_1⁠, then a1,b1,c1a_1, b_1, c_1⁠, then a2,b2,c2a_2, b_2, c_2⁠:

    ∣4687−611−21∣=−116,\begin{vmatrix} 4 & 6 & 8 \\ 7 & -6 & 1 \\ 1 & -2 & 1 \end{vmatrix} = -116,

    and the square root is (−6+2)2+(1−7)2+(−14+6)2=116\sqrt{(-6 + 2)^2 + (1 - 7)^2 + (-14 + 6)^2} = \sqrt{116}⁠. So d=116116=116=229d = \frac{116}{\sqrt{116}} = \sqrt{116} = 2\sqrt{29} again.

    The determinant is the same number as the dot product of Step 5 (a scalar triple product), and the three brackets under the root are the components of b⃗1×b⃗2\vec b_1\times\vec b_2 from Step 3. So the Cartesian formula is the vector formula written out in coordinates. Expanding along the first row: 4(−6+2)−6(7−1)+8(−14+6)4(-6 + 2) - 6(7 - 1) + 8(-14 + 6) =−16−36−64= -16 - 36 - 64⁠.
    Cartesian form of the shortest distance, Section 11.5.1. Lesson: the shortest distance
  8. Why the given points are the closest points

    ST→=4i^+6j^+8k^\overrightarrow{ST} = 4\hat i + 6\hat j + 8\hat k is perpendicular to both lines:

    ST→⋅b⃗1=28−36+8=0,ST→⋅b⃗2=4−12+8=0.\begin{aligned} \overrightarrow{ST}\cdot\vec b_1 &= 28 - 36 + 8 = 0, \\ \overrightarrow{ST}\cdot\vec b_2 &= 4 - 12 + 8 = 0. \end{aligned}

    So STST itself is the common perpendicular, and d=ST=16+36+64=229d = ST = \sqrt{16 + 36 + 64} = 2\sqrt{29}⁠.

    S(−1, −1, −1) T(3, 5, 7) l₁ l₂ d = 2√29
    Oblique projection, not to scale (lengths and right angles are not shown true). l1l_1 through S(−1,−1,−1)S(-1, -1, -1) and l2l_2 through T(3,5,7)T(3, 5, 7)⁠. Here the segment STST is itself perpendicular to both lines, so SS and TT are the closest points and ST=229ST = 2\sqrt{29}⁠.
    In general the feet PP⁠, QQ of the common perpendicular are found from PQ→⋅b⃗1=PQ→⋅b⃗2=0\overrightarrow{PQ}\cdot\vec b_1 = \overrightarrow{PQ}\cdot\vec b_2 = 0⁠; here those equations are solved by λ=μ=0\lambda = \mu = 0⁠, that is P=SP = S and Q=TQ = T⁠. That is why the formula gave ∣ST→∣|\overrightarrow{ST}| exactly: the projection of ST→\overrightarrow{ST} on its own direction is its full length. The book chose the points so that this happens.
    The line of shortest distance is perpendicular to both lines (Section 11.5). Lesson: skew lines
Result

The shortest distance between the lines is 2292\sqrt{29} units (=5829= \frac{58}{\sqrt{29}}⁠); it is the length of STST⁠, from (−1,−1,−1)(-1, -1, -1) to (3,5,7)(3, 5, 7)⁠.

(Textbook answer: 2292\sqrt{29}⁠.)

Check it with numbers

29≈5.385165\sqrt{29} \approx 5.385165⁠, so d=229≈10.770330d = 2\sqrt{29} \approx 10.770330⁠. Also 116≈10.770330\sqrt{116} \approx 10.770330 and 5829≈10.770330\frac{58}{\sqrt{29}} \approx 10.770330⁠.

Common mistakes
  1. Reading the points as (1,1,1)(1, 1, 1) from x+1x + 1⁠, y+1y + 1⁠, z+1z + 1⁠. The point is (−1,−1,−1)(-1, -1, -1)⁠.
  2. Losing the minus signs of the denominators −6-6 and −2-2⁠: the cross product then comes out wrong.
  3. Stopping at 5829\frac{58}{\sqrt{29}} without simplifying. It is correct, but it equals 2292\sqrt{29}⁠, the expected form.
  4. 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. For lines in Cartesian form, read a point and a direction from each, then use the same formula as for vector form.
  2. The Cartesian determinant formula and the vector formula are the same computation.
  3. If a⃗2−a⃗1\vec a_2 - \vec a_1 is parallel to b⃗1×b⃗2\vec b_1\times\vec b_2⁠, the given points are the closest points and d=∣a⃗2−a⃗1∣d = |\vec a_2 - \vec a_1|⁠.

Every fact used, and where it comes from

FactUsed inSource
Point and direction vector from the Cartesian formStep 1Section 11.3.1, equation (3) and Remark (Basics)
Vector joining two pointsStep 2Section 10.5.2
Cross product as a determinant; 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)
Cartesian form of the shortest distanceStep 7Section 11.5.1, Cartesian form
Dot product in componentsSteps 3, 5, 8Section 10.6.1 (Basics)
Shortest segment is perpendicular to both linesStep 8Section 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 →