Intuition What this page is for
The parent note gave you the formulas. Here we hunt down every kind of situation those formulas must survive: negative components, zeros, degenerate lines, angles that come out obtuse, and a couple of exam-style twists. If you can do all cells below, nothing on a test can ambush you.
Definition The two objects, up front (so nothing appears undefined later)
A directed line makes an angle with each positive coordinate axis:
α = angle with the x -axis , β = angle with the y -axis , γ = angle with the z -axis .
The direction cosines (DCs) are the cosines of exactly those three angles:
l = cos α , m = cos β , n = cos γ , l 2 + m 2 + n 2 = 1.
They ARE the components of a unit vector (length-1 arrow) pointing along the line — that is why squaring and adding gives 1 .
The direction ratios (DRs) a : b : c are any three numbers proportional to ( l , m , n ) — the "un-normalised" version, easy to read off but not length 1 .
Intuition The pictures we keep returning to
Figure s01 shows the angles α , β , γ and the unit arrow. Figure s02 shows how the sign of a component decides whether an axis angle is acute or obtuse. Glance at both before diving in — every example below is a special case of these two pictures.
Every direction-cosine problem falls into one of these case classes . The last column names the example that nails it.
#
Case class
What makes it tricky
Covered by
C1
All-positive DRs
The "easy" baseline
Ex 1
C2
Mixed signs (a negative component)
Sign must survive normalising
Ex 2
C3
A zero component
Line lies in a coordinate plane / axis angle = 9 0 ∘
Ex 3
C4
Degenerate input (two identical points)
DRs all zero — line undefined
Ex 4
C5
Obtuse angle between lines (negative cos θ )
Must report the actual angle
Ex 5
C6
Perpendicular / parallel test
Dot = 0 vs proportional DRs
Ex 6
C7
Missing DC from two known angles
Sign ambiguity → two lines
Ex 7
C8
Word problem (real direction)
Translating words into DRs
Ex 8
C9
Exam twist: DRs given as λ -expressions
Solve for the unknown
Ex 9
Work through all nine and you've touched every cell.
Find the direction cosines of the line with direction ratios ( 1 , 2 , 2 ) .
Forecast: All three numbers are positive, so guess: all three DCs come out positive, and the biggest DR (2 ) gives the biggest cosine.
Step 1. Length = 1 2 + 2 2 + 2 2 = 9 = 3 .
Why this step? The DCs are the DRs rescaled to a unit vector; the rescale factor is 1/ length .
Step 2. l = 3 1 , m = 3 2 , n = 3 2 .
Why this step? Divide each DR by the length 3 .
Verify: ( 3 1 ) 2 + ( 3 2 ) 2 + ( 3 2 ) 2 = 9 1 + 9 4 + 9 4 = 9 9 = 1 ✓. Forecast confirmed: all positive, m = n largest.
Find the DCs of the line through direction ( 2 , − 3 , 6 ) .
Forecast: One component is negative (− 3 ), so exactly one DC should come out negative — the sign is a real geometric fact (the line leans away from the positive y -axis, so its angle β with that axis is obtuse). This is precisely the situation drawn in figure s02.
Step 1. Length = 2 2 + ( − 3 ) 2 + 6 2 = 4 + 9 + 36 = 49 = 7 .
Why this step? Squaring kills the sign, so the length is always positive — but we keep the original signs on top.
Step 2. l = 7 2 , m = − 7 3 , n = 7 6 .
Why this step? Divide each signed DR by 7 . The minus stays because cos β < 0 means β > 9 0 ∘ — look at the teal dashed projection in figure s02, which lands on the negative y side.
Verify: 49 4 + 49 9 + 49 36 = 49 49 = 1 ✓. Since m = − 7 3 < 0 , β = cos − 1 ( − 7 3 ) ≈ 115. 4 ∘ — obtuse, as forecast and as the figure shows.
A line has DRs ( 0 , 3 , 4 ) . Find its DCs and the angle it makes with the x -axis.
Forecast: The first DR is 0 , so the line has no lean toward x — it lives entirely in the y z -plane (the shaded plane in figure s01, edge-on to the x -axis). Guess l = 0 and α = 9 0 ∘ .
Step 1. Length = 0 2 + 3 2 + 4 2 = 25 = 5 .
Why this step? A zero component contributes nothing under the square root; the other two set the length.
Step 2. l = 5 0 = 0 , m = 5 3 , n = 5 4 .
Why this step? Normalise as always; 0 divided by anything stays 0 .
Step 3. α = cos − 1 ( l ) = cos − 1 ( 0 ) = 9 0 ∘ .
Why this step? α is the angle with the x -axis and l = cos α ; cos α = 0 means α = 9 0 ∘ .
Verify: 0 + 25 9 + 25 16 = 25 25 = 1 ✓. A zero DC always means the line is perpendicular to that axis — no ambiguity.
"Find the DCs of the line through A ( 2 , 2 , 2 ) and B ( 2 , 2 , 2 ) ."
Forecast: A and B are the same point . Two identical points don't define a direction. Guess: the method breaks — division by zero.
Step 1. DRs = ( 2 − 2 , 2 − 2 , 2 − 2 ) = ( 0 , 0 , 0 ) .
Why this step? DRs come from A B = B − A . Here that vector is the zero vector.
Step 2. Length = 0 2 + 0 2 + 0 2 = 0 .
Why this step? We would need to divide by this length to normalise.
Step 3. 0 0 is undefined — the line and its DCs do not exist.
Why this step? Direction ratios are required to be not all zero precisely to forbid this case.
Verify: There is nothing to plug back — the honest answer is "no line is determined." Whenever your two points coincide (or you're handed ( 0 , 0 , 0 ) as DRs), stop and report undefined .
Common mistake Steel-man: "just say the DCs are
( 0 , 0 , 0 ) "
Why it feels right: the arithmetic 0/0 tempts you to write zeros.
The fix: ( 0 , 0 , 0 ) would give l 2 + m 2 + n 2 = 0 = 1 , so it can never be a valid DC triple. A direction needs a nonzero vector — no exceptions.
Find the angle between the lines with DRs ( 1 , 1 , 2 ) and ( 2 , − 1 , − 1 ) .
Forecast: Some components disagree in sign, so the dot product might be negative → an obtuse angle. Watch for it.
Step 1. Numerator = 1 ⋅ 2 + 1 ⋅ ( − 1 ) + 2 ⋅ ( − 1 ) = 2 − 1 − 2 = − 1 .
Why this step? This is the dot product a 1 a 2 + b 1 b 2 + c 1 c 2 — the top of the cosine formula.
Step 2. Magnitudes: 1 + 1 + 4 = 6 and 4 + 1 + 1 = 6 .
Why this step? We must divide the dot product by the product of lengths to turn it into a cosine.
Step 3. cos θ = 6 ⋅ 6 − 1 = 6 − 1 .
Why this step? Apply the DR angle formula. The negative cosine means θ > 9 0 ∘ .
Step 4. θ = cos − 1 ( − 6 1 ) ≈ 99. 6 ∘ .
Why this step? cos − 1 of a negative number lands in the second quadrant — an obtuse angle, as forecast.
Verify: cos ( 99. 6 ∘ ) ≈ − 0.1667 = − 6 1 ✓.
Common mistake Steel-man: "the angle between lines is always acute, so drop the sign"
Why it feels right: many books report the acute angle between lines and use ∣ cos θ ∣ .
The fix: the directed answer is cos − 1 ( − 6 1 ) ≈ 99. 6 ∘ . If a question asks for the acute angle between the lines, take absolute value: cos − 1 ( 6 1 ) ≈ 80. 4 ∘ . Read the wording; report which you used.
(a) Are the lines ( 2 , 1 , − 2 ) and ( 1 , 2 , 2 ) perpendicular?
(b) Are ( 1 , − 2 , 3 ) and ( − 2 , 4 , − 6 ) parallel?
Forecast: (a) mixed signs — could dot to zero. (b) the second triple looks like − 2 times the first — smells parallel.
Step 1 (a). Dot = 2 ⋅ 1 + 1 ⋅ 2 + ( − 2 ) ⋅ 2 = 2 + 2 − 4 = 0 .
Why this step? Two lines are perpendicular exactly when a 1 a 2 + b 1 b 2 + c 1 c 2 = 0 — no need to compute the angle.
So the lines ARE perpendicular.
Step 2 (b). Check proportionality: − 2 1 = 4 − 2 = − 6 3 = − 2 1 .
Why this step? Parallel lines have proportional DRs: a 2 a 1 = b 2 b 1 = c 2 c 1 .
All three ratios equal − 2 1 , so the lines ARE parallel (pointing in opposite directions along the same line).
Verify (a): dot = 0 , so cos θ = 0 , θ = 9 0 ∘ ✓.
Verify (b): ( − 2 , 4 , − 6 ) = − 2 ⋅ ( 1 , − 2 , 3 ) exactly ✓ — a genuine scalar multiple.
A line makes α = 4 5 ∘ with the x -axis and γ = 6 0 ∘ with the z -axis. Find β , its angle with the y -axis.
Forecast: With two DCs fixed, the identity l 2 + m 2 + n 2 = 1 pins m 2 — but m = ± m 2 , so expect two answers (two lines).
Step 1. l = cos 4 5 ∘ = 2 1 , so l 2 = 2 1 . And n = cos 6 0 ∘ = 2 1 , so n 2 = 4 1 .
Why this step? DCs are cosines of the direction angles; square them ready for the identity.
Step 2. m 2 = 1 − l 2 − n 2 = 1 − 2 1 − 4 1 = 4 1 .
Why this step? Rearranging l 2 + m 2 + n 2 = 1 isolates the unknown.
Step 3. m = ± 2 1 ⇒ β = cos − 1 ( ± 2 1 ) = 6 0 ∘ or 12 0 ∘ .
Why this step? Both signs are geometrically valid — they are the two lines symmetric about the x z -plane.
Verify: for m = 2 1 : 2 1 + 4 1 + 4 1 = 1 ✓. For m = − 2 1 : 2 1 + 4 1 + 4 1 = 1 ✓ (squaring erases the sign). Both are real lines.
A drone flies from the control tower at ground point P ( 1 , 0 , 2 ) straight to a rooftop at Q ( 4 , 4 , 6 ) (units: metres, z = height). Find the direction cosines of its flight path and the angle the path makes with the z -axis.
Forecast: It climbs (positive z -change), so n > 0 . The angle with the vertical z -axis will be less than 9 0 ∘ ; the angle with the ground is its complement.
Step 1. DRs = P Q = ( 4 − 1 , 4 − 0 , 6 − 2 ) = ( 3 , 4 , 4 ) .
Why this step? The straight flight path points along P Q ; its components are direction ratios.
Step 2. Length = 3 2 + 4 2 + 4 2 = 9 + 16 + 16 = 41 .
Why this step? Needed to normalise into DCs (and it is literally the flight distance in metres, ≈ 6.40 m).
Step 3. DCs = ( 41 3 , 41 4 , 41 4 ) .
Why this step? Divide each DR by the length. All positive, so all angles are acute — matches "climbing away from origin."
Step 4. Angle with z -axis: γ = cos − 1 ( 41 4 ) ≈ 51. 3 ∘ .
Why this step? n = cos γ ; take arccos.
Verify: 41 9 + 41 16 + 41 16 = 41 41 = 1 ✓. And cos − 1 ( 4/ 41 ) ≈ 51.3 4 ∘ , so the path rises ≈ 90 − 51.3 = 38. 7 ∘ above the ground — a gentle climb, as forecast. (See Distance between points in 3D : the 41 is exactly the distance P Q .)
The direction ratios of a line are proportional to ( λ , λ + 1 , 1 ) and the line is perpendicular to the line with DRs ( 1 , − 2 , 1 ) . Find λ , then the DCs.
(Note: we say direction ratios , not cosines — by definition direction cosines must already satisfy l 2 + m 2 + n 2 = 1 , which ( λ , λ + 1 , 1 ) generally does not.)
Forecast: "Perpendicular" hands us a dot-product-equals-zero equation. One equation, one unknown λ — solvable.
Step 1. Perpendicularity: ( λ ) ( 1 ) + ( λ + 1 ) ( − 2 ) + ( 1 ) ( 1 ) = 0 .
Why this step? Two lines are perpendicular iff a 1 a 2 + b 1 b 2 + c 1 c 2 = 0 (built in the parent). Uses Vectors and dot product .
Step 2. Expand: λ − 2 λ − 2 + 1 = 0 ⇒ − λ − 1 = 0 ⇒ λ = − 1 .
Why this step? Just simplify and solve the linear equation.
Step 3. Substitute λ = − 1 : DRs = ( − 1 , 0 , 1 ) .
Why this step? λ + 1 = 0 , giving a zero middle component (a C3 flavour hiding inside).
Step 4. Length = ( − 1 ) 2 + 0 2 + 1 2 = 2 , so DCs = ( − 2 1 , 0 , 2 1 ) .
Why this step? Normalise; the sign on − 2 1 is kept.
Verify: Perpendicular check: ( − 1 ) ( 1 ) + ( 0 ) ( − 2 ) + ( 1 ) ( 1 ) = − 1 + 0 + 1 = 0 ✓. Unit check: 2 1 + 0 + 2 1 = 1 ✓.
Recall Self-test (reveal the answer after the arrow)
Which example handles a zero DR? ::: Example 3 (C3) — one component 0 , giving a 9 0 ∘ axis angle.
Which example gives an obtuse angle between lines? ::: Example 5 (C5) — negative dot product, θ ≈ 99. 6 ∘ .
What do you report when two given points coincide? ::: Undefined — no direction exists (Example 4, C4).
After finding m 2 = 4 1 , why two answers for β ? ::: m = ± 2 1 ; both signs satisfy l 2 + m 2 + n 2 = 1 (Example 7, C7).
Which equation does "perpendicular" hand you in Example 9? ::: The dot product = 0 , i.e. λ − 2 ( λ + 1 ) + 1 = 0 .
Mnemonic The whole page in one line
"Normalise, keep signs, watch zeros, never divide by nothing, and read whether they want acute or actual."