Chapter 10 defined direction cosines for a vector. This chapter needs them for a line — and a line brings one new subtlety: it can be traversed in two opposite directions.
If a directed line L through the origin makes angles α,β,γ with the positive x-, y- and z-axes, its direction cosines are
l=cosα,m=cosβ,n=cosγ,l2+m2+n2=1
Key Point (the two-sets fact): reversing the direction of L replaces each angle by its supplement, flipping the sign of every cosine. So an undirected line has exactly two sets of direction cosines, (l,m,n) and (−l,−m,−n); choosing a direction picks one. For a line not through the origin, use the parallel line through the origin — parallel lines share direction cosines.
Direction Ratios
Any three numbers a,b,cproportional to the direction cosines are called direction ratios of the line: a=λl, b=λm, c=λn for some λ=0. A line has infinitely many sets of direction ratios (scale by anything nonzero); it has only the two sets of cosines.
Ratios to cosines — normalise:
l=±a2+b2+c2a,m=±a2+b2+c2b,n=±a2+b2+c2c
taking the same sign throughout (the two sign choices are the two directions of the line).
The Line Through Two Points, and Collinearity
Direction cosines from two points
Exactly one line passes through P(x1,y1,z1) and Q(x2,y2,z2). Dropping perpendiculars to the coordinate planes (right-triangle geometry) gives its direction cosines directly:
Equivalently: the coordinate differences are direction ratios (x2−x1, y2−y1, z2−z1 — or all negated), and dividing by the distance normalises them.
Collinearity of three points
A, B, C are collinear exactly when the direction ratios of AB and of BC are proportional — the two segments are parallel and share the point B, forcing one straight line.
Key Point (exam workflow): for every direction-cosine computation the routine is identical: write the ratios (given, or as coordinate differences), compute a2+b2+c2, divide. The only decisions are the sign convention and keeping each cosine attached to its own axis. Zero components are fine — a zero cosine means the line is perpendicular to that axis, as with the x-axis itself, whose cosines are (1,0,0).
Solved Examples
Example 1: From angles to cosines
A line makes angles 90∘,60∘,30∘ with the positive x-, y- and z-axes. Find its direction cosines.
Solution:
Take cosines:l=cos90∘=0, m=cos60∘=21, n=cos30∘=23.
Check:0+41+43=1. ✓
Answer:(0,21,23) — the zero first entry says the line is perpendicular to the x-axis.
Example 2: From ratios to cosines
A line has direction ratios 2,−1,−2. Determine its direction cosines.
Solution:
Normalising factor:4+1+4=3.
Divide:(32,−31,−32).
Answer:(32,−31,−32) (or the all-negated set — the other direction along the same line).
Example 3: Through two points
Find the direction cosines of the line through (−2,4,−5) and (1,2,3).
Find the direction cosines of the x-, y- and z-axes.
Solution:
The x-axis makes angles 0∘,90∘,90∘ with the three axes: cosines (1,0,0).
Similarly:y-axis (0,1,0); z-axis (0,0,1).
Answer:(1,0,0), (0,1,0), (0,0,1) — the components of i^,j^,k^, as they must be.
Example 5: Collinearity via ratios
Show that A(2,3,−4), B(1,−2,3) and C(3,8,−11) are collinear.
Solution:
Ratios of AB:(1−2,−2−3,3+4)=(−1,−5,7).
Ratios of BC:(3−1,8+2,−11−3)=(2,10,−14).
Proportionality:(2,10,−14)=−2×(−1,−5,7) — parallel segments sharing B.
Answer:A,B,C are collinear.
Example 6: Direction cosines of triangle sides
Find the direction cosines of the sides of the triangle with vertices A(3,5,−4), B(−1,1,2) and C(−5,−5,−2).
Solution:
Side AB: ratios (−4,−4,6), length 16+16+36=217; cosines (17−2,17−2,173).
Side BC: ratios (−4,−6,−4), length 16+36+16=217; cosines (17−2,17−3,17−2).
Side CA: ratios (8,10,−2), length 64+100+4=242; cosines (424,425,42−1).
Answer: as computed — three independent runs of the same ratio-normalise routine; note the accidental equality of ∣AB∣ and ∣BC∣ (an isosceles triangle).
Ready to test your knowledge?
Take a quick interactive quiz on this topic —
free, works without login.