Skip to main content

Section 1.3 Orientation of a Rigid Body: Direction Cosines

Our next task is to parametrize the orientation of body \(\cB\) relative to referential \(\cE\text{,}\) or equivalently the orientation of basis \((\bhb_1 , \bhb_2 , \bhb_3 )\) of \(\cB\) relative to basis \((\be_1 , \be_2 , \be_3 )\) of \(\cE\text{.}\) In some fields, such as aeronautics or celestial mechanics, the orientation is often referred to as the attitude.
One possible way to achieve this task is to determine the direction cosines between the two bases.

Definition 1.3.1. Direction cosines.

The direction cosines of basis \((\bhb_1 , \bhb_2 , \bhb_3 )\) on basis \((\be_1 , \be_2 , \be_3 )\) are the scalars \(c_{ij}\) defined as
\begin{equation} c_{ij} = \be_i \cdot \bhb_j, \qquad (i,j = 1, 2, 3) \tag{1.3.1} \end{equation}
The matrix \([\cC_{EB}] \equiv [c_{ij}] = [\bhb_1 | \bhb_2 | \bhb_3]_{(\be_1 , \be_2 , \be_3 )}\) is called direction cosine matrix: its column vectors are obtained by writing each basis vector \(\bhb_j\) of \(\cB\) on the basis of \(\cE\text{.}\)
Each unit vector \(\bhb_j\) can be written as
\begin{equation} \bhb_j = c_{1j} \be_1 + c_{2j} \be_2 + c_{3j} \be_3 \qquad (j=1,2,3)\tag{1.3.2} \end{equation}
The nine direction cosines \(c_{ij}\) are not independent since the basis vectors \((\bhb_1, \bhb_2, \bhb_3)\) satisfy the six independent equations
\begin{equation*} \bhb_j \cdot \bhb_k = \delta_{jk} =\begin{cases} 0, \amp \quad j \neq k \\ 1, \amp \quad j = k \end{cases} \qquad (j,k = 1, 2, 3) \end{equation*}
Hence for \(j=k=1,2,3\) we have
\begin{gather} c_{11}^2 + c_{21}^2 + c_{31}^2 =1 \label{c11} \tag{1.3.3}\\ c_{12}^2 + c_{22}^2 + c_{32}^2 =1 \label{c22} \tag{1.3.4}\\ c_{13}^2 + c_{23}^2 + c_{33}^2 =1 \label{c33}\tag{1.3.5} \end{gather}
and for \(j \neq k\)
\begin{gather} c_{11} c_{12} + c_{21} c_{22} + c_{31} c_{32} = 0 \tag{1.3.6}\\ c_{11} c_{13} + c_{21} c_{23} + c_{31} c_{33} = 0 \tag{1.3.7}\\ c_{13} c_{12} + c_{23} c_{22} + c_{33} c_{32} = 0 \tag{1.3.8} \end{gather}
Therefore, only three independent direction cosines are necessary to define the orientation of \(\cB\) relative to \(\cE\).
We can also express basis vector \(\be_i\) on basis \((\bhb_1 , \bhb_2 , \bhb_3 )\) in the following way
\begin{equation*} \be_i = c_{i1} \bhb_1 + c_{i2} \bhb_2 + c_{i3} \bhb_3 , \quad (i= 1, 2, 3) \label{f-to-e} \end{equation*}
This implies that the direction cosine matrix \([C_{BE}] = [\be_1 | \be_2| \be_3 ]_{(\bhb_1 , \bhb_2 , \bhb_3 )} \) is given by \([c_{ji}]\text{,}\) and that the inverse of matrix \([\cC_{EB}]\) is equal to its transpose:
\begin{equation*} [\cC_{EB}]^{-1} = [\cC_{EB}]^T = [\cC_{BE}], \qquad [\cC_{BE}]^{-1} = [\cC_{BE}]^T = [\cC_{EB}] \end{equation*}
The condition \([\cC_{EB}] [\cC_{EB}]^{T} = [\cI]\) characterizes an orthogonal matrix and is in fact equivalent to equations (1.3.3)-(1.3.5) and (1.3.6)-(1.3.8). Furthermore, the determinant of the direction cosine matrix is necessarily equal to \(+1\) since both bases are right-handed. Matrix \([\cC_{BE}]\) allows for the determination of the components \((v_1 , v_2 , v_3)\) of any vector \({\bV}\) on basis \((\bhb_1 , \bhb_2 , \bhb_3 )\) from its components \((V_1 , V_2 , V_3)\) on basis \((\be_1 , \be_2 , \be_3 )\)
\begin{equation*} \begin{pmatrix} v_1 \\ v_2 \\ v_3 \end{pmatrix} = [\cC_{BE}] \begin{pmatrix} V_1 \\ V_2 \\ V_3 \end{pmatrix} \end{equation*}
and conversely
\begin{equation*} \begin{pmatrix} V_1 \\ V_2 \\ V_3 \end{pmatrix} = [\cC_{EB}] \begin{pmatrix} v_1 \\ v_2 \\ v_3 \end{pmatrix} = [\cC_{BE}]^{T} \begin{pmatrix} v_1 \\ v_2 \\ v_3 \end{pmatrix} \end{equation*}
where we have used \([\cC_{EB}] =[\cC_{BE}]^{T}\text{.}\)
Direction cosine matrix \([\cC_{EB}]\) also allows us to relate the matrix representations of any linear operator \(\cL: \bV \mapsto \bW = \cL(\bV)\) in the bases of \(\cE\) and \(\cB\) as follows:
\begin{equation*} \begin{pmatrix} w_1 \\ w_2 \\ w_3 \end{pmatrix} = [\cC_{BE}] \begin{pmatrix} W_1 \\ W_2 \\ W_3 \end{pmatrix} = [\cL ]_B \begin{pmatrix} v_1 \\ v_2 \\ v_3 \end{pmatrix} = [\cL ]_B [\cC_{BE} ] \begin{pmatrix} V_1 \\ V_2 \\ V_3 \end{pmatrix} \end{equation*}
giving
\begin{equation*} \begin{pmatrix} W_1 \\ W_2 \\ W_3 \end{pmatrix} = [\cC_{BE} ]^T [\cL ]_B [\cC_{BE} ] \begin{pmatrix} V_1 \\ V_2 \\ V_3 \end{pmatrix} \end{equation*}
This yields the following relationship between matrices \([\cL ]_B\) and \([\cL ]_E\) on bases \((\bhb_1 , \bhb_2 , \bhb_3 )\) and \((\be_1 , \be_2 , \be_3 )\text{:}\)
\begin{equation} [\cL ]_{_E} = [\cC_{EB} ] [\cL ]_{_B} [\cC_{EB} ]^T\tag{1.3.9} \end{equation}
A special class of linear operators are rotations.

Definition 1.3.2. Rotation.

The rotation \(\cR_{EB}\) is the linear operator which maps basis \((\be_1 , \be_2 , \be_3 )\) of \(\cE\) to basis \((\bhb_1 , \bhb_2 , \bhb_3 )\) of \(\cB\text{:}\)
\begin{equation} \bhb_i = \cR_{EB} (\be_i)\tag{1.3.10} \end{equation}

Remark 1.3.3.

Determination of \(\cR_{EB}\) is tantamount to the determination of the orientation of \(\cB\) relative to \(\cE\text{.}\)

Remark 1.3.4.

The inverse of operator \(\cR_{EB}\) is \(\cR_{EB}^{-1}= \cR_{BE}\text{.}\)

Remark 1.3.5.

The set of rotations is a group denoted \(SO(3)\text{.}\)

Remark 1.3.6.

Rotations are not commutative: given two rotations \(\cR_1\) and \(\cR_2\text{,}\) the rotation \(\cR_1 \circ \cR_2\) is not, in general, equal to rotation \(\cR_2 \circ \cR_1\text{.}\)
Rotations and direction cosines are related according to the following result:

Proof.

Matrix \([\cR_{EB}]_{_E}\) has \(ij\)th element \(\cR_{EB} (\be_j)\cdot \be_i = \bhb_j\cdot \be_i\) which is equal to \(c_{ij}\) by definition. The second equality is more surprising: the \(ij\)th element of the matrix \([\cR_{EB}]_{_B}\) is given by
\begin{equation*} \cR_{EB} (\bhb_j)\cdot \bhb_i = \cR_{EB} (c_{kj} \be_k) \cdot \bhb_i = c_{kj}\cR_{EB} (\be_k) \cdot \bhb_i = c_{kj}\bhb_k \cdot \bhb_i = c_{kj} \delta_{ki}= c_{ij} \end{equation*}
where we have used the summation convention for repeated indices. To show (\ref{rotation-transp}), we use (\ref{rotation-cosine}):
\begin{equation*} \begin{bmatrix}\cR_{BE}\end{bmatrix}_{_E} = \begin{bmatrix}\cC_{BE}\end{bmatrix}= \begin{bmatrix}\cC_{EB}\end{bmatrix}^T = \begin{bmatrix}\cR_{EB}\end{bmatrix}^T_{_E} \end{equation*}
It is of interest to consider composition of rotations: consider a third rigid body (or referential) \(\cA\) of basis \((\bha_1,\bha_2,\bha_3)\) and consider the rotations \(\cR_{EA}\) and \(\cR_{AB}\) which satisfy
\begin{equation*} \bha_i = \cR_{EA} (\be_i), \qquad \bhb_i = \cR_{AB} (\bha_i) \qquad (i=1,2,3) \end{equation*}
The rotation which maps \((\be_1 , \be_2 , \be_3 )\) to \((\bhb_1 , \bhb_2 , \bhb_3 )\) is given by
\begin{equation*} \cR_{EB} = \cR_{AB} \circ \cR_{EA} \end{equation*}
However, their matrix representations follow the rule
\begin{equation*} \begin{bmatrix}\cR_{EB}\end{bmatrix}_{_E} = \begin{bmatrix}\cR_{EA}\end{bmatrix}_{_E} \begin{bmatrix}\cR_{AB}\end{bmatrix}_{_A} \end{equation*}

Proof.

Equation (\ref{rotationmat-comp}) is equivalent to
\begin{equation*} \begin{bmatrix}\cC_{EB}\end{bmatrix} = \begin{bmatrix}\cC_{EA}\end{bmatrix} \begin{bmatrix}\cC_{AB}\end{bmatrix} \end{equation*}
in terms of direction cosine matrices, according to (\ref{rotation-cosine}). To prove this result, consider an arbitrary vector \(\bV\) and denote by \([V]_E\text{,}\) \([V]_A\) and \([V]_B\) the components of \(\bV\) on the basis of \(\cE\text{,}\) \(\cA\) and \(\cB\text{,}\) respectively: we know that \([V]_E = [\cC_{EA}] [V]_A\) and \([V]_A = [\cC_{AB}] [V]_B\) leading to
\begin{equation*} [V]_E = [\cC_{EA}][\cC_{AB}] [V]_B = [\cC_{EB}] [V]_B \end{equation*}

Example 1.3.8.

Given the configuration shown below, find the matrix of the rotation which maps basis \((\be_1 , \be_2 , \be_3 )\) to basis \((\bhb_1 , \bhb_2 , \bhb_3 )\text{.}\)
Figure 1.3.9. Example 1.3.8
Conversely, find out if the following matrices correspond to rotations:
\begin{equation*} \begin{bmatrix} -1 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \\ 0 \amp 0 \amp 1 \end{bmatrix} \qquad \frac{1}{4} \begin{bmatrix} 3 \amp 1 \amp \sqrt{6} \\ 1 \amp 3 \amp -\sqrt{6} \\ -\sqrt{6} \amp \sqrt{6}\amp 2 \end{bmatrix} \end{equation*}
Solution.
With \(\cR(\be_1)= \bhb_1 =\be_2\text{,}\) \(\cR(\be_2)= \bhb_2 =\be_3\text{,}\) and \(\cR(\be_3)= \bhb_3 =\be_1\text{,}\) we immediately obtain
\begin{equation*} \begin{bmatrix}\cR \end{bmatrix}_{E} =\begin{bmatrix} 0 \amp 0 \amp 1 \\ 1 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \end{bmatrix} _{E} \end{equation*}
For the first given matrix, the set \((\bhb_1,\bhb_2, \bhb_3) = (-\be_1, \be_2, \be_3)\) forms a basis of orthonormal unit vectors. However, it is not right-handed since \(\bhb_1\times \bhb_2 = -\bhb_3\text{:}\) this is not a rotation matrix. For the second matrix, it is easy to verify that \(\bhb_i \cdot \bhb_j = \delta_{ij}\) and that \(\bhb_1 \times \bhb_2 = \bhb_3\text{:}\) this is a rotation matrix.

Example 1.3.10.

Given \(\te\) (\(0\leq \te \lt 2\pi\)), consider the rotation, denoted \(\cR_{\te,\be_3}\text{,}\) of angle \(\te\) about unit vector \(\be_3\text{.}\)
Figure 1.3.11. Example 1.3.10.
Construct the matrix representation \(\begin{bmatrix}\cR_{\te, \be_3} \end{bmatrix}_{_E} \) of \(\cR_{\te, \be_3}\text{.}\)
Solution.
With \(\bhb_1 =\cos\te \be_1 + \sin\te\be_2\text{,}\) \(\bhb_2 = -\sin\te \be_1 + \cos\te\be_2\text{,}\) and \(\bhb_3 =\be_3\text{,}\) we find
\begin{equation*} \begin{bmatrix}\cR_{\te,\be_3} \end{bmatrix}_{E} =\begin{bmatrix} \cos\te \amp -\sin\te \amp 0 \\ \sin\te \amp \cos\te \amp 0 \\ 0 \amp 0 \amp 1 \end{bmatrix} _{E} \end{equation*}
In conclusion, direction cosines naturally define the orientation of a rigid body and are associated with rotation operators. In practice, they are not convenient due to their redundancy and their nonlinear (quadratic) relationships. In the following sections, we will introduce alternative methods which define orientation in terms of three independent parameters.