Direction Cosine

In 3-dimension (3-D) space, a non-zero vector can be denoted by

v=vxex+vyey+vzez,\begin{aligned}\mathbf{v} = v_x \mathbf{e}_x + v_y \mathbf{e}_y + v_z \mathbf{e}_z,\end{aligned}

where

  • ex=[100]\mathbf{e}_x = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}, ey=[010]\mathbf{e}_y = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}, and ez=[001]\mathbf{e}_z = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} are the unit vectors of the 3 axes, respectively.
  • vxv_x, vyv_y, and vzv_z are the components of v\mathbf{v} projected to the 3 axes.

For vector v\mathbf{v}, its direction cosine vector can be expressed as

[cos⁡αcos⁡βcos⁡γ]=[vx∥v∥2vy∥v∥2vz∥v∥2]=v∥v∥2≜ev,\begin{aligned}\begin{bmatrix} \cos\alpha \\ \cos\beta \\ \cos\gamma \end{bmatrix} &= \begin{bmatrix} \dfrac{v_x}{\| \mathbf{v}\|_2} \\ \dfrac{v_y}{\| \mathbf{v}\|_2} \\ \dfrac{v_z}{\| \mathbf{v}\|_2} \end{bmatrix}\\&= \dfrac{\mathbf{v}}{\| \mathbf{v}\|_2} \triangleq \mathbf{e}_v,\end{aligned}

where

  • α\alpha, β\beta, γ\gamma are the angles of vector v\mathbf{v} relative to the 3 axes, respectively.
  • ev\mathbf{e}_v is the unit vector of v\mathbf{v}, i.e., ∥ev∥2=cos⁡2α+cos⁡2β+cos⁡2γ=1\| \mathbf{e}_v \|_2 = \sqrt{\cos^2\alpha + \cos^2\beta + \cos^2\gamma} = 1.