• Advanced
  • About 18 min
  • 5 practice questions

Direction cosines and ratios: hard problems

Handle direction cosines and direction ratios fluently: test whether three angles are possible, find the third angle, get a direction perpendicular to two lines, and solve two simultaneous conditions on l, m, n.

If something looks wrong, please tell us.

Every problem in three-dimensional geometry starts with a direction. Lines, planes, angles and distances are all built from direction cosines and direction ratios, so speed and accuracy here pay off in every later lesson. This lesson assumes you know the definitions and concentrates on the problems that cause trouble: impossible angle sets, the sign ambiguity, directions perpendicular to two given lines, and pairs of equations in l, m and n.

The facts you work with

If a directed line makes angles α, β and γ with the positive x, y and z axes, its direction cosines are l = cos α, m = cos β and n = cos γ, and they always satisfy l² + m² + n² = 1. Any three numbers a, b, c proportional to l, m, n are direction ratios. To go back from ratios to cosines, divide by √(a² + b² + c²); the two choices of sign give the two opposite directions of the same line. For the line through P(x₁, y₁, z₁) and Q(x₂, y₂, z₂), the differences x₂ − x₁, y₂ − y₁, z₂ − z₁ are direction ratios.

Two identities follow at once from l² + m² + n² = 1 and are worth memorising: sin²α + sin²β + sin²γ = 3 − 1 = 2, and cos 2α + cos 2β + cos 2γ = 2(l² + m² + n²) − 3 = −1. If a line is equally inclined to the three axes, then 3l² = 1, so its direction cosines are ±(1/√3, 1/√3, 1/√3).

l² + m² + n² = 1 for direction cosines. Ratios become cosines on division by √(a² + b² + c²), with both signs allowed. The angle θ between two lines satisfies cos θ = |l₁l₂ + m₁m₂ + n₁n₂|, and a direction perpendicular to two lines is the cross product of their direction ratios.

Worked example 1: are these angles possible?

Can a line make angles 45°, 60° and 120° with the axes? Square the cosines: (1/√2)² + (1/2)² + (−1/2)² = 1/2 + 1/4 + 1/4 = 1. Yes, and its direction cosines are (1/√2, 1/2, −1/2). Compare 30°, 45° and 60°: 3/4 + 1/2 + 1/4 = 3/2, which is not 1, so no line makes those three angles. Always run this test before using given angles.

Worked example 2: the missing angle

A line makes 60° with the x-axis and 45° with the y-axis. Then cos²γ = 1 − 1/4 − 1/2 = 1/4, so cos γ = ±1/2 and γ is 60° or 120°. Both are correct unless the question asks for the acute angle. Many students write only 60° and lose the second direction.

Worked example 3: perpendicular to two lines

Find the direction cosines of a line perpendicular to lines with direction ratios (1, 2, 3) and (2, −1, 1). The cross product is (2·1 − 3·(−1), 3·2 − 1·1, 1·(−1) − 2·2) = (5, 5, −5), which is proportional to (1, 1, −1). Dividing by √3 gives ±(1/√3, 1/√3, −1/√3). Check: 1 + 2 − 3 = 0 and 2 − 1 − 1 = 0.

Worked example 4: two conditions on l, m, n

Find the angle between the two lines whose direction cosines satisfy l + m + n = 0 and l² + m² − n² = 0. From the first equation n = −(l + m). Substituting, l² + m² = (l + m)², so 2lm = 0 and either l = 0 or m = 0. If l = 0, then n = −m and the direction ratios are (0, 1, −1). If m = 0, then n = −l and they are (1, 0, −1). The angle between them satisfies cos θ = |0 + 0 + 1|/(√2 × √2) = 1/2, so θ = 60°. The pattern is general: eliminate one cosine with the linear equation, factorise the quadratic, and read off two directions.

Shortcuts and traps

  • Collinearity: A, B, C are collinear exactly when the direction ratios of AB and AC are proportional.
  • Direction ratios are not unique; direction cosines are unique up to sign. Never add or compare ratios from different scalings.
  • The angle with an axis uses the signed cosine: a negative n means an obtuse angle with the z-axis.
  • If a quadratic in l, m, n gives a solution with l = m = n = 0, discard it: it is not a direction.

Key takeaways. Test angle sets with l² + m² + n² = 1 before using them. Keep both signs unless the question fixes the direction. Use the cross product for a direction perpendicular to two lines, and solve paired conditions by eliminating with the linear equation first.

Check your understanding

  1. 1. Which set of angles can a line make with the positive x, y and z axes?

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

    Answer: B. The squared cosines must add to 1. For 45°, 60°, 120°: 1/2 + 1/4 + 1/4 = 1. The others give 3/2, 3/4 and 3/4.

  2. 2. A line makes angles α, β, γ with the coordinate axes. What is cos 2α + cos 2β + cos 2γ?

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

    Answer: B. cos 2α = 2cos²α − 1, so the sum is 2(l² + m² + n²) − 3 = 2 − 3 = −1.

  3. 3. What are the direction cosines of the line directed from (3, −2, 1) to (5, 4, −2)?

    1. (2/7, 6/7, 3/7)
    2. (2/11, 6/11, −3/11)
    3. (2/7, 6/7, −3/7)
    4. (1/7, 3/7, −3/7)
    Show answer

    Answer: C. Direction ratios are (5 − 3, 4 + 2, −2 − 1) = (2, 6, −3), with length √(4 + 36 + 9) = 7. Dividing gives (2/7, 6/7, −3/7).

  4. 4. What is the acute angle between lines with direction ratios (1, 1, 2) and (√3 − 1, −√3 − 1, 4)?

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

    Answer: C. Dot product: (√3 − 1) − (√3 + 1) + 8 = 6. Lengths: √6 and √((4 − 2√3) + (4 + 2√3) + 16) = √24 = 2√6. cos θ = 6/(√6 × 2√6) = 1/2, so θ = 60°.

  5. 5. Which are direction cosines of a line perpendicular to both lines with direction ratios (1, −1, 0) and (0, 1, 1)?

    1. (1/√3, −1/√3, 1/√3)
    2. (1/√2, 1/√2, 0)
    3. (1/√3, 1/√3, 1/√3)
    4. (1/√3, 1/√3, −1/√3)
    Show answer

    Answer: D. Cross product: ((−1)(1) − 0·1, 0·0 − 1·1, 1·1 − (−1)·0) = (−1, −1, 1), proportional to (1, 1, −1). Dividing by √3 gives ±(1/√3, 1/√3, −1/√3). Each other option fails a dot-product test.

Privacy · Terms · Refunds · Delivery