Skip to content

Mathematics · Ch 10 — Three-Dimensional Geometry

Direction Cosines and Direction Ratios of a Line

10.2

Direction Cosines and Direction Ratios of a Line

Direction Angles and Direction Cosines

When a directed line passes through the origin and makes angles α\alpha, β\beta, and γ\gamma with the positive xx, yy, and zz-axes respectively, these angles are the direction angles of the line. Their cosines — cos⁡α\cos\alpha, cos⁡β\cos\beta, cos⁡γ\cos\gamma — are the direction cosines.

Reversing the direction of the line replaces each direction angle by its supplement (π−α\pi - \alpha, π−β\pi - \beta, π−γ\pi - \gamma). Since cos⁡(π−θ)=−cos⁡θ\cos(\pi - \theta) = -\cos\theta, all three direction cosines change sign.

Note

A line can be extended in two opposite directions, giving two sets of direction cosines that differ only in sign. To obtain a unique set, treat the line as a directed line.

For a directed line, the unique direction cosines are denoted ll, mm, nn, where:

l=cos⁡α,m=cos⁡β,n=cos⁡γl = \cos\alpha,\quad m = \cos\beta,\quad n = \cos\gamma

Important

If the line does not pass through the origin, draw a line through the origin parallel to it. Parallel lines have the same direction cosines.

Direction Ratios

Any three numbers proportional to the direction cosines of a line are its direction ratios. If ll, mm, nn are direction cosines and aa, bb, cc are direction ratios, there exists a non-zero real number λ\lambda such that:

a=λl,b=λm,c=λna = \lambda l,\quad b = \lambda m,\quad c = \lambda n

Tip

Direction ratios are not unique — any scalar multiple of a set of direction ratios is also a valid set.

Relation Between Direction Cosines and Direction Ratios

Since the two sets are proportional, write la=mb=nc=k\frac{l}{a} = \frac{m}{b} = \frac{n}{c} = k, so:

l=ak,m=bk,n=ck…(1)l = ak,\quad m = bk,\quad n = ck \quad \ldots (1)

Using the fundamental identity l2+m2+n2=1l^2 + m^2 + n^2 = 1 and substituting (1):

k2(a2+b2+c2)=1⟹k=±1a2+b2+c2k^2(a^2 + b^2 + c^2) = 1 \quad\Longrightarrow\quad k = \pm \frac{1}{\sqrt{a^2 + b^2 + c^2}}

Direction cosines from direction ratios

l=±aa2+b2+c2,m=±ba2+b2+c2,n=±ca2+b2+c2l = \pm \frac{a}{\sqrt{a^2 + b^2 + c^2}},\quad m = \pm \frac{b}{\sqrt{a^2 + b^2 + c^2}},\quad n = \pm \frac{c}{\sqrt{a^2 + b^2 + c^2}}

The sign is chosen depending on the desired orientation, and all three signs must be taken consistently.

Watch out

A common mistake is to take different signs for different direction cosines. Since kk is a single constant, the sign must be the same for ll, mm, and nn.

Properties of Direction Ratios

›Proof

Property 1: If aa, bb, cc are direction ratios of a line, then so are kaka, kbkb, kckc for any non-zero kk.

With a=λla = \lambda l, b=λmb = \lambda m, c=λnc = \lambda n, we get ka=kλlka = k\lambda l, kb=kλmkb = k\lambda m, kc=kλnkc = k\lambda n. Since kλ≠0k\lambda \neq 0, these are proportional to ll, mm, nn, hence direction ratios of the same line.

›Proof

Property 2: Any two sets of direction ratios of a line are proportional.

…

Figure 11.1A directed line OL from the origin into the first octant of the X, Y, Z axes, showing the direction angles alpha, beta and gamma it makes with the three axes and its projections x, y, z.
Fig. 11.1 — A directed line OL from the origin into the first octant of the X, Y, Z axes, showing the direction angles alpha, beta and gamma it makes with the three axes and its projections x, y, z.

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.

Figure 11.1 is the foundational picture for the entire chapter. It shows a single directed line segment OLOL starting at the origin OO and running into the first octant — the region where all three coordinates are positive. The line is drawn as an arrow, with the arrowhead at LL, to make it a directed line. The point PP lies somewhere on OLOL, and the length of OPOP is labelled rr.

The axes are drawn as an oblique 3‑D frame: ZZ is vertical, YY goes to the right, and XX comes out toward the lower left. From LL, dashed lines drop perpendicularly to each axis, meeting them at the coordinates xx, yy, zz. These three dashed edges, together with the axes, form a rectangular box (a cuboid) whose corner opposite OO is LL. The coordinates xx, yy, zz are simply the lengths of the sides of that box.

At the origin, three small arcs are drawn — one in each coordinate plane — marking the three direction angles α\alpha, β\beta, γ\gamma. These are the angles that the directed line OLOL makes with the positive XX, YY, and ZZ axes respectively. The figure makes it visually clear that α\alpha is the angle between OLOL and the XX-axis, β\beta between OLOL and the YY-axis, and γ\gamma between OLOL and the ZZ-axis.

Note

The dashed cuboid is not just decoration. It shows that the coordinates xx, yy, zz of LL are the projections of OLOL onto the three axes. Because the box is rectangular, each coordinate is the adjacent side in a right triangle whose hypotenuse is rr.

From this single picture, the textbook derives the central relation between the direction cosines and the coordinates. In the right triangle formed by OO, PP, and the foot of the perpendicular from PP to the XX-axis, the adjacent side is xx and the hypotenuse is rr. So

cos⁡α=xr,cos⁡β=yr,cos⁡γ=zr.\cos\alpha = \frac{x}{r}, \quad \cos\beta = \frac{y}{r}, \quad \cos\gamma = \frac{z}{r}.

These three cosines are called the direction cosines of the directed line OLOL, and they are denoted by ll, mm, nn:

l=cos⁡α,m=cos⁡β,n=cos⁡γ.l = \cos\alpha,\qquad m = \cos\beta,\qquad n = \cos\gamma.

Because xx, yy, zz are the sides of a rectangular box whose space diagonal is rr, Pythagoras in three dimensions gives x2+y2+z2=r2x^2 + y^2 + z^2 = r^2. Dividing through by r2r^2 yields the fundamental identity

l2+m2+n2=1.l^2 + m^2 + n^2 = 1.

l2+m2+n2=1l^2 + m^2 + n^2 = 1

This identity is the single most important check for any set of direction cosines. If you ever have three numbers that claim to be direction cosines, their squares must add up to exactly 1.

The figure also sets up the idea of direction ratios. Any three numbers aa, bb, cc that are proportional to ll, mm, nn are called direction ratios of the line. From the geometry, aa, bb, cc can be taken as xx, yy, zz themselves (or any scalar multiple of them), because

xr=l,yr=m,zr=n⟹x:y:z=l:m:n.\frac{x}{r} = l,\quad \frac{y}{r} = m,\quad \frac{z}{r} = n \quad\Longrightarrow\quad x : y : z = l : m : n.

So the coordinates of any point on the line (other than the origin) give a set of direction ratios. The constant of proportionality kk that connects direction ratios to direction cosines is

k=±1a2+b2+c2,k = \pm \frac{1}{\sqrt{a^2 + b^2 + c^2}},

and the direction cosines are recovered as …