Skip to main content
Examonaut

Topic 6 · Lesson 1 of 4

Lines in three dimensions

The scalar product

For a=(a1a2a3)\mathbf{a} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix} and b=(b1b2b3)\mathbf{b} = \begin{pmatrix} b_1 \\ b_2 \\ b_3 \end{pmatrix}, the scalar product (dot product) is

a⋅b=a1b1+a2b2+a3b3=∣a∣∣b∣cos⁡θ\mathbf{a} \cdot \mathbf{b} = a_1b_1 + a_2b_2 + a_3b_3 = |\mathbf{a}||\mathbf{b}|\cos\theta

where θ\theta is the angle between the vectors. So cos⁡θ=a⋅b∣a∣∣b∣\cos\theta = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}||\mathbf{b}|}, and two non-zero vectors are perpendicular exactly when a⋅b=0\mathbf{a} \cdot \mathbf{b} = 0. Also a⋅a=∣a∣2\mathbf{a} \cdot \mathbf{a} = |\mathbf{a}|^2. The scalar product is a number, not a vector.

The equation of a line

A line is fixed by a point on it, with position vector a\mathbf{a}, and a direction vector b\mathbf{b}. Every point on it is r=a+λb\mathbf{r} = \mathbf{a} + \lambda\mathbf{b} for some scalar λ\lambda. Through two points AA and BB, use b=AB→\mathbf{b} = \overrightarrow{AB}.

For A(1,2,−1)A(1, 2, -1) and B(3,−1,4)B(3, -1, 4): r=(12−1)+λ(2−35)\mathbf{r} = \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix} + \lambda\begin{pmatrix} 2 \\ -3 \\ 5 \end{pmatrix}.

Writing x=1+2λx = 1 + 2\lambda, y=2−3λy = 2 - 3\lambda, z=−1+5λz = -1 + 5\lambda and making λ\lambda the subject of each gives the Cartesian form:

x−12=y−2−3=z+15\frac{x - 1}{2} = \frac{y - 2}{-3} = \frac{z + 1}{5}

Read it backwards to go the other way: the numerators give the point, the denominators the direction. If a direction component is zero, that coordinate is constant, and you write it separately: x−12=y+34\frac{x - 1}{2} = \frac{y + 3}{4}, z=5z = 5.

How two lines can be arranged

In 3D, two lines are either

  • parallel: their direction vectors are multiples of each other;
  • intersecting: they are not parallel and they meet;
  • skew: they are not parallel and they never meet. Skew lines do not exist in 2D.

To decide, check for parallel directions first. If they are not parallel, write each line's general point, set them equal, and solve two of the three component equations for λ\lambda and μ\mu. Then check the third equation: if it holds, the lines meet; if not, they are skew.

Worked example

Intersecting lines

l1l_1: r=(102)+λ(11−1)\mathbf{r} = \begin{pmatrix} 1 \\ 0 \\ 2 \end{pmatrix} + \lambda\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix} and l2l_2: r=(03−3)+μ(1−12)\mathbf{r} = \begin{pmatrix} 0 \\ 3 \\ -3 \end{pmatrix} + \mu\begin{pmatrix} 1 \\ -1 \\ 2 \end{pmatrix}. Show that they meet, find the point, and find the acute angle between them.

Show solution
  1. xx: 1+λ=μ1 + \lambda = \mu. yy: λ=3−μ\lambda = 3 - \mu. Adding: 1+2λ=31 + 2\lambda = 3, so λ=1\lambda = 1 and μ=2\mu = 2.
  2. zz: 2−λ=12 - \lambda = 1 and −3+2μ=1-3 + 2\mu = 1. They agree, so the lines meet, at (2,1,1)(2, 1, 1).
  3. The angle uses the directions: (11−1)⋅(1−12)=1−1−2=−2\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix} \cdot \begin{pmatrix} 1 \\ -1 \\ 2 \end{pmatrix} = 1 - 1 - 2 = -2, and the magnitudes are 3\sqrt{3} and 6\sqrt{6}.
  4. cos⁡θ=∣−2∣18=0.4714\cos\theta = \frac{|-2|}{\sqrt{18}} = 0.4714, so the acute angle is 61.9°61.9°. (Taking the modulus of the scalar product gives the acute angle directly.)

Practise this topic

Both are part of Premium.