girgit.org

Three Dimensional Geometry

The angle between two lines

The big ideaThe angle between two lines is the angle between their direction vectors: \( \cos\theta = \dfrac{|\vec{b}_1 \cdot \vec{b}_2|}{|\vec{b}_1|\,|\vec{b}_2|} \), with the absolute value keeping \( \theta \) acute.

In simple words

To know how far apart two roads turn, you do not need to stand where they cross. Just look at which way each one points. Put two arrows, one for each road, tail to tail, and measure the gap between them. A line has no front or back, so always take the smaller of the two gaps you could measure.

The formula

Let \( L_1 \) and \( L_2 \) have direction ratios \( a_1, b_1, c_1 \) and \( a_2, b_2, c_2 \). Slide each line, without turning it, until it passes through the origin. The direction vectors \( \vec{b}_1 = a_1\hat{i} + b_1\hat{j} + c_1\hat{k} \) and \( \vec{b}_2 = a_2\hat{i} + b_2\hat{j} + c_2\hat{k} \) now start at O, and the dot product from the last chapter gives the angle between them:

\[ \cos\theta = \left| \frac{a_1 a_2 + b_1 b_2 + c_1 c_2}{\sqrt{a_1^2 + b_1^2 + c_1^2}\,\sqrt{a_2^2 + b_2^2 + c_2^2}} \right| \]

Why the absolute value? Two lines crossing make two angles, \( \theta \) and \( 180^\circ - \theta \). Flipping one direction vector swaps them. We agree to report the acute angle, the one that is \( 90^\circ \) or less, so \( \cos\theta \) is never negative.

With direction cosines the bottom is 1 (both sets have squares adding to 1), so

\[ \cos\theta = |l_1 l_2 + m_1 m_2 + n_1 n_2| \]

For lines given as \( \vec{r} = \vec{a}_1 + \lambda\vec{b}_1 \) and \( \vec{r} = \vec{a}_2 + \mu\vec{b}_2 \), only the directions matter: the points \( \vec{a}_1, \vec{a}_2 \) play no part.

From \( \sin\theta = \sqrt{1 - \cos^2\theta} \) and some algebra comes a sine form, worth knowing for JEE:

\[ \sin\theta = \frac{\sqrt{(a_1 b_2 - a_2 b_1)^2 + (b_1 c_2 - b_2 c_1)^2 + (c_1 a_2 - c_2 a_1)^2}}{\sqrt{a_1^2 + b_1^2 + c_1^2}\,\sqrt{a_2^2 + b_2^2 + c_2^2}} \]

The top is just \( |\vec{b}_1 \times \vec{b}_2| \), so this is \( \sin\theta = \frac{|\vec{b}_1 \times \vec{b}_2|}{|\vec{b}_1|\,|\vec{b}_2|} \).

Perpendicular and parallel

  • Perpendicular (\( \theta = 90^\circ \), \( \cos\theta = 0 \)): \( a_1 a_2 + b_1 b_2 + c_1 c_2 = 0 \).
  • Parallel (\( \theta = 0^\circ \), \( \sin\theta = 0 \)): \( \dfrac{a_1}{a_2} = \dfrac{b_1}{b_2} = \dfrac{c_1}{c_2} \).

Guess first: two diagonals at a corner

In a cube-shaped room, draw a diagonal across the left wall and another across the right wall, both starting at the bottom corner where the walls meet. The walls are at right angles. Guess: what angle do the two diagonals make: \( 45^\circ \), \( 60^\circ \) or \( 90^\circ \)?

Try it: answer in the widget, then make the room taller and flatter and watch the angle follow.

See what happens
\( 60^\circ \). With the corner at O and edge 1, the diagonals point along \( \hat{i} + \hat{k} \) and \( \hat{j} + \hat{k} \). \( \cos\theta = \frac{0 + 0 + 1}{\sqrt{2}\,\sqrt{2}} = \frac{1}{2} \). Most people guess \( 90^\circ \) because the walls are perpendicular, but both diagonals share an upward part, which pulls them together. Join their far ends with the ceiling diagonal and you get three equal sides: an equilateral triangle.

Worked examples

Worked example 1

Find the angle between \( \frac{x - 1}{2} = \frac{y + 1}{1} = \frac{z - 3}{-2} \) and \( \frac{x + 2}{3} = \frac{y}{-6} = \frac{z - 1}{2} \).

  1. d.r.'s: \( 2, 1, -2 \) and \( 3, -6, 2 \).
  2. Top: \( 6 - 6 - 4 = -4 \). Lengths: \( \sqrt{9} = 3 \) and \( \sqrt{49} = 7 \).
  3. \( \cos\theta = \left|\frac{-4}{21}\right| = \frac{4}{21} \), so \( \theta = \cos^{-1}\frac{4}{21} \approx 79^\circ \).

Worked example 2: finding an unknown

For what p are the lines with d.r.'s \( 1, p, 3 \) and \( 2, 1, -p \) perpendicular?

  1. Set the dot product to zero: \( 2 + p - 3p = 0 \).
  2. \( 2 - 2p = 0 \), so \( p = 1 \). Check: \( 1, 1, 3 \) and \( 2, 1, -1 \) give \( 2 + 1 - 3 = 0 \).

Try it. Are the lines with d.r.'s \( 2, 3, 6 \) and \( 6, 2, -3 \) perpendicular?

Answer
\( 12 + 6 - 18 = 0 \): yes.

Lines that do not meet

The formula never asks whether the lines meet. For two lines that never touch, the angle between them still means the angle between two lines drawn through one point (the origin is easiest) parallel to each. The next page is about such lines.

Don't mix these up

  • Use the direction vectors \( \vec{b}_1, \vec{b}_2 \), never the points \( \vec{a}_1, \vec{a}_2 \).
  • Perpendicular lines need the dot product of directions to be 0. Parallel lines need the ratios to be equal; a zero dot product does not make them parallel.

Words to know

Acute angle
An angle less than \( 90^\circ \). Between two lines we report the smaller angle, from \( 0^\circ \) to \( 90^\circ \).
Dot product
\( \vec{b}_1 \cdot \vec{b}_2 = a_1 a_2 + b_1 b_2 + c_1 c_2 = |\vec{b}_1||\vec{b}_2|\cos\theta \).
Perpendicular lines
Lines at \( 90^\circ \); their direction ratios have dot product 0.
Parallel lines
Lines pointing the same way; their direction ratios are proportional.

What is the angle between \( \vec{r} = \hat{i} + \lambda(\hat{i} + \hat{j}) \) and \( \vec{r} = 2\hat{k} + \mu(\hat{j} + \hat{k}) \)?

  1. \( 90^\circ \)
  2. \( 60^\circ \)
  3. \( 45^\circ \)

The dot product of two direction vectors comes out as \( -\frac{1}{2} \) of the product of their lengths. What is the angle between the lines?

  1. \( 120^\circ \)
  2. \( 60^\circ \)
  3. \( 30^\circ \)

Lines with d.r.'s \( 2, -1, 3 \) and \( -4, 2, k \) are parallel. What is k?

  1. \( -6 \)
  2. \( 6 \)
  3. \( \frac{10}{3} \)