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:
- Parallel — one direction vector is a scalar multiple of the other;
- Intersecting — not parallel, and the three component equations have a consistent solution $(s,t)$;
- 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$.
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.