The direction cosines are three cosine values of the angles a vector makes with the coordinate axes.
Another way to think of this is to view them as the corresponding components of the unit vector pointing in the same direction.
The three direction cosines are called and respectively.
For a vector that subtends angles with the -, -, -axes, respectively, we have
In a similar way, we could use the dot product to calculate the angle between two vectors.
If and are two vectors with an angle of between them,
This follows directly from the definition of dot product: