Direction cosine

Direction cosine

In analytic geometry, the direction cosines of a vector are the cosines of the angles between the vector and the three coordinate axes. Or equivalently it is the component contributions to the unit vector.

If v is a vector

{\mathbf v}= v_1 \boldsymbol{\hat{x}} + v_2 \boldsymbol{\hat{y}} + v_3 \boldsymbol{\hat{z}}

where \boldsymbol{\hat{x}}, \boldsymbol{\hat{y}}, \boldsymbol{\hat{z}} is a basis. Then the direction cosines are

\begin{align}
\alpha & = \cos a = \frac{{\mathbf v} \cdot \boldsymbol{\hat{x}} }{ \left \Vert {\mathbf v} \right \Vert } & = \frac{v_1}{\sqrt{v_1^2 + v_2^2 + v_3^2}} ,\\
\beta  & = \cos b = \frac{{\mathbf v} \cdot \boldsymbol{\hat{y}} }{ \left \Vert {\mathbf v} \right \Vert } & = \frac{v_2}{\sqrt{v_1^2 + v_2^2 + v_3^2}} ,\\
\gamma  &= \cos c = \frac{{\mathbf v} \cdot \boldsymbol{\hat{z}} }{ \left \Vert {\mathbf v} \right \Vert } & = \frac{v_3}{\sqrt{v_1^2 + v_2^2 + v_3^2}}.
\end{align}

Note that

α2 + β2 + γ2 = 1

and

(α, β, γ) is the Cartesian coordinates of the unit vector \boldsymbol{\hat{v}}

More generally, direction cosine refers to the cosine of the angle between any two vectors. 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.

References