Lines in three dimensions

A-Level Mathematics · Vectors and Differential Equations

Vector equation of a line

$$\mathbf{r}=\mathbf{a}+t\mathbf{d}$$

$\mathbf{a}$ is the position vector of any one point on the line and $\mathbf{d}$ is any direction vector. Two very different-looking equations can therefore describe the same line.

Through two points $A$ and $B$: take $\mathbf{a}=\overrightarrow{OA}$ and $\mathbf{d}=\mathbf{b}-\mathbf{a}$.

Relationship between two lines

In three dimensions there are three possibilities, tested in this order:

  1. Parallel — one direction vector is a scalar multiple of the other;
  2. Intersecting — not parallel, and the three component equations have a consistent solution $(s,t)$;
  3. Skew — not parallel, and the three equations are inconsistent.

Two equations fix $s$ and $t$; the third equation is the test. Never skip it.

Angle and perpendicular distance

The acute angle between two lines comes from their direction vectors, using $|\mathbf{d}_{1}\cdot\mathbf{d}_{2}|$. The point $Q$ on a line closest to a given point $P$ satisfies $\overrightarrow{PQ}\cdot\mathbf{d}=0$.

looks like they intersect — actually at different depths l₁ l₂ Skew: not parallel, and the system of three equations is inconsistent
Why the third equation must be checked. On the page, these two lines cross — at the circled spot. In space they do not: they pass that point at two different depths. The algebra reflects exactly this: solving two component equations (corresponding to the two coordinates visible in the projection) always gives a pair $(s,t)$; it is the third equation — the depth coordinate — that says whether the two lines really meet. Skip that check and you conclude "intersect" for every pair of non-parallel lines.

Worked example: do two lines intersect

Let $l_{1}:\ \mathbf{r}=\mathbf{i}+\mathbf{j}+t(2\mathbf{i}-\mathbf{j}+\mathbf{k})$ and $l_{2}:\ \mathbf{r}=2\mathbf{i}+3\mathbf{k}+s(\mathbf{i}+\mathbf{j}-\mathbf{k})$. Determine the relative position of the two lines.

Solution

Step 1 — parallel? The two direction vectors $(2,-1,1)$ and $(1,1,-1)$ are not proportional (the first component suggests a factor of $2$, but $-1\ne 2(1)$). Not parallel.

Step 2 — equate the three components.

$$\mathbf{i}:\ 1+2t=2+s\qquad \mathbf{j}:\ 1-t=s\qquad \mathbf{k}:\ t=3-s$$

Step 3 — solve two, check one. From the $\mathbf{j}$ equation: $s=1-t$. Substitute into the $\mathbf{k}$ equation:

$$t=3-(1-t)=2+t\;\Longrightarrow\;0=2$$

A contradiction. So the system has no solution and the two lines are skew.

Note the presentation: choose the easiest two equations to find the unknowns (here $\mathbf{j}$ and $\mathbf{k}$, since each has only coefficients of $1$), and then substitute into the remaining equation. Choosing the wrong pair still gives the right conclusion but costs a few more lines of algebra.

Worked example: the point on a line nearest the origin

Let the line $l:\ \mathbf{r}=(\mathbf{i}+2\mathbf{j}+3\mathbf{k})+s(2\mathbf{i}-\mathbf{j}+\mathbf{k})$. Find the point $Q$ on $l$ such that $OQ$ is perpendicular to $l$, and calculate $OQ$.

Solution

Step 1 — write $Q$ in terms of the parameter. Every point on $l$ has the form

$$\overrightarrow{OQ}=(1+2s)\mathbf{i}+(2-s)\mathbf{j}+(3+s)\mathbf{k}$$

Step 2 — apply the perpendicularity condition. $OQ$ perpendicular to $l$ means $\overrightarrow{OQ}\cdot\mathbf{d}=0$ with $\mathbf{d}=(2,-1,1)$:

$$2(1+2s)-(2-s)+(3+s)=0$$$$2+4s-2+s+3+s=0\;\Longrightarrow\;3+6s=0\;\Longrightarrow\;s=-\frac{1}{2}$$

Step 3 — substitute back.

$$\overrightarrow{OQ}=(1-1)\mathbf{i}+\left(2+\tfrac{1}{2}\right)\mathbf{j}+\left(3-\tfrac{1}{2}\right)\mathbf{k}=\tfrac{5}{2}\mathbf{j}+\tfrac{5}{2}\mathbf{k}$$$$OQ=\sqrt{0+\tfrac{25}{4}+\tfrac{25}{4}}=\frac{5}{\sqrt{2}}=\frac{5\sqrt{2}}{2}$$

The whole question has only one equation in one unknown. Many candidates choose to minimize $|OQ|^{2}$ by differentiation — also correct, but twice as long and easier to slip a sign.

Common mistake

Using the same parameter letter for both lines. If you write both $l_{1}$ and $l_{2}$ with parameter $t$ and then equate the three components, you have inadvertently forced the two lines to be at the point at the same time — that is, imposed an extra condition the question never gave. The result: many pairs of intersecting lines are concluded to be skew, and the question loses all its marks even though every calculation is right. A hard rule: the first line uses $t$, the second uses $s$, and if the question has already given two letters never change them. This is a presentation error, but it wrecks exactly the most valuable vector question in Paper 3.

Key takeaway

The three questions of the lines topic — relationship, angle, distance — are all solved with exactly two tools: equating components, and scalar product equal to $0$. There is no further formula to memorize; what must be practiced is discipline in presentation, especially the step of checking the third equation.

← Vectors, magnitude and the scalar product · All A-Level Mathematics lessons · Practice A-Level Mathematics questions (free, instant scoring) · First-order differential equations →