Skip to content

Mathematics · Ch 9 — Three-Dimensional Geometry

Direction Cosines and Direction Ratios

4

Direction Cosines and Direction Ratios

A line in space has a definite length only between two specified points, but it has a direction regardless of length -- and describing that direction precisely, independent of where the line is positioned, is the purpose of direction cosines and direction ratios.

Direction cosines. Let a directed line LL (or a vector parallel to it) make angles α\alpha, β\beta, γ\gamma with the positive xx-, yy- and zz-axes respectively. The cosines of these three angles, l=cos⁡αl=\cos\alpha, m=cos⁡βm=\cos\beta, n=cos⁡γn=\cos\gamma, are called the direction cosines of the line, written as the ordered triple (l,m,n)(l,m,n). Every line has exactly two associated sets of direction cosines, (l,m,n)(l,m,n) and (−l,−m,−n)(-l,-m,-n), one for each of its two possible directions.

The relation l2+m2+n2=1l^2+m^2+n^2=1 -- derivation. Consider a directed line through the origin, and let P(x,y,z)P(x,y,z) be a point on it at distance r=OPr=OP from OO. Since α\alpha is the angle OPOP makes with the xx-axis, the foot of the perpendicular from PP to the xx-axis lies at distance x=rcos⁡α=rlx=r\cos\alpha=rl from OO; similarly y=rmy=rm and z=rnz=rn. Substituting into the distance-from-origin formula r2=x2+y2+z2r^2=x^2+y^2+z^2 (Section 3),

r2=(rl)2+(rm)2+(rn)2=r2(l2+m2+n2)⇒l2+m2+n2=1r^2=(rl)^2+(rm)^2+(rn)^2=r^2(l^2+m^2+n^2) \quad\Rightarrow\quad l^2+m^2+n^2=1

(dividing through by r2≠0r^2\ne0). So the direction cosines of any line always satisfy l2+m2+n2=1l^2+m^2+n^2=1 -- they cannot be chosen freely as three independent numbers, only as a triple lying on the unit sphere.

Direction cosines of the line joining two points. For two points P1(x1,y1,z1)P_1(x_1,y_1,z_1) and P2(x2,y2,z2)P_2(x_2,y_2,z_2), the direction cosines of the line P1P2P_1P_2 (directed from P1P_1 to P2P_2) are obtained by dividing each coordinate difference by the distance P1P2P_1P_2 (Section 3):

l=x2−x1P1P2,m=y2−y1P1P2,n=z2−z1P1P2.l=\frac{x_2-x_1}{P_1P_2},\qquad m=\frac{y_2-y_1}{P_1P_2},\qquad n=\frac{z_2-z_1}{P_1P_2}.

This automatically satisfies l2+m2+n2=1l^2+m^2+n^2=1, since the sum of the squares of the numerators is exactly P1P2 2P_1P_2^{\,2} by the distance formula.

Direction ratios. In practice, a line's direction is very often known only up to scale -- e.g. as coefficients a,b,ca,b,c in an equation -- without the corresponding distance being known or needed. Any three numbers a,b,ca,b,c proportional to a line's direction cosines, i.e. l=λal=\lambda a, m=λbm=\lambda b, n=λcn=\lambda c for some nonzero constant λ\lambda, are called the line's direction ratios. Direction ratios are far more convenient to work with than direction cosines, since they can be read directly off two points as x2−x1, y2−y1, z2−z1x_2-x_1,\ y_2-y_1,\ z_2-z_1, with no need to compute a square root, and any nonzero scalar multiple of a valid set of direction ratios represents the same direction. …