Chapter 11 · Three Dimensional Geometry

11.1 Direction Cosines and Direction Ratios of a Line

A line points two ways at once. Three numbers — its direction cosines, or any multiple of them, its direction ratios — fix which way a line runs in space, and you can read them straight off any two of its points.

A telecom mast is held upright by steel cables running from its top down to anchors in the ground. To order the right length of cable and to mount the clamps at the right angle, an engineer needs to know exactly which way each cable runs. In Section 10.1 you described the direction of a vector by its direction cosines — the cosines of the angles it makes with the three axes. A cable, a laser beam or the edge of a building is not a vector, though: it is a line, with no arrowhead and no fixed starting point. It runs in two opposite directions at once, and it need not pass through the origin.

This section adapts direction cosines to lines. You will see that a line has two sets of direction cosines, differing only in sign; that any three numbers proportional to them — direction ratios — describe the direction just as well and are usually much easier to work with; and that the direction ratios of the line through two points are simply the differences of their coordinates. Direction ratios then give a quick test for whether three points lie on one line. Everything in Sections 11.2 and 11.3 is built on these few ideas.

Direction Cosines of a Line

A line extends without end in two opposite directions. To measure angles with the axes we first choose one of them: a line with a chosen direction is called a directed line. The direction of a line does not depend on where the line is, so we may always slide it, without turning it, until it passes through the origin.

📘 Definition 11.1 — Direction cosines of a line
Let $L$ be a directed line, and let $L_0$ be the directed line through the origin $O$ that is parallel to $L$ and points the same way (if $L$ passes through $O$, then $L_0=L$). If $L_0$ makes angles $\alpha,\beta,\gamma$ with the positive directions of the $x$-, $y$- and $z$-axes, each angle taken in $[0,\pi]$, then $$l=\cos\alpha,\qquad m=\cos\beta,\qquad n=\cos\gamma$$ are the direction cosines of $L$. Parallel lines pointing the same way have the same direction cosines.

If we reverse the direction of $L$, each angle $\alpha$ is replaced by $\pi-\alpha$, and $\cos(\pi-\alpha)=-\cos\alpha$. So the reversed line has direction cosines $-l,-m,-n$. An ordinary (undirected) line therefore has two sets of direction cosines, $(l,m,n)$ and $(-l,-m,-n)$; we often write them together as $\pm(l,m,n)$. Unless a question fixes the direction (for example “from $P$ to $Q$” or “making an acute angle with the $z$-axis”), either set is a correct answer.

📐 Theorem 11.1 — The direction cosines of a line
If $l,m,n$ are the direction cosines of a line, then $$l^2+m^2+n^2=1.$$ Moreover, if $P$ is the point of the directed line $L_0$ through $O$ at distance $r\gt0$ from $O$ (on the side the line points to), then $P=(lr,\ mr,\ nr)$.

Proof. Let $P(x,y,z)$ be the point of $L_0$ described, so $OP=r$ and $\overrightarrow{OP}$ points along $L_0$. Let $A$ be the foot of the perpendicular from $P$ to the $x$-axis; then $A=(x,0,0)$ and triangle $OAP$ has a right angle at $A$, with angle $\alpha$ at $O$. Hence the signed length $OA$ along the positive $x$-axis is $r\cos\alpha$, that is $x=r\cos\alpha=lr$. (If $\alpha$ is obtuse, $x$ and $\cos\alpha$ are both negative; if $\alpha=\tfrac\pi2$, both are $0$.) In the same way $y=mr$ and $z=nr$. By the distance formula $x^2+y^2+z^2=r^2$, so $r^2(l^2+m^2+n^2)=r^2$; dividing by $r^2$ gives $l^2+m^2+n^2=1$. $\square$

So the three angles of a line with the axes are not independent: once two of them are known, the third is fixed up to the choice between $\gamma$ and $\pi-\gamma$.

✏️ Example 1 — Equal angles with the three axes
A line makes equal angles with the three coordinate axes. Find its direction cosines and the size of each angle.
Set up Equal angles $\alpha=\beta=\gamma$ give equal direction cosines: $l=m=n$.
Use Theorem 11.1 $l^2+l^2+l^2=1$, so $l^2=\tfrac13$ and $l=\pm\dfrac1{\sqrt3}$.
Answer The direction cosines are $\pm\left(\dfrac1{\sqrt3},\dfrac1{\sqrt3},\dfrac1{\sqrt3}\right)$. For the “$+$” direction each angle is $\cos^{-1}\dfrac1{\sqrt3}\approx54.74^\circ$; for the reversed direction each is $180^\circ-54.74^\circ=125.26^\circ$.
Check $3\times\left(\tfrac1{\sqrt3}\right)^2=1$ ✓. Notice that the three angles add up to about $164.2^\circ$, not $180^\circ$: there is no rule about the sum of the angles.
✏️ Example 2 — The missing angle
(a) A line makes an angle of $45^\circ$ with the $x$-axis, $60^\circ$ with the $y$-axis and an acute angle $\gamma$ with the $z$-axis. Find $\gamma$ and the direction cosines.  (b) Can a line make angles of $30^\circ$, $45^\circ$ and $60^\circ$ with the $x$-, $y$- and $z$-axes?
(a) Known cosines $l=\cos45^\circ=\dfrac1{\sqrt2}$ and $m=\cos60^\circ=\dfrac12$.
(a) The third $n^2=1-l^2-m^2=1-\tfrac12-\tfrac14=\tfrac14$, so $n=\pm\tfrac12$. The angle is acute, so $n=\cos\gamma\gt0$: $n=\tfrac12$ and $\gamma=60^\circ$.
(a) Answer Direction cosines $\left(\dfrac1{\sqrt2},\dfrac12,\dfrac12\right)$, $\gamma=60^\circ$.
(b) $\cos^230^\circ+\cos^245^\circ+\cos^260^\circ$ $=\tfrac34+\tfrac12+\tfrac14=\tfrac32\ne1$. By Theorem 11.1 no line has these three angles.
⚠️ A line is not a vector

Two answers, not one. A vector has one set of direction cosines; a line has two, $\pm(l,m,n)$. If the question fixes a direction (“from $A$ to $B$”, “making an obtuse angle with the $x$-axis”), choose the matching sign; otherwise give $\pm$.

Angles are measured from the positive axes, and each lies between $0^\circ$ and $180^\circ$. A line can make an angle of $120^\circ$ with the $x$-axis; it then makes $60^\circ$ with the negative $x$-axis.

Direction Ratios of a Line

Direction cosines are often awkward numbers such as $\tfrac1{\sqrt3}$. Since only the proportions $l:m:n$ matter for the direction, we usually work with any convenient multiple of them.

📘 Definition 11.2 — Direction ratios of a line
Three numbers $a,b,c$, not all zero, are direction ratios of a line with direction cosines $l,m,n$ if they are proportional to them: there is a number $k\ne0$ with $$a=kl,\qquad b=km,\qquad c=kn.$$ We then write $a:b:c=l:m:n$. A line has infinitely many sets of direction ratios: if $a,b,c$ is one set, so is $ta,tb,tc$ for every $t\ne0$.
📐 Theorem 11.2 — From direction ratios to direction cosines
If $a,b,c$ are direction ratios of a line, then its direction cosines are $$l=\pm\frac{a}{\sqrt{a^2+b^2+c^2}},$$ $$m=\pm\frac{b}{\sqrt{a^2+b^2+c^2}},$$ $$n=\pm\frac{c}{\sqrt{a^2+b^2+c^2}},$$ where the same sign is taken in all three.

Proof. By Definition 11.2, $a=kl$, $b=km$, $c=kn$ with $k\ne0$. Squaring and adding, and using Theorem 11.1, $$a^2+b^2+c^2=k^2(l^2+m^2+n^2)=k^2,$$ so $k=\pm\sqrt{a^2+b^2+c^2}$ (this is not zero, because $a,b,c$ are not all zero). Then $l=\dfrac ak$, $m=\dfrac bk$, $n=\dfrac ck$, with the same $k$ in all three. $\square$

✏️ Example 3 — Direction cosines from direction ratios
Find the direction cosines of the line whose direction ratios are (a) $2,-1,-2$  (b) $6,-3,-6$  (c) $1,-2,0$.
(a) $\sqrt{2^2+(-1)^2+(-2)^2}=\sqrt9=3$, so the direction cosines are $\pm\left(\tfrac23,-\tfrac13,-\tfrac23\right)$.
(b) $\sqrt{36+9+36}=9$, giving $\pm\left(\tfrac69,-\tfrac39,-\tfrac69\right)=\pm\left(\tfrac23,-\tfrac13,-\tfrac23\right)$ — the same line direction as (a), because $6,-3,-6$ is $3$ times $2,-1,-2$.
(c) $\sqrt{1+4+0}=\sqrt5$, so the direction cosines are $\pm\left(\tfrac1{\sqrt5},-\tfrac2{\sqrt5},0\right)$. Since $n=0$, $\gamma=90^\circ$: the line is perpendicular to the $z$-axis.
Check (a): $\tfrac49+\tfrac19+\tfrac49=1$ ✓; (c): $\tfrac15+\tfrac45+0=1$ ✓.

The Line through Two Points

In practice a line is usually given by two of its points — the top of the mast and the anchor of a cable, two positions of a drone, two vertices of a solid. Its direction ratios can then be written down at once.

📐 Theorem 11.3 — Direction ratios and cosines of the line through two points
Let $P(x_1,y_1,z_1)$ and $Q(x_2,y_2,z_2)$ be two different points. Then $$x_2-x_1,\quad y_2-y_1,\quad z_2-z_1$$ are direction ratios of the line $PQ$, and the direction cosines of the line directed from $P$ to $Q$ are $$\frac{x_2-x_1}{PQ},\quad \frac{y_2-y_1}{PQ},\quad \frac{z_2-z_1}{PQ},$$ where $PQ=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}$.

Proof. Slide the directed line $PQ$, without turning it, so that $P$ moves to the origin: every point moves by $(-x_1,-y_1,-z_1)$, so $Q$ moves to $Q'(x_2-x_1,\ y_2-y_1,\ z_2-z_1)$. The line $OQ'$ is parallel to $PQ$ and points the same way, and $OQ'=PQ$. By Theorem 11.1, the coordinates of $Q'$ are $(l\cdot PQ,\ m\cdot PQ,\ n\cdot PQ)$, where $l,m,n$ are the direction cosines of $PQ$. Dividing by $PQ$ gives the stated cosines, and the coordinates of $Q'$, being $PQ$ times them, are direction ratios. $\square$

In the language of Chapter 10 (Theorem 10.7 in Section 10.2): $x_2-x_1,\ y_2-y_1,\ z_2-z_1$ are the components of the vector $\overrightarrow{PQ}$. Reversing the order of the points changes every sign, which is just the other direction of the same line.

✏️ Example 4 — The line through two points
Find direction ratios of the line through $P(3,-1,2)$ and $Q(5,-7,5)$, and its direction cosines (a) directed from $P$ to $Q$, (b) directed from $Q$ to $P$.
Ratios $x_2-x_1=5-3=2$, $\ y_2-y_1=-7-(-1)=-6$, $\ z_2-z_1=5-2=3$: direction ratios $2,-6,3$.
Length $PQ=\sqrt{4+36+9}=\sqrt{49}=7$.
(a) From $P$ to $Q$: $\left(\tfrac27,-\tfrac67,\tfrac37\right)$.
(b) From $Q$ to $P$ every sign changes: $\left(-\tfrac27,\tfrac67,-\tfrac37\right)$.
Check $\tfrac{4+36+9}{49}=1$ ✓.
Interactive 1 — Direction Explorer for a Line

The line passes through the fixed point $P(-1,-2,1)$ and the point $Q$, which you move with the sliders. The dashed box from $P$ to $Q$ has edges $x_2-x_1$, $y_2-y_1$, $z_2-z_1$ — the direction ratios. The arcs at $P$ show the angles $\alpha,\beta,\gamma$ of the chosen direction with lines parallel to the axes. Press Reverse to point the line the other way and watch every direction cosine change sign. Drag the picture (or press Play) to turn it.

direction—
direction ratios—
$PQ$—
$l,\ m,\ n$—
$\alpha,\ \beta,\ \gamma$—
$l^2+m^2+n^2$—

Any two pairs of points taken on one line give proportional direction ratios. This turns “do three points lie on a line?” into simple arithmetic.

📐 Theorem 11.4 — Test for collinear points
Three different points $A$, $B$, $C$ are collinear if and only if the direction ratios of $AB$ and of $BC$ (computed by Theorem 11.3) are proportional.

Why it is true. If $A,B,C$ lie on one line, then $AB$ and $BC$ are that same line, so their direction ratios are proportional. Conversely, proportional direction ratios mean that the lines $AB$ and $BC$ have the same direction cosines up to sign, so they are parallel; and two parallel lines with a common point — here $B$ — are the same line. So $A$, $B$, $C$ all lie on it. $\square$

✏️ Example 5 — Collinear or not?
(a) Show that $A(1,-2,3)$, $B(3,1,-1)$ and $C(7,7,-9)$ are collinear, and find the ratio $AB:BC$.  (b) Find $k$ so that $A(2,-1,4)$, $B(4,3,0)$ and $C(5,k,-2)$ are collinear.
(a) Ratios $AB$: $3-1,\ 1-(-2),\ -1-3$, that is $2,3,-4$. $\ BC$: $7-3,\ 7-1,\ -9-(-1)$, that is $4,6,-8$.
(a) Compare $\tfrac42=\tfrac63=\tfrac{-8}{-4}=2$: proportional, so by Theorem 11.4 the points are collinear.
(a) Ratio The factor $2$ says $BC$ is twice as long as $AB$: $AB=\sqrt{4+9+16}=\sqrt{29}$, $BC=\sqrt{16+36+64}=2\sqrt{29}$, so $AB:BC=1:2$. Check: $AC=\sqrt{36+81+144}=3\sqrt{29}=AB+BC$ ✓.
(b) $AB$: $2,4,-4$; $\ BC$: $1,\ k-3,\ -2$. For proportionality, $\dfrac12=\dfrac{k-3}4=\dfrac{-2}{-4}$. The outer ratios are both $\tfrac12$ ✓, and $\dfrac{k-3}4=\dfrac12$ gives $k=5$.
Check With $k=5$, $BC$ has ratios $1,2,-2=\tfrac12(2,4,-4)$ ✓.
Interactive 2 — Collinearity Tester

$A(1,-2,3)$ and $B(3,1,-1)$ are fixed (Example 5), and the red line is the line $AB$. Move $C$ with the sliders, or press Play to try a sequence of points. The lab computes the direction ratios of $AB$ and $BC$ and compares them component by component. Only when all three ratios agree does $C$ sit on the line. Drag the picture to turn it — a point can look as if it is on the line from one angle and be far off it from another.

ratios of $AB$—
ratios of $BC$—
component ratios—
collinear?—
✏️ Example 6 — The cable of a mast
A vertical mast stands with its foot at the origin; the $z$-axis points up and distances are in metres. A cable runs from the top of the mast $T(0,0,12)$ to an anchor $A(3,4,0)$ on the ground. Find (a) the length of the cable, (b) its direction cosines from $T$ to $A$, and (c) the angle between the cable and the mast.
(a) Direction ratios of $TA$: $3-0,\ 4-0,\ 0-12$, that is $3,4,-12$. Length $TA=\sqrt{9+16+144}=\sqrt{169}=13$ m.
(b) From $T$ to $A$: $\left(\tfrac3{13},\tfrac4{13},-\tfrac{12}{13}\right)$. The negative $n$ says the cable runs downwards from $T$.
(c) The mast runs along the $z$-axis. Directed upwards, from $A$ to $T$, the cable has $n=\tfrac{12}{13}$, so it makes the acute angle $\gamma=\cos^{-1}\tfrac{12}{13}\approx22.62^\circ$ with the mast.
Check The anchor is $\sqrt{3^2+4^2}=5$ m from the foot of the mast, and $5^2+12^2=13^2$ ✓; $\tan\gamma=\tfrac5{12}$ gives the same angle.
⚠️ Common mistakes when studying alone

1. Mixed signs. In Theorem 11.2 the sign in front of the square root must be the same in all three cosines: $\left(\tfrac23,-\tfrac13,-\tfrac23\right)$ and $\left(-\tfrac23,\tfrac13,\tfrac23\right)$ are correct, but $\left(\tfrac23,\tfrac13,-\tfrac23\right)$ describes a different line.

2. Calling direction ratios “direction cosines”. $2,-6,3$ are direction ratios of the line in Example 4; they are not cosines (cosines lie in $[-1,1]$ and their squares add to $1$). Divide by $\sqrt{a^2+b^2+c^2}$ first.

3. Using the coordinates of one point. The direction ratios of the line $PQ$ are the differences of the coordinates of $P$ and $Q$, not the coordinates of $P$ or $Q$ — unless one of the points is the origin.

4. Checking only two components. For collinearity all three ratios must agree. $AB$: $2,3,-4$ and $BC$: $4,6,-7$ agree in two places and still fail.

5. Dividing by a zero direction ratio. If a component of $AB$ is $0$, the matching component of $BC$ must also be $0$; compare the other two components as usual.

Exercises

I
Direction cosines and angles with the axes.
  • 1 A line makes angles $90^\circ$, $135^\circ$ and $45^\circ$ with the $x$-, $y$- and $z$-axes. Find its direction cosines.
  • 2 A directed line makes equal obtuse angles with the three axes. Find its direction cosines and the angles.
  • 3 A line makes $60^\circ$ with the $x$-axis and $45^\circ$ with the $y$-axis. Find the possible angles it makes with the $z$-axis.
  • 4 Can $\tfrac12,\tfrac13,\tfrac14$ be the direction cosines of a line? If not, find the direction cosines of a line with direction ratios $\tfrac12,\tfrac13,\tfrac14$.
  • 5 Write down the direction cosines of the $x$-axis, the $y$-axis and the $z$-axis.
  • 6 A line makes angles $\alpha,\beta,\gamma$ with the axes. Show that $\sin^2\alpha+\sin^2\beta+\sin^2\gamma=2$ and $\cos2\alpha+\cos2\beta+\cos2\gamma=-1$.
1 $\left(\cos90^\circ,\cos135^\circ,\cos45^\circ\right)=\left(0,-\tfrac1{\sqrt2},\tfrac1{\sqrt2}\right)$ (or all signs reversed for the opposite direction). Check: $0+\tfrac12+\tfrac12=1$ ✓.
2 As in Example 1, $l=m=n=\pm\tfrac1{\sqrt3}$; obtuse angles need negative cosines: $\left(-\tfrac1{\sqrt3},-\tfrac1{\sqrt3},-\tfrac1{\sqrt3}\right)$, each angle $\cos^{-1}\!\left(-\tfrac1{\sqrt3}\right)\approx125.26^\circ$.
3 $n^2=1-\tfrac14-\tfrac12=\tfrac14$, so $n=\pm\tfrac12$: $\gamma=60^\circ$ or $\gamma=120^\circ$ (the two directions of the line).
4 $\tfrac14+\tfrac19+\tfrac1{16}=\tfrac{36+16+9}{144}=\tfrac{61}{144}\ne1$: no. Multiplying by $12$, the direction ratios are $6,4,3$, and $\sqrt{36+16+9}=\sqrt{61}$, so the direction cosines are $\pm\left(\tfrac6{\sqrt{61}},\tfrac4{\sqrt{61}},\tfrac3{\sqrt{61}}\right)$.
5 $x$-axis: $(1,0,0)$; $y$-axis: $(0,1,0)$; $z$-axis: $(0,0,1)$ — each also with all signs reversed. (The $x$-axis makes $0^\circ$ with itself and $90^\circ$ with the other two axes.)
6 $\sum\sin^2\alpha=\sum(1-\cos^2\alpha)$ $=3-(l^2+m^2+n^2)=3-1=2$. And $\cos2\alpha=2\cos^2\alpha-1$, so $\sum\cos2\alpha=2(l^2+m^2+n^2)-3$ $=2-3=-1$.
II
From direction ratios to direction cosines.
  • 1 Find the direction cosines of a line with direction ratios $1,2,-2$.
  • 2 … with direction ratios $-3,4,0$.
  • 3 … with direction ratios $2,-3,6$.
  • 4 … with direction ratios $4,-1,1$ (rationalise the denominators).
  • 5 Show that $6,-3,2$ and $-12,6,-4$ are direction ratios of the same line, and find its direction cosines.
  • 6 A line has direction ratios $2,k,1$, and its first direction cosine is $l=\tfrac23$. Find $k$.
  • 7 A line has direction cosines $\tfrac1{\sqrt6},-\tfrac2{\sqrt6},\tfrac1{\sqrt6}$. Give a set of direction ratios that are whole numbers.
Check: direction cosines from direction ratios, in exact surds
—

Whole numbers from −99 to 99, not all zero. The lab gives the “+” set; the other set has every sign reversed.

1 $\sqrt{1+4+4}=3$: $\pm\left(\tfrac13,\tfrac23,-\tfrac23\right)$.
2 $\sqrt{9+16+0}=5$: $\pm\left(-\tfrac35,\tfrac45,0\right)$; the line is perpendicular to the $z$-axis.
3 $\sqrt{4+9+36}=7$: $\pm\left(\tfrac27,-\tfrac37,\tfrac67\right)$.
4 $\sqrt{16+1+1}=\sqrt{18}=3\sqrt2$: $\pm\left(\tfrac4{3\sqrt2},-\tfrac1{3\sqrt2},\tfrac1{3\sqrt2}\right)=\pm\left(\tfrac{2\sqrt2}3,-\tfrac{\sqrt2}6,\tfrac{\sqrt2}6\right)$.
5 $-12,6,-4$ is $-2$ times $6,-3,2$, so both are direction ratios of the same line. $\sqrt{36+9+4}=7$: $\pm\left(\tfrac67,-\tfrac37,\tfrac27\right)$.
6 $\dfrac2{\sqrt{4+k^2+1}}=\dfrac23$ gives $\sqrt{5+k^2}=3$, $k^2=4$, $k=\pm2$. (Check with $k=2$: $\sqrt9=3$ ✓.)
7 Multiply by $\sqrt6$: $1,-2,1$ (any non-zero multiple, such as $-2,4,-2$, is also correct).
III
Lines through two points; collinear points.
  • 1 Find the direction cosines of the line from $(1,2,3)$ to $(4,6,15)$.
  • 2 Find the direction cosines of the line from $(-2,3,1)$ to $(4,0,-1)$.
  • 3 Find the direction cosines of the line from the origin to $(-1,1,-1)$.
  • 4 Find the direction cosines of the sides $AB$, $BC$ and $CA$ of the triangle with vertices $A(1,0,2)$, $B(3,-1,4)$, $C(-1,3,2)$, each directed as named.
  • 5 Show that $(-1,4,2)$, $(1,1,3)$ and $(5,-5,5)$ are collinear.
  • 6 Show that $P(1,2,3)$, $Q(2,3,5)$ and $R(4,4,6)$ are not collinear.
  • 7 Find $a$ and $b$ so that $A(1,-1,2)$, $B(3,2,0)$ and $C(a,8,b)$ are collinear.
  • 8 The point $R$ lies on the line through $P(2,1,-3)$ and $Q(5,-5,3)$ and has $x$-coordinate $4$. Find $R$.
1 Ratios $3,4,12$; length $\sqrt{9+16+144}=13$: $\left(\tfrac3{13},\tfrac4{13},\tfrac{12}{13}\right)$.
2 Ratios $6,-3,-2$; length $\sqrt{36+9+4}=7$: $\left(\tfrac67,-\tfrac37,-\tfrac27\right)$.
3 Ratios $-1,1,-1$; length $\sqrt3$: $\left(-\tfrac1{\sqrt3},\tfrac1{\sqrt3},-\tfrac1{\sqrt3}\right)$.
4 $AB$: $2,-1,2$, length $3$: $\left(\tfrac23,-\tfrac13,\tfrac23\right)$. $\ BC$: $-4,4,-2$, length $6$: $\left(-\tfrac23,\tfrac23,-\tfrac13\right)$. $\ CA$: $2,-3,0$, length $\sqrt{13}$: $\left(\tfrac2{\sqrt{13}},-\tfrac3{\sqrt{13}},0\right)$.
5 First to second: $2,-3,1$; second to third: $4,-6,2=2(2,-3,1)$. Proportional, so collinear (Theorem 11.4).
6 $PQ$: $1,1,2$; $QR$: $2,1,1$. Already $\tfrac21\ne\tfrac11$, so the ratios are not proportional and the points are not collinear.
7 $AB$: $2,3,-2$; $BC$: $a-3,\ 6,\ b$. The middle components give the factor $\tfrac63=2$, so $a-3=4$ and $b=-4$: $a=7$, $b=-4$. Check: $BC=4,6,-4=2(2,3,-2)$ ✓.
8 $PQ$: $3,-6,6$. Collinearity means $PR$ is a multiple $t$ of these: $R=(2+3t,\ 1-6t,\ -3+6t)$. From $2+3t=4$, $t=\tfrac23$, so $R=(4,-3,1)$.
IV
Reasoning and applications.
  • 1 Drone. A drone climbs in a straight line from its launch pad $O(0,0,0)$ to the point $D(40,30,120)$ (in metres; $z$ is height). Find the length of its path, its direction cosines and the angle its path makes with the vertical.
  • 2 A cube of side $s$ has one corner at $O$ and three edges along the positive axes. Find the direction cosines of the body diagonal from $O$ to $(s,s,s)$ and of the face diagonal from $O$ to $(s,s,0)$, and the angles each makes with the three edges through $O$.
  • 3 Show that the point at distance $r$ from $P(x_1,y_1,z_1)$ along a directed line with direction cosines $l,m,n$ is $(x_1+lr,\ y_1+mr,\ z_1+nr)$. Use this to find the point $14$ units from $(1,2,3)$ in the direction with cosines $\tfrac27,\tfrac37,\tfrac67$.
  • 4 Sun ray. A vertical pole $3$ m tall stands at the origin on level ground ($x$ east, $y$ north, $z$ up). The tip of its shadow is at $S(2,6,0)$. Find the direction cosines of the sun ray from the top of the pole to $S$, and the angle between the ray and the pole.
  • 5 Explain why no line makes an angle of $45^\circ$ with each of the three axes.
  • 6 Find the direction cosines of the line joining the origin to the centroid of the triangle with vertices $(1,2,3)$, $(2,-1,4)$ and $(3,5,-1)$.
1 $OD=\sqrt{1600+900+14400}$ $=\sqrt{16900}=130$ m. Direction cosines $\left(\tfrac{40}{130},\tfrac{30}{130},\tfrac{120}{130}\right)=\left(\tfrac4{13},\tfrac3{13},\tfrac{12}{13}\right)$. Angle with the vertical: $\gamma=\cos^{-1}\tfrac{12}{13}\approx22.62^\circ$.
2 Body diagonal: ratios $s,s,s$, length $s\sqrt3$: $\left(\tfrac1{\sqrt3},\tfrac1{\sqrt3},\tfrac1{\sqrt3}\right)$, about $54.74^\circ$ with each edge. Face diagonal: ratios $s,s,0$, length $s\sqrt2$: $\left(\tfrac1{\sqrt2},\tfrac1{\sqrt2},0\right)$, so $45^\circ$, $45^\circ$ and $90^\circ$.
3 Slide the line so that $P$ goes to $O$. The point at distance $r$ along the directed line through $O$ is $(lr,mr,nr)$ by Theorem 11.1; sliding back adds $(x_1,y_1,z_1)$. With $r=14$: $(1+4,\ 2+6,\ 3+12)=(5,8,15)$.
4 Top $T(0,0,3)$; $TS$ has ratios $2,6,-3$ and length $\sqrt{4+36+9}=7$ m. Direction cosines $\left(\tfrac27,\tfrac67,-\tfrac37\right)$. Directed upwards the ray has $n=\tfrac37$, so the angle with the pole is $\cos^{-1}\tfrac37\approx64.62^\circ$.
5 $3\cos^245^\circ=3\cdot\tfrac12=\tfrac32\ne1$, which contradicts Theorem 11.1.
6 Centroid $\left(\tfrac{1+2+3}3,\tfrac{2-1+5}3,\tfrac{3+4-1}3\right)=(2,2,2)$. Ratios $2,2,2$, so the direction cosines are $\pm\left(\tfrac1{\sqrt3},\tfrac1{\sqrt3},\tfrac1{\sqrt3}\right)$.
🎯 Exam corner Board · 1 markBoard · 2 marksBoard · 3 marksJEE MainJEE Advanced

How this is examined: Board papers ask for the direction cosines of a line from its angles, its direction ratios or two of its points (1–2 marks), and use direction ratios to prove three points collinear (2–3 marks); the identity $l^2+m^2+n^2=1$ appears in MCQs and Assertion–Reason items. JEE builds trigonometric and parameter problems on the same identity.

E1. Board · 1 mark A line makes angles of $120^\circ$ with the $x$-axis, $45^\circ$ with the $y$-axis and an acute angle $\theta$ with the $z$-axis. Then $\theta$ is  (A) $15^\circ$  (B) $30^\circ$  (C) $45^\circ$  (D) $60^\circ$

Idea $\cos^2\theta=1-\cos^2120^\circ-\cos^245^\circ$ $=1-\tfrac14-\tfrac12=\tfrac14$, and $\theta$ is acute, so $\cos\theta=\tfrac12$.
Answer (D) $60^\circ$. Trap (A): $15^\circ$ comes from the false rule “the three angles add up to $180^\circ$”.

E2. Board · 1 mark Assertion–Reason. Assertion (A): the direction ratios $3,-6,2$ and $-3,6,-2$ describe the same line. Reason (R): a line has exactly one set of direction cosines.  (A) Both A and R are true and R is the correct explanation of A  (B) Both A and R are true but R is not the correct explanation of A  (C) A is true but R is false  (D) A is false but R is true

Idea The second set is $-1$ times the first, so both are direction ratios of one line: A is true. A line has two sets of direction cosines, here $\pm\left(\tfrac37,-\tfrac67,\tfrac27\right)$, so R is false.
Answer (C).

E3. Board · 2 marks Find the direction cosines of the line directed from $A(4,-1,2)$ to $B(-2,1,-1)$. Does this directed line make an acute or an obtuse angle with the $x$-axis?

Ratios $-2-4,\ 1-(-1),\ -1-2$: that is $-6,2,-3$; $AB=\sqrt{36+4+9}=7$. (1 mark)
Cosines $\left(-\tfrac67,\tfrac27,-\tfrac37\right)$. (½ mark)
Answer $l=-\tfrac67\lt0$, so the angle with the $x$-axis is obtuse: $\cos^{-1}\!\left(-\tfrac67\right)\approx149.00^\circ$. (½ mark)

E4. Board · 3 marks Using direction ratios, show that $A(3,-2,1)$, $B(1,2,-3)$ and $C(-1,6,-7)$ are collinear. Show also that $B$ is the mid-point of $AC$, and find the direction cosines of the line.

Ratios $AB$: $1-3,\ 2+2,\ -3-1$, that is $-2,4,-4$. $\ BC$: $-1-1,\ 6-2,\ -7+3$, that is $-2,4,-4$. (1 mark)
Collinear The ratios are proportional (in fact equal), and $B$ is common, so $A,B,C$ are collinear by Theorem 11.4. (1 mark)
Mid-point Equal ratios mean $AB=BC$ and $B$ lies between $A$ and $C$; indeed $\left(\tfrac{3-1}2,\tfrac{-2+6}2,\tfrac{1-7}2\right)=(1,2,-3)=B$ ✓. (½ mark)
Cosines $\sqrt{4+16+16}=6$: $\pm\left(-\tfrac13,\tfrac23,-\tfrac23\right)$. (½ mark)

E5. JEE Main (Numerical value.) The points $A(1,2,3)$, $B(3,5,9)$ and $C(7,a,b)$ are collinear, and the line through them makes an acute angle $\gamma$ with the $z$-axis. Find $a+b+7\cos\gamma$.

Method $AB$: $2,3,6$ with length $7$. $\ BC$: $4,\ a-5,\ b-9$ must be $2\times(2,3,6)$ (the $x$-components fix the factor $2$): $a=11$, $b=21$. With the acute direction, $\cos\gamma=\tfrac67$.
Answer $11+21+6=\mathbf{38}$.
⏱ Fast route Since $7-1=3\times2$, $C=A+3(2,3,6)=(7,11,21)$ at once.

E6. JEE Advanced (One or more correct options.) A line makes angles $\alpha$, $\alpha$ and $2\alpha$ with the positive $x$-, $y$- and $z$-axes. Its direction cosines can be  (A) $\left(\tfrac1{\sqrt2},\tfrac1{\sqrt2},0\right)$  (B) $(0,0,-1)$  (C) $\left(\tfrac1{\sqrt3},\tfrac1{\sqrt3},\tfrac1{\sqrt3}\right)$  (D) $\left(\tfrac12,\tfrac12,\tfrac1{\sqrt2}\right)$

Method Put $c=\cos\alpha$. Then $\cos2\alpha=2c^2-1$ and Theorem 11.1 gives $2c^2+(2c^2-1)^2=1$, i.e. $4c^4-2c^2=0$, so $c^2=0$ or $c^2=\tfrac12$. Since $2\alpha\le180^\circ$, $\alpha\le90^\circ$ and $c\ge0$.
Cases $c=0$: $\alpha=90^\circ$, $2\alpha=180^\circ$, cosines $(0,0,-1)$. $\ c=\tfrac1{\sqrt2}$: $\alpha=45^\circ$, $2\alpha=90^\circ$, cosines $\left(\tfrac1{\sqrt2},\tfrac1{\sqrt2},0\right)$.
Answer (A) and (B). (D) is a valid set of direction cosines ($\tfrac14+\tfrac14+\tfrac12=1$) but belongs to $\alpha=60^\circ$, $\gamma=45^\circ\ne120^\circ$; (C) has $\gamma=\alpha$, not $2\alpha$.
🔬 Research–Teaching NexusMini project · about 60 minutes over one day

Research question. Can a stick, a ruler and direction cosines tell you which way the Sun's rays travel — and how high the Sun is — at different times of the day?

Why it matters. Solar-panel installers, architects planning shade and farmers planning greenhouses all need the direction of sunlight. A sun ray is a line in space; its direction cosines can be found from just two points on it — the top of a vertical stick and the tip of its shadow — exactly as in Exercise IV.4.

What to do.

  1. On level ground, fix a straight stick vertically (check with a plumb line). Measure its height $h$. Mark the base as the origin; use a phone compass to lay out an $x$-axis to the east and a $y$-axis to the north.
  2. Every hour from about 9 a.m. to 3 p.m., mark the tip of the shadow and measure its coordinates $(x,y)$.
  3. For each time, the ray from the top $(0,0,h)$ to the tip $(x,y,0)$ has direction ratios $x,y,-h$. Compute its direction cosines and the Sun's altitude, $90^\circ$ minus the angle between the ray and the stick.
  4. Plot the altitude against time. When is it greatest, and in which direction does the shadow point then?

Tools: Stick, metre rule, phone compass, spreadsheet (SQRT, ACOS, DEGREES); optionally an online solar-position calculator for your town to compare with.

Hand in: Your table of $(x,y)$, direction cosines and altitudes, the graph, a comparison with the calculator, and a short paragraph on the main sources of error.

Going further. Find out what “solar noon” means, and why it is usually not exactly 12:00 by the clock in India.

Instructor note: with $L=\sqrt{x^2+y^2+h^2}$ the ray has direction cosines $\left(\tfrac xL,\tfrac yL,-\tfrac hL\right)$, the angle with the stick is $\cos^{-1}\tfrac hL$, and the altitude is $90^\circ$ minus that. As a reference: at latitude $28.6^\circ$ N near an equinox the noon altitude is about $90^\circ-28.6^\circ=61.4^\circ$, so a $1$ m stick casts a noon shadow of about $\tan28.6^\circ\approx0.55$ m pointing north.

🧪 Self-check quiz

0/5 correct

Q1. The direction cosines of the $y$-axis (directed along its positive direction) are

Q2. Which of these can be the direction cosines of a line?

Q3. A line has direction ratios $3,-4,0$. Its direction cosines are

Q4. Direction ratios of the line through $(2,-1,3)$ and $(5,1,-1)$ are

Q5. A directed line has direction cosines $l,m,n$. If its direction is reversed, its direction cosines become