Direction cosines are a powerful tool that just comes from the application of trigonometry to vectors. Since you know already how to calculate a unit vector, what if you instead want to know the angle between a unit vector you calculate and the three coordinate axes? It turns out that any unit vector may be written:[br][br][center][math]\sin(x)=\cos(\tfrac{\pi}{2}-x).[/math][/center][br]That literally means that if the x-component of a unit vector you calculated is [math]3/5[/math], then [math]\cos{\theta_x}=\frac{3}{5}.[/math][br][br]Since in the trigonometric unit circle, we can get the x-component of the unit vector by taking the cosine of the angle between the vector and the x-axis, this shouldn't surprise you. But, it turns out, that we cannot use the sine function for the y-axis as we do in the unit circle. In 3D it just doesn't work because complimentary and supplementary angles don't add up as they do in a 2D plane. Instead we need to only use the cosine function for all the axes. [br][br]So how this looks mathematically is that any unit vector may be written[br][br][center][math]\hat{a}=\cos\theta_x\hat{i}+\cos\theta_y\hat{j}+\cos\theta_z\hat{k}.[/math][/center][br]Here the angles are the smallest angles possible by which you could rotate the vector until it aligns with each respective axis. So imagine your arm points in the direction of the vector, and you choose a plane to move your arm in such that it rotates within that plane and eventually becomes parallel with the Cartesian axis you're aiming for. See the diagram below.
Direction cosines may be used anytime we wish to find how much of a vector points along one of our coordinate directions. All we need to know is the angle between the vector and the coordinate axis. The cosine of the angle is the component of our unit direction that points in the direction of the axis. Since [math]\vec{a}=a\hat{a}[/math] we can easily find the component of the whole vector - in the event that it isn't one unit long - pointing in that direction by just multiplying by the magnitude (or norm) of the vector.[br][br][color=#1e84cc]EXAMPLE: Consider a parent dragging a child on a sled by pulling on a rope. The force F of the pull is 50 newtons (the SI unit of force) and is directed 30 degrees above horizontal. If we consider the direction along the snow in which the parent is walking to be the x-axis and up toward the sky to be the y-axis, how much of the force is directed in the x and y directions?[/color][br][color=#1e84cc]SOLUTION: Using the concept of the direction cosine, we know that [math]F_x=F\cos\theta_x[/math] and [math]F_y=F\cos\theta_y.[/math] The value of F is just 50N, and [math]\theta_x=30^o.[/math] In this case since we are treating the problem in the 2D vertical plane, we know that [math]\theta_y=60^o.[/math] This gives [math]F_x\approx 43N[/math] and [math]F_y=25N.[/math][/color]