Intuition What this page is for
The parent note taught you the single fact l 2 + m 2 + n 2 = 1 and showed three examples. But real problems come in many flavours : signs, zeros, angles that are secretly impossible, word problems, and sneaky exam twists. This page marches through every case class so that when you meet one in a test, you have already seen its twin.
Before we begin, one reminder of every symbol we use, in plain words:
Definition The symbols on this page
l , m , n — the direction cosines : the cosines of the angles a line makes with the x -, y -, z -axes. Symbolically,
l = cos α , m = cos β , n = cos γ .
Each is a number between − 1 and 1 .
α , β , γ — those three angles themselves (Greek "alpha, beta, gamma"), always measured from the positive axis.
( a , b , c ) — direction ratios : any vector pointing along the line, not yet shrunk to length 1 .
a 2 + b 2 + c 2 — the length (magnitude) of that vector, from the Distance Formula in 3D .
cos − 1 — the inverse cosine (also written arccos ). It undoes cosine: cos − 1 ( x ) answers "which angle has this cosine?" So cos − 1 2 1 = 6 0 ∘ because cos 6 0 ∘ = 2 1 .
Everything below rests on the boxed identity from the parent note :
l 2 + m 2 + n 2 = 1.
Think of this as a checklist. Every worked example below is tagged with the cell it fills.
Cell
Case class
What makes it tricky
Example
A
All positive components
The "easy" baseline
Ex 1
B
A zero component
One axis is perpendicular (cos 9 0 ∘ = 0 )
Ex 2
C
Negative component(s)
Line leans away from an axis; cos > 9 0 ∘
Ex 3
D
The ± ambiguity
Two opposite directions share one line
Ex 4
E
Impossible angle-triple
Identity acts as a filter — no line exists
Ex 5
F
Degenerate / equal angles
Symmetric line (equal leans), the "diagonal"
Ex 6
G
Word problem (real world)
Translate physical setup → ratios
Ex 7
H
Exam twist (find a missing angle)
Back-solve one cosine from the other two
Ex 8
I
Exactly along an axis / limiting value
Line collapses onto an axis
Ex 9, Ex 10
Read the matrix once. Now we fill every cell.
Figure 1 — the master picture. A red unit arrow floats among the three black axes. Its three dashed shadows on the x -, y -, z -axes have lengths l , m , n . Squaring and adding those shadow-lengths always rebuilds the arrow's length 1 : this is the identity l 2 + m 2 + n 2 = 1 in one image. We invoke this picture directly in Ex 1 below — the three fractions 7 2 , 7 3 , 7 6 are exactly the three shadow-lengths, and re-squaring them rebuilds the arrow.
Worked example Ex 1 — the baseline
Find the direction cosines of the vector ( 2 , 3 , 6 ) .
Forecast: all three numbers point the "positive" way, so guess: are all three cosines positive and less than 1 ? And does the biggest component (6 ) give the biggest cosine?
Step 1 — length. 2 2 + 3 2 + 6 2 = 4 + 9 + 36 = 49 = 7.
Why this step? Direction cosines are components of a unit vector, so we must first know how long the raw vector is before shrinking it (see Unit Vectors ).
Step 2 — divide each component by the length.
l = 7 2 , m = 7 3 , n = 7 6 .
Why this step? Dividing a vector by its own length always yields a length-1 vector; its components are then automatically direction cosines. In the language of Figure 1 , these three fractions are precisely the lengths of the red arrow's three dashed shadows on the axes.
Verify: ( 7 2 ) 2 + ( 7 3 ) 2 + ( 7 6 ) 2 = 49 4 + 9 + 36 = 49 49 = 1. ✓ Squaring the three shadow-lengths and adding rebuilds the arrow's length 1 — exactly what Figure 1 promised. And 7 6 (largest) matches the largest component. Forecast confirmed.
Worked example Ex 2 — a right angle to one axis
Find the direction cosines of the line joining ( 1 , − 1 , 2 ) and ( 1 , 2 , 6 ) .
Forecast: the two points share the same x -coordinate (1 and 1 ). The line does not move in x at all. What angle does a line make with an axis it never leans toward? Guess 9 0 ∘ , so l = 0 .
Step 1 — direction ratios. Subtract coordinates: ( 1 − 1 , 2 − ( − 1 ) , 6 − 2 ) = ( 0 , 3 , 4 ) .
Why this step? The vector from one point to the other is the line's direction.
Step 2 — length. 0 2 + 3 2 + 4 2 = 25 = 5.
Why this step? We need the raw vector's length before shrinking it to a unit vector; this uses the Distance Formula in 3D .
Step 3 — cosines. l = 5 0 = 0 , m = 5 3 , n = 5 4 .
Why this step? Same normalisation as before; the zero simply survives division.
Verify: 0 + 25 9 + 25 16 = 1. ✓ And l = 0 = cos 9 0 ∘ — the line is exactly perpendicular to the x -axis, as forecast.
Intuition Why zero means perpendicular
cos 9 0 ∘ = 0 . A zero direction cosine is the algebra saying "this line is at a right angle to that axis" — its shadow on that axis has zero length.
Worked example Ex 3 — leaning away
Find the direction cosines of ( − 1 , 2 , − 2 ) and describe each angle.
Forecast: two components are negative. A negative cosine means an obtuse angle (more than 9 0 ∘ ) with that axis. Guess: α and γ are obtuse, β is acute.
Step 1 — length. ( − 1 ) 2 + 2 2 + ( − 2 ) 2 = 1 + 4 + 4 = 9 = 3.
Why: magnitude ignores sign (squares), so the length is a plain positive 3 .
Step 2 — cosines. l = − 3 1 , m = 3 2 , n = − 3 2 .
Why this step? We divide each component by the length 3 to normalise; the minus signs carry through because dividing by a positive number keeps the sign, and a negative direction cosine is exactly how the algebra records "leaning away."
Step 3 — read the angles.
cos α = − 3 1 ⇒ α = cos − 1 ( − 3 1 ) ≈ 109. 5 ∘ (obtuse).
cos β = 3 2 ⇒ β = cos − 1 ( 3 2 ) ≈ 48. 2 ∘ (acute).
cos γ = − 3 2 ⇒ γ = cos − 1 ( − 3 2 ) ≈ 131. 8 ∘ (obtuse).
Why: the sign of a cosine tells us which side of the 9 0 ∘ mark the angle lies.
Verify: 9 1 + 9 4 + 9 4 = 9 9 = 1. ✓ Signs confirm the forecast.
Figure 2 — negative cosine means obtuse angle. In the x –z plane, the red line-direction arrow points up and to the left , so its dashed shadow on the x -axis lands on the negative half. The black arc marks the angle α , which is now larger than 9 0 ∘ . This is why l = cos α < 0 .
Worked example Ex 4 — one line, two directions
A line has direction ratios ( 1 , 1 , 1 ) . Write BOTH sets of direction cosines and explain why there are two.
Forecast: a line is like a road with no arrow — you can walk it either way. So guess two answers, equal but opposite in sign.
Step 1 — length. 1 2 + 1 2 + 1 2 = 3 .
Why this step? Direction cosines are components of a unit vector, so before anything else we measure how long the raw ratio vector ( 1 , 1 , 1 ) is; only then can we shrink it to length 1 .
Step 2 — cosines (one orientation).
l = m = n = 3 1 .
Why this step? Dividing each component by the length 3 produces a unit vector; its identical components are the direction cosines for one of the two ways to walk the line.
Step 3 — the opposite orientation. Reverse the vector to ( − 1 , − 1 , − 1 ) :
l = m = n = − 3 1 .
Why this step? A line (not a ray) has no preferred direction; both unit vectors ± 3 1 ( 1 , 1 , 1 ) lie along it.
Verify: 3 ⋅ ( 3 1 ) 2 = 3 ⋅ 3 1 = 1. ✓ Both sign choices pass, because squaring erases the sign.
Common mistake Dropping the
±
When you solve cos 2 γ = k you get cos γ = ± k . Forgetting the minus loses the opposite direction of the line. Always report both unless the problem fixes a direction (e.g. "from P to Q ").
Worked example Ex 5 — the identity as a filter
Can a line make 6 0 ∘ with the x -axis, 6 0 ∘ with the y -axis, and 6 0 ∘ with the z -axis?
Forecast: three equal leans of 6 0 ∘ ... cos 6 0 ∘ = 2 1 , and 3 × 4 1 = 4 3 = 1 . Guess: impossible.
Step 1 — compute the sum of squares.
cos 2 6 0 ∘ + cos 2 6 0 ∘ + cos 2 6 0 ∘ = 3 ⋅ ( 2 1 ) 2 = 3 ⋅ 4 1 = 4 3 .
Why this step? Any real line must satisfy l 2 + m 2 + n 2 = 1 . If a proposed triple gives anything else, no line can produce it.
Step 2 — compare with 1 . 4 3 = 1.
Why this step? The identity is a strict equality — the sum must be exactly 1 . Landing on 4 3 instead is the test failing, which is our whole verdict.
Conclusion: No such line exists. The identity rejects it.
Verify: contrast with the valid symmetric case cos − 1 3 1 ≈ 54. 7 ∘ (Ex 6), where 3 ⋅ 3 1 = 1 . ✓ So the true "equal-angle" line leans 54. 7 ∘ , not 6 0 ∘ .
Worked example Ex 6 — the perfectly symmetric line
Find the direction cosines of the line making equal angles with all three axes. What is that common angle?
Forecast: by symmetry l = m = n . Plug into the identity and solve.
Step 1 — set them equal. Let l = m = n = t .
Why this step? "Equal angles" means equal cosines; naming the common value t turns three unknowns into one.
Step 2 — use the identity.
t 2 + t 2 + t 2 = 1 ⇒ 3 t 2 = 1 ⇒ t = ± 3 1 .
Why this step? Every valid direction cosine triple must obey l 2 + m 2 + n 2 = 1 ; substituting l = m = n = t turns that identity into a single equation we can solve for t .
Step 3 — the common angle.
α = cos − 1 3 1 ≈ 54.7 4 ∘ .
Why: this is the famous "body diagonal" of a cube direction ( 1 , 1 , 1 ) — Ex 4 was this same line.
Verify: 3 ⋅ 3 1 = 1 ✓ and cos 54.7 4 ∘ ≈ 0.5774 ≈ 3 1 ✓.
Worked example Ex 7 — a guy-wire on a mast
A straight cable runs from the top of a 12 m vertical pole to a ground anchor 3 m east and 4 m north of the pole's base. Set up axes with x = east, y = north, z = up. Find the cable's direction cosines (from the top down to the anchor).
Forecast: the cable drops 12 m in z (negative, going down) and moves 3 , 4 horizontally. Guess: n is negative and largest in size, since most of the run is vertical.
Step 1 — build the direction vector. Top of pole is at ( 0 , 0 , 12 ) ; anchor at ( 3 , 4 , 0 ) . Vector top→anchor:
( 3 − 0 , 4 − 0 , 0 − 12 ) = ( 3 , 4 , − 12 ) .
Why this step? We translate the physical geometry into a direction ratio triple.
Step 2 — length. 3 2 + 4 2 + ( − 12 ) 2 = 9 + 16 + 144 = 169 = 13.
Why: this is also the true cable length — 13 m.
Step 3 — cosines.
l = 13 3 , m = 13 4 , n = − 13 12 .
Why this step? Dividing each component of the direction ratio by the length 13 shrinks the cable direction to a unit vector; those normalised components are the direction cosines.
Verify: 169 9 + 16 + 144 = 169 169 = 1 ✓. n is negative and largest in size — the cable indeed heads mostly downward, as forecast. Units: length 13 m is a real distance (Distance Formula in 3D ).
Worked example Ex 8 — two angles given, find the third
A line makes 9 0 ∘ with the x -axis and 4 5 ∘ with the y -axis. Find the angle it makes with the z -axis.
Forecast: l = cos 9 0 ∘ = 0 , m = cos 4 5 ∘ = 2 1 . The identity must supply n . Since 0 + 2 1 = 2 1 , we expect n 2 = 2 1 too, so another 4 5 ∘ -ish answer.
Step 1 — turn angles into cosines. l = 0 , m = 2 1 .
Why this step? The identity is written in cosines, so we translate first.
Step 2 — apply the identity.
n 2 = 1 − l 2 − m 2 = 1 − 0 − 2 1 = 2 1 .
Why this step? With two cosines known, the third is fixed up to sign — the coupling from the parent note.
Step 3 — solve.
n = ± 2 1 ⇒ γ = cos − 1 ( ± 2 1 ) = 4 5 ∘ or 13 5 ∘ .
Why ± : the two opposite directions of the line (Cell D again).
Verify: 0 + 2 1 + 2 1 = 1 ✓ for either sign. Both 4 5 ∘ and 13 5 ∘ are geometrically valid.
Worked example Ex 9 — a line lying along the
x -axis
Find the direction cosines of a line with direction ratios ( 1 , 0 , 0 ) — i.e. pointing straight along the x -axis.
Forecast: the line is the x -axis. So it makes 0 ∘ with x (perfectly aligned) and 9 0 ∘ with both y and z . Guess: ( l , m , n ) = ( ± 1 , 0 , 0 ) .
Step 1 — length. 1 2 + 0 2 + 0 2 = 1 = 1.
Why this step? We still normalise; here the vector already has length 1 , so nothing shrinks.
Step 2 — cosines. l = 1 1 = 1 , m = 0 , n = 0.
Reversing the direction to ( − 1 , 0 , 0 ) gives l = − 1 . So the two orientations are ( ± 1 , 0 , 0 ) .
Why this step? Normalising an already-unit vector leaves it unchanged; l = 1 = cos 0 ∘ confirms the line is perfectly aligned with the x -axis.
Step 3 — read the angles. α = cos − 1 ( 1 ) = 0 ∘ , β = γ = cos − 1 ( 0 ) = 9 0 ∘ .
Why this step? Turning each cosine back into its angle via cos − 1 lets us describe the orientation in plain degrees: 0 ∘ means "runs exactly along the x -axis," and 9 0 ∘ means "perpendicular to the y - and z -axes" — confirming in words what the numbers say.
Verify: 1 2 + 0 2 + 0 2 = 1 ✓. A direction cosine can indeed hit its extreme value ± 1 — this is the only case where one cosine is ± 1 and the other two are forced to 0 .
Worked example Ex 10 — the limit: swinging onto the
z -axis
A line makes angle θ with both the x - and y -axes and we shrink θ → 9 0 ∘ . What direction does the line approach, and what are its limiting direction cosines?
Forecast: if the line becomes perpendicular to both x and y , the only room left is straight up/down — the z -axis. Guess l , m → 0 and n → ± 1 .
Step 1 — write l , m in terms of θ . l = m = cos θ .
Why this step? The problem says the line makes the same angle θ with both the x - and y -axes, and a direction cosine is precisely the cosine of that angle; so both l and m equal cos θ .
Step 2 — force the identity.
2 cos 2 θ + n 2 = 1 ⇒ n 2 = 1 − 2 cos 2 θ .
Why this step? The third cosine is always whatever the identity requires; solving for n 2 expresses the vertical lean purely in terms of θ .
Step 3 — take the limit θ → 9 0 ∘ . As θ → 9 0 ∘ , cos θ → 0 , so
n 2 → 1 − 0 = 1 ⇒ n → ± 1 , l , m → 0.
Why this step? This is the degenerate limit where the direction ( 0 , 0 , ± 1 ) is exactly the z -axis, making angle 0 ∘ (or 18 0 ∘ ) with it — the same "along-an-axis" case as Ex 9, now reached as a smooth limit rather than a fixed input.
Verify: limiting triple ( 0 , 0 , ± 1 ) : 0 + 0 + 1 = 1 ✓. And n = 1 = cos 0 ∘ means the line is the z -axis, matching the forecast.
Figure 3 — the limit toward the z -axis. Several faint black arrows show the line at θ = 5 5 ∘ , 6 5 ∘ , 7 5 ∘ , 8 5 ∘ ; as θ grows toward 9 0 ∘ they lean ever more upright. The bold red arrow is the limit ( 0 , 0 , 1 ) — the line has become the z -axis itself.
Recall Tick every cell
A (all positive) ::: Ex 1
B (zero component) ::: Ex 2
C (negative component) ::: Ex 3
D (± ambiguity) ::: Ex 4
E (impossible triple) ::: Ex 5
F (equal angles / degenerate) ::: Ex 6
G (word problem) ::: Ex 7
H (missing angle) ::: Ex 8
I (exactly along an axis / limiting value) ::: Ex 9 and Ex 10
Recall Rapid fire
Direction cosines of ( 2 , 3 , 6 ) ? ::: ( 7 2 , 7 3 , 7 6 ) .
What does a zero direction cosine mean? ::: The line is perpendicular (9 0 ∘ ) to that axis.
What does a negative direction cosine mean? ::: The angle with that axis is obtuse (> 9 0 ∘ ).
Direction cosines of a line along the x -axis? ::: ( ± 1 , 0 , 0 ) .
Common angle of the equal-angle line? ::: cos − 1 3 1 ≈ 54.7 4 ∘ .
Can a line make 6 0 ∘ with all three axes? ::: No; 3 cos 2 6 0 ∘ = 4 3 = 1 .
Two angles 9 0 ∘ , 4 5 ∘ given — third angle? ::: 4 5 ∘ or 13 5 ∘ .
Before trusting any angle-triple, square-add-check : compute cos 2 α + cos 2 β + cos 2 γ . If it's not exactly 1 , the line does not exist.