In analytic geometry, the direction cosines (or directional cosines) of a vector are the cosines of the angles between the vector and the three positive coordinate axes. Equivalently, they are the contributions of each component of the basis to a unit vector in that direction.
Three-dimensional Cartesian coordinates
If is a Euclidean vector in three-dimensional Euclidean space,
where are the standard basis in Cartesian coordinates notation, then the direction cosines are
It follows that by squaring each equation and adding the results
Here are the direction cosines and the Cartesian coordinates of the unit vector and are the direction angles of the vector .
The direction angles are acute, right, obtuse, or straight angles, i.e., , and (There are two opposite angles between two vectors, and the direction angle between the vectors is the one satisfying .), and they denote the angles formed between and the unit basis vectors .
General meaning More generally, direction cosine refers to the cosine of the angle between any two vectors starting at a same point. They are useful for forming direction cosine matrices that express one set of orthonormal basis vectors in terms of another set, or for expressing a known vector in a different basis. Simply put, direction cosines provide an easy method of representing the direction of a vector in a Cartesian coordinate system.
Applications
Determining angles between two vectors Let and have direction cosines and , respectively, having an angle between them. Their unit vectors arerespectively.
Taking the scalar product of these two unit vectors yield,The geometric interpretation of the scalar product of these two unit vectors is equivalent to the projection of one vector onto another; linking the two definitions we find the following.
There exist two choices for (because cosine is even); one is acute, right, obtuse, or straight angle (), another is the reflex angle (), between the vectors. The convention is to choose the former, so we get from the scalar product by using the inverse cosine function:
See also
Cartesian tensor Euler angles
References