Part 4: Direction angles and Direction Cosines

Given a vector v, let us let a denote the angle between v and the x-axis, let us let b denote the angle between v and the y-axis, and let us let g denote the angle between v and the z-axis.
(Click and drag arrow's endpoint. Angles are in degrees.)
The angles a, b, and g are called the direction angles for v

If v = á a,b,c ñ = ai+bj+ck, then
v·i = a i·i+b i·j+c i·k = a
so that a = ||v|| || i|| cos( a) = ||v|| cos( a).  Similarly, b = v·j and c = v·k, so that
a = ||v|| cos( a) ,  b = ||v|| cos( b) ,  c = ||v|| cos( g)  
(7)
When combined with v = á a,b,c ñ , this leads to
v = ||v||    á cos( a) ,cos( b) ,cos( g) ñ
That is, the direction vector for v is the unit vector given by
u = á cos( a) ,cos( b) ,cos( g) ñ
The components of u are the direction cosines for v.        

EXAMPLE 8    Determine the direction cosines and direction angles for
v = á 1,1,Ö2 ñ
Solution: Since ||v|| 2 = 1+1+2 = 4, the magnitude of v is ||v|| = 2. Equation (7) implies that
1 = 2cos( a)
  
1 = 2cos( b)
  
Ö2 = 2cos( g)
cos( a) = 1
2
cos( b) = 1
2
cos( g) =  2
Ö2
a =    p
3
b =    p
3
g =    p
4
as is shown below:
(Angles are in degrees.)