Loading [MathJax]/jax/output/SVG/jax.js

Direction cosines and direction ratios of a vector

Consider a vector as shown below on the x-y-z plane. The angles made by this line with the +ve direactions of the coordinate axes: θx, θy, and θz are used to find the direction cosines of the line: cos θx, cos θy, and cos θz. Likewise, the direction cosine of θx, θy, and θz in the opposite direction of the line are –cos θx, -cos θy, and -cos θz

Image result for direction cosine

Note that the angles θx, θy, and θz are the direction angles that satisfy the condition: 0<θx, θyz<π. Also, the sum of direction angles: θx + θy + θz≠ 2π because these angles do not lie on the same plane.

For a line on the x-axis, the direction cosines are cos 0, cos π/2, cos π/2 = 1, 0, 0.

For a line on the y-axis, the direction cosines are cos π/2, cos 0, cos π/2 = 0, 1, 0.

For a line on the x-axis, the direction cosines are cos π/2, cos π/2,cos 0 =0, 0, 1.

Consider a point P (x, y, z) on a 3D plane such that OP = r and let l, m and n be the direction cosine of r then we can conclude that: x=lr, y=mr, and z=nr.

Hence,

l=xr=xx2+y2+z2

m=yr=yx2+y2+z2

n=zr=zx2+y2+z2

The equation of the line can be written as: l2+m2+n2=1

Proof:

We know that l = cosθx, m = cosθy, and n = cosθz

And, cos2θx + cos2θy + cos2θz = 1

cos2θx + cos2θy + cos2θz= (xr)2+(yr)2+(zr)2=x2+y2+y2r2=r2r2=1

Now consider two points in a line segment AB, with the coordinates A (x1, y1, z1) and B (x2, y2, z2). Then, their direction cosines can be written a(x2x1r,y2y1r,z2z1r).

In this case, |r|=(x2x1)2+(y2y1)2+(z2z1)2

Example: A line makes 30°, 60° and 90° with the x, y and z axes respectively. Find their direction cosines.

Solution:

l = cosθx = cos 30° = 32

m = cosθy = cos 60° = 12

and n = cosθz= cos 90° = 0

The direction cosines are: (32,12,0)

Example: Consider a point P (3,1,23) in a 3D space, find the direction cosines of OP

Solution: The direction ratios of point P= (3,1,23)

Recall that l=xr=xx2+y2+z2

m=yr=yx2+y2+z2

n=zr=zx2+y2+z2

In this case, r=OP and (x, y, z) = (3,1,23)

|OP|=(30)2+(10)2+(230)2=3+1+12=4

The direction cosine of OP are: (34,14,234)=(34,14,32)