Curvingo · Made in India

Glossary

Select one of the keywords on the left…

Three Dimensional GeometryDirection Cosines and Direction Ratios of a Line

Reading time: ~30 min

In the Vector Algebra chapter, a vector that makes angles \alpha, \beta and \gamma with the positive x-, y- and z-axes had direction cosines \cos\alpha, \cos\beta and \cos\gamma. A line borrows exactly the same idea. Take a line through the origin O and give it a direction, from O towards a point P on it. The angles that this directed line OP makes with the positive directions of the three axes are its direction angles, and their cosines are its direction cosines.

The dial below is a sphere of radius 1 centred at O. Drag P anywhere on the sphere (drag outside the sphere to turn the picture). The readout gives the three angles, their cosines l, m, n, and a bar built from l^2, m^2 and n^2. Complete all three missions, and keep an eye on the bar.

Wherever you dragged P, the bar was exactly full: never a gap, never an overflow. That is the one rule every set of direction cosines obeys. Let us see why.

l, m and n

We name the direction cosines of a directed line l = \cos\alpha, m = \cos\beta and n = \cos\gamma, where \alpha, \beta, \gamma are its angles with the positive x-, y- and z-axes (Fig. 11.1 in your book).

Why must l^2 + m^2 + n^2 be 1? On the dial, OP = 1. Drop a perpendicular from P to the x-axis. It makes a right triangle with hypotenuse OP and the angle \alpha at O, so the x-coordinate of P is OP\cos\alpha = . In the same way the y- and z-coordinates of P are m and n.

So P is the point (l, m, n), and its distance from O is 1. By the distance formula, l^2 + m^2 + n^2 = .

For every line, l^2 + m^2 + n^2 = 1.

Two things to remember

A line has two sets of direction cosines. A line has no built-in direction. Reverse it, and the angles become \pi - \alpha, \pi - \beta, \pi - \gamma, so every cosine changes sign. The reversed line has direction cosines -l, -m, -n. To get one definite set, you must first choose a direction along the line.

A line that misses the origin has the same direction cosines as the parallel line through O.

Direction Ratios

Direction cosines are often awkward numbers like \frac{1}{\sqrt{3}}. Any three numbers proportional to them describe the same direction just as well. If a = \lambda l, b = \lambda m and c = \lambda n for some non-zero number \lambda, then a, b, c are called direction ratios of the line. The starting position of the dial, P with direction cosines \frac{2}{3}, -\frac{1}{3}, \frac{2}{3}, has direction ratios 2, −1, 2, and also 4, −2, 4, and −6, 3, −6, and so on.

So a line has infinitely many sets of direction ratios, but only two sets of direction cosines. To get from direction ratios back to direction cosines, call the common ratio k:

\dfrac{l}{a} = \dfrac{m}{b} = \dfrac{n}{c} = k, \quad\text{so}\quad l = ak,\; m = bk,\; n = ck.

Putting these into l^2 + m^2 + n^2 = 1 gives k^2(a^2 + b^2 + c^2) = 1, so k = .

If a, b, c are direction ratios of a line, its direction cosines are

l = \pm\dfrac{a}{\sqrt{a^2 + b^2 + c^2}}, \quad m = \pm\dfrac{b}{\sqrt{a^2 + b^2 + c^2}}, \quad n = \pm\dfrac{c}{\sqrt{a^2 + b^2 + c^2}},

with the same sign taken in all three, according to the direction chosen on the line.

Tip

Direction ratios can be any proportional set, so they are never "wrong" just because they are big. Direction cosines are fixed (up to the ± sign), and they must pass the test l^2 + m^2 + n^2 = 1.

Example 1 : If a line makes angles 90°, 60° and 30° with the positive directions of the x-, y- and z-axes respectively, find its direction cosines.

Solution : The direction cosines are the cosines of the three angles:

l = \cos 90^\circ = ,   m = \cos 60^\circ = ,   n = \cos 30^\circ = .

So the direction cosines are 0, \frac{1}{2}, \frac{\sqrt{3}}{2}. Check: 0 + \frac{1}{4} + \frac{3}{4} = 1 ✓.

Example 2 : If a line has the direction ratios 2, −1, −2, determine its direction cosines.

Solution : First the length: \sqrt{a^2 + b^2 + c^2} = \sqrt{4 + 1 + 4} = .

So the direction cosines are , or, for the opposite direction along the line, -\frac{2}{3}, \frac{1}{3}, \frac{2}{3}.

Direction cosines of a line passing through two points

Two points fix a line, so we should be able to read its direction cosines straight off the two points. Let the line pass through P(x_1, y_1, z_1) and Q(x_2, y_2, z_2), and let l, m, n be the direction cosines of PQ, which makes angles \alpha, \beta, \gamma with the axes.

Drop perpendiculars PR and QS to the XY-plane, and draw PN parallel to RS, meeting QS at N. Then NQ is parallel to the z-axis, so the angle at Q in the triangle PNQ is \gamma.

Fig. 11.2 — P and Q with the right triangle PNQ. Drag the figure sideways to turn it.

In the right triangle PNQ, the side NQ is the rise in height, z_2 - z_1, and the hypotenuse is PQ. So \cos\gamma is NQ divided by .

That gives \cos\gamma = \dfrac{z_2 - z_1}{PQ}, and the same argument with the other two axes gives \cos\alpha = \dfrac{x_2 - x_1}{PQ} and \cos\beta = \dfrac{y_2 - y_1}{PQ}.

The direction cosines of the line segment joining P(x_1, y_1, z_1) and Q(x_2, y_2, z_2) are

\dfrac{x_2 - x_1}{PQ}, \quad \dfrac{y_2 - y_1}{PQ}, \quad \dfrac{z_2 - z_1}{PQ}, \qquad PQ = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2},

and x_2 - x_1, \; y_2 - y_1, \; z_2 - z_1 are direction ratios of the line PQ.

Example 3 : Find the direction cosines of the line passing through the two points (−2, 4, −5) and (1, 2, 3).

Solution : Take P(−2, 4, −5) and Q(1, 2, 3). The changes in the coordinates from P to Q are

x_2 - x_1 = 1 - (-2) = ,   y_2 - y_1 = 2 - 4 = ,   z_2 - z_1 = 3 - (-5) = .

So PQ = \sqrt{9 + 4 + 64} = , and the direction cosines of the line are

\dfrac{3}{\sqrt{77}}, \; \dfrac{-2}{\sqrt{77}}, \; \dfrac{8}{\sqrt{77}}.

Example 4 : Find the direction cosines of x, y and z-axis.

Solution : The x-axis makes angles 0°, 90° and 90° with the x-, y- and z-axes. So its direction cosines are \cos 0^\circ, \cos 90^\circ, \cos 90^\circ, that is, .

In the same way, the y-axis has direction cosines , and the z-axis has direction cosines 0, 0, 1. You met the y-axis on the dial: \beta = 0^\circ made m = 1.

Example 5 : Show that the points A(2, 3, −4), B(1, −2, 3) and C(3, 8, −11) are collinear.

Solution : Going from A to B, the coordinates change by . Going from B to C, they change by .

Compare the two sets: 2 = -2 \times (-1), 10 = -2 \times (-5) and -14 = -2 \times 7. So the direction ratios of AB and BC are , which means AB and BC are parallel.

But AB and BC also share the point B, and two parallel lines through one point are the same line. Hence A, B and C lie on one line: they are collinear.

Speed Round: Direction Cosines, or Not?

Two kinds of slide are mixed below. Some give you direction ratios and ask for the direction cosines; the others ask whether a triple can be direction cosines at all. The test is always l^2 + m^2 + n^2 = 1.

Get five right to move on.

Sina