girgit.org

Vector Algebra

Which way does it point? Direction cosines and direction ratios

The big ideaThe direction of a vector is fixed by the three angles it makes with the axes; their cosines l, m, n always satisfy \( l^2 + m^2 + n^2 = 1 \).

In simple words

Stand in the corner of a room. Three edges meet there: one along the floor to the left, one along the floor to the right, and one going up. Now point a stick into the room. To say exactly which way it points, say how far it leans away from each of the three edges. Those three leans pin down the way the stick points.

Direction angles

Let \( \vec{r} = \overrightarrow{OP} \) be the position vector of P(x, y, z), with length r. The angles it makes with the positive x, y and z axes are called its direction angles, written α, β and γ (alpha, beta, gamma). Each lies between 0 and π.

Drop a perpendicular from P onto the x-axis, meeting it at A. Triangle OAP has a right angle at A, the side OA is x and the long side OP is r. So \( \cos\alpha = \frac{x}{r} \). In the same way, using the y and z axes,

\[ \cos\alpha = \frac{x}{r}, \qquad \cos\beta = \frac{y}{r}, \qquad \cos\gamma = \frac{z}{r}. \]

Direction cosines

The three numbers cos α, cos β, cos γ are the direction cosines of the vector, usually called l, m and n:

\[ l = \cos\alpha, \quad m = \cos\beta, \quad n = \cos\gamma. \]

From the three formulas above, x = lr, y = mr, z = nr. So the point P can be written as (lr, mr, nr). Now use \( x^2 + y^2 + z^2 = r^2 \):

\[ l^2r^2 + m^2r^2 + n^2r^2 = r^2 \;\Rightarrow\; l^2 + m^2 + n^2 = 1. \]

This is the one rule every set of direction cosines must obey.

Try it: change the vector and watch the three angles and the bar of squares, which never stops at anything but 1.

Direction ratios

Any three numbers proportional to l, m, n are called direction ratios, usually a, b, c. The numbers lr, mr, nr (that is, x, y, z) are one such set. So the coordinates of P are direction ratios of \( \overrightarrow{OP} \). But so are 2x, 2y, 2z, or any other multiple.

Going between them

  • Direction cosines from direction ratios a, b, c (taken from the vector's own components): \( l = \frac{a}{r},\ m = \frac{b}{r},\ n = \frac{c}{r} \) with \( r = \sqrt{a^2 + b^2 + c^2} \).
  • \( l^2 + m^2 + n^2 = 1 \) always, but \( a^2 + b^2 + c^2 \) is usually not 1.

Worked examples

  1. From a point. P(2, 3, 6). Then \( r = \sqrt{4 + 9 + 36} = 7 \), so \( l = \frac{2}{7},\ m = \frac{3}{7},\ n = \frac{6}{7} \). Check: \( \frac{4 + 9 + 36}{49} = 1 \). Direction ratios: 2, 3, 6 (or 4, 6, 12, and so on).
  2. Missing angle. A vector makes 60° with the x-axis and 60° with the y-axis, and an acute angle γ with the z-axis. Then \( \cos^2\gamma = 1 - \frac{1}{4} - \frac{1}{4} = \frac{1}{2} \). Since γ is acute, \( \cos\gamma = \frac{1}{\sqrt{2}} \) and γ = 45°.
  3. Equally inclined. A vector makes equal angles with all three axes, so l = m = n. Then \( 3l^2 = 1 \) and \( l = \pm\frac{1}{\sqrt{3}} \). The direction cosines are \( \frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}} \) or all three negative.

Guess first: can a vector make 45° with every axis?

In a flat page, an arrow at 45° to the x-axis is also at 45° to the y-axis. So it feels natural that in space some arrow sits at 45° to all three axes. Guess: does one exist?

See what happens
No. If α = β = γ = 45°, then \( l^2 + m^2 + n^2 = \frac{1}{2} + \frac{1}{2} + \frac{1}{2} = \frac{3}{2} \), not 1. The equal-angle arrow from the last example makes \( \cos^{-1}\frac{1}{\sqrt{3}} \approx 54.7^\circ \) with each axis. In space, leaning towards one axis means leaning away from the others more than our flat-page intuition expects. Always test given angles with \( l^2 + m^2 + n^2 = 1 \) before using them.

Try it

Find the direction cosines of the vector from O to P(1, 2, −2).

Answer
\( r = \sqrt{1 + 4 + 4} = 3 \), so \( l = \frac{1}{3},\ m = \frac{2}{3},\ n = -\frac{2}{3} \). The negative n means the vector makes an obtuse angle with the positive z-axis.

Don't mix these up

  • Direction cosines are exact (one set for a given vector) and obey \( l^2 + m^2 + n^2 = 1 \). Direction ratios can be scaled freely.
  • Angles are measured from the positive direction of each axis, so a cosine can be negative.

Words to know

Direction angles
α, β, γ: the angles a vector makes with the positive x, y and z axes.
Direction cosines
l = cos α, m = cos β, n = cos γ; their squares add to 1.
Direction ratios
Any three numbers a, b, c in the same proportion as l, m, n.
Right-handed system
The usual x, y, z axes; turning x towards y points your right thumb along z.

Which of these can be the direction cosines of a vector?

  1. 1, 1, 1
  2. \( \frac{2}{3}, \frac{1}{3}, -\frac{2}{3} \)
  3. \( \frac{1}{2}, \frac{1}{2}, \frac{1}{2} \)

The direction ratios of a vector are 3, −4, 0. What are its direction cosines?

  1. \( \frac{3}{5}, -\frac{4}{5}, 0 \)
  2. 3, −4, 0
  3. \( \frac{3}{7}, -\frac{4}{7}, 0 \)