• Foundation
  • About 15 min
  • 5 practice questions

Direction cosines and direction ratios of a line

Define the direction cosines of a directed line, use l² + m² + n² = 1, and convert between direction ratios and direction cosines.

If something looks wrong, please tell us.

In two dimensions the direction of a line is given by one number, its slope. In space a line can point in infinitely many more ways, and one number is not enough. This chapter uses the vectors of the previous chapter to describe lines in space: their directions, their equations, the angle between two of them and the shortest distance between them. Everything starts with direction cosines and direction ratios.

Direction cosines

Let L be a directed line through the origin making angles α, β and γ with the positive x-, y- and z-axes. These are its direction angles, and l = cos α, m = cos β, n = cos γ are its direction cosines (d.c.'s). If the direction of L is reversed, each angle is replaced by its supplement (π − α and so on), so all three direction cosines change sign. An undirected line therefore has two sets of direction cosines, negatives of each other; to get a unique set we fix a direction.

If a line does not pass through the origin, draw the parallel line through the origin. Parallel lines have the same direction cosines, so this gives the direction cosines of the original line.

As shown in the previous chapter, the direction cosines of any line satisfy l² + m² + n² = 1. For example, the x-axis makes angles 0°, 90°, 90° with the axes, so its direction cosines are 1, 0, 0; similarly the y-axis has 0, 1, 0 and the z-axis 0, 0, 1.

Direction ratios

Any three numbers a, b, c proportional to the direction cosines are called direction ratios (d.r.'s, sometimes direction numbers) of the line: a = λl, b = λm, c = λn for some non-zero λ. A line has infinitely many sets of direction ratios, and any two sets are proportional. If a, b, c are direction ratios, write l = ak, m = bk, n = ck. Then l² + m² + n² = 1 gives k²(a² + b² + c²) = 1, so k = ±1/√(a² + b² + c²). Hence:

If a, b, c are direction ratios of a line, its direction cosines are l = ±a/√(a² + b² + c²), m = ±b/√(a² + b² + c²), n = ±c/√(a² + b² + c²), with the same sign taken throughout.

Direction cosines and direction ratios

  • Direction cosines l, m, n
    • Cosines of the direction angles
    • l² + m² + n² = 1 always
    • Unique for a directed line
    • Change sign if the direction is reversed
  • Direction ratios a, b, c
    • Any numbers proportional to l, m, n
    • a² + b² + c² need not be 1
    • Infinitely many sets for one line
    • Divide by √(a² + b² + c²) to get l, m, n

Worked examples

Worked example 1: from angles

A line makes angles 60°, 45° and 60° with the positive x-, y- and z-axes. Its direction cosines are cos 60°, cos 45°, cos 60° = 1/2, 1/√2, 1/2. Check: 1/4 + 1/2 + 1/4 = 1. ✓

Worked example 2: from direction ratios

A line has direction ratios 2, 3, −6. Then √(4 + 9 + 36) = √49 = 7, so the direction cosines are 2/7, 3/7, −6/7 (or −2/7, −3/7, 6/7 for the opposite direction).

Worked example 3: impossible angles

Can a line make angles 45°, 60° and 30° with the axes? cos² 45° + cos² 60° + cos² 30° = 1/2 + 1/4 + 3/4 = 3/2 ≠ 1. So no line has these direction angles. The identity l² + m² + n² = 1 is a quick test.

Worked example 4: finding the third angle

A line makes 45° with the x-axis and 60° with the y-axis. Find the angle it makes with the z-axis. n² = 1 − cos² 45° − cos² 60° = 1 − 1/2 − 1/4 = 1/4, so n = ±1/2 and the angle is 60° or 120°, depending on the direction chosen.

Useful facts
ItemDirection cosines or ratios
x-axis1, 0, 0
y-axis0, 1, 0
z-axis0, 0, 1
Line equally inclined to the three axes±1/√3, ±1/√3, ±1/√3 (same sign)
Reversed direction−l, −m, −n

Key takeaways

  • Direction cosines are the cosines of the angles a directed line makes with the axes.
  • l² + m² + n² = 1 for every line; use it to test or complete a set.
  • Direction ratios are any multiple of the direction cosines.
  • Divide direction ratios by √(a² + b² + c²) to get direction cosines.
  • Parallel lines share direction cosines; reversing a line changes their signs.

Check your understanding

  1. 1. What are the direction cosines of a line with direction ratios 1, −2, 2?

    1. ±(1/3, −2/3, 2/3)
    2. ±(1, −2, 2)
    3. ±(1/5, −2/5, 2/5)
    4. ±(1/9, −2/9, 2/9)
    Show answer

    Answer: A. √(1 + 4 + 4) = 3, so the direction cosines are ±(1/3, −2/3, 2/3). Check: 1/9 + 4/9 + 4/9 = 1.

  2. 2. A line makes 45° with the x-axis and 60° with the y-axis, and an acute angle with the z-axis. What is that angle?

    1. 30°
    2. 45°
    3. 60°
    4. 90°
    Show answer

    Answer: C. n² = 1 − (1/√2)² − (1/2)² = 1 − 1/2 − 1/4 = 1/4. For an acute angle n = 1/2, so the angle is 60°.

  3. 3. What are the direction cosines of the z-axis?

    1. 1, 0, 0
    2. 0, 1, 0
    3. 1, 1, 1
    4. 0, 0, 1
    Show answer

    Answer: D. The z-axis makes 90°, 90° and 0° with the x-, y- and z-axes, so its direction cosines are cos 90°, cos 90°, cos 0° = 0, 0, 1.

  4. 4. Which set can be the direction cosines of a line?

    1. 1/2, 1/2, 1/2
    2. 1/√2, 1/2, 1/2
    3. 1, 1, 0
    4. 1/3, 1/3, 1/3
    Show answer

    Answer: B. Only 1/√2, 1/2, 1/2 satisfies l² + m² + n² = 1: 1/2 + 1/4 + 1/4 = 1. The other sums of squares are 3/4, 2 and 1/3.

  5. 5. Assertion (A): 2, −1, 2 and −4, 2, −4 are direction ratios of the same line. Reason (R): Any two sets of direction ratios of a line are proportional.

    1. Both A and R are true, and R is the correct explanation of A
    2. Both A and R are true, but R is not the correct explanation of A
    3. A is true, but R is false
    4. A is false, but R is true
    Show answer

    Answer: A. −4, 2, −4 = −2 × (2, −1, 2), so the two sets are proportional and both give direction cosines ±(2/3, −1/3, 2/3). R states exactly why such sets describe the same line.

Privacy · Terms · Refunds · Delivery