If a vector #color(red)(r= xhati+yhat(j)+zhatk)# forms angles #alpha , beta and gamma# with the directions of i , j and k respectively, then:
#cos(alpha)=x/|r|#
#cos(beta)=y/|r|#
#cos(gamma)=z/|z|#
These are called the direction cosines of #color(red)(r= xhati+yhat(j)+zhatk)#
From our example:
#u=[(x),(y),(z)]=[(6),(3),(-8)]#
Then:
#cos(alpha)=x/|r|=6/(sqrt((6)^2+(3)^2+(-8)^2))=6/sqrt(109)#
#cos(beta)=y/|r|=3/(sqrt((6)^2+(3)^2+(-8)^2))=3/sqrt(109)#
#cos(gamma)=z/|z|=(-8)/(sqrt((6)^2+(3)^2+(-8)^2))=-8/sqrt(109)#
#:.#
#alpha=arccos(cos(alpha))= arccos(6/sqrt(109))=54.5^@#
#beta=arccos(cos(beta))= arccos(3/sqrt(109))=73.3^@#
#gamma=arccos(cos(gamma))= arccos((-8)/sqrt(109))=140^@#?
The angle #gamma# is the angle made with the positive z axis.
It is accepted that the direction angles are with the positive axes, and thus #gamma# is not the angle #~~40^@# which it makes with the negative z axis.