Rotation matrix

A rotation of a 3-dimensional rigid body is a motion of the body that leaves one point, O, fixed. By Euler's theorem follows that then not only the point is fixed but also an axis&mdash;the rotation axis&mdash; through the fixed point. Write $$\hat{n}$$ for the unit vector along the rotation axis and &phi; for the angle over which the body is rotated, then the rotation is written as $$ \mathcal{R}(\varphi, \hat{n}). $$

Erect three Cartesian coordinate axes with the origin in the fixed point O and take unit vectors $$\hat{e}_x,\;\hat{e}_y,\;\hat{e}_z$$ along the axes, then the rotation matrix $$\mathbf{R}(\varphi, \hat{n})$$ is defined by

\mathcal{R}(\varphi, \hat{n})\left(\hat{e}_x,\;\hat{e}_y,\;\hat{e}_z\right) = \left(\hat{e}_x,\;\hat{e}_y,\;\hat{e}_z\right) \; \mathbf{R}(\varphi, \hat{n}). $$ Given a basis of a linear space, the association between a linear map and its matrix is one-to-one.

Properties of matrix
Since rotation conserves the shape of a rigid body, it leaves angles and distances invariant. In other words, for any pair of vectors  $$\vec{a}$$ and $$\vec{b}$$ in $$\mathbb{R}^3$$ the inner product is invariant,

\left(\mathcal{R}(\vec{a}),\;\mathcal{R}(\vec{b}) \right) = \left(\vec{a},\;\vec{b}\right). $$ A linear map with this property is called orthogonal. It is easily shown that a similar vector/matrix relation holds. First we define

\vec{a} =\left(\hat{e}_x,\;\hat{e}_y,\;\hat{e}_z\right)\begin{pmatrix}a_x\\a_y\\a_z\end{pmatrix} \equiv\left(\hat{e}_x,\;\hat{e}_y,\;\hat{e}_z\right) \mathbf{a} \quad\hbox{and}\quad \vec{b} =\left(\hat{e}_x,\;\hat{e}_y,\;\hat{e}_z\right)\begin{pmatrix}b_x\\b_y\\b_z\end{pmatrix} \equiv \left(\hat{e}_x,\;\hat{e}_y,\;\hat{e}_z\right) \mathbf{b} $$ and observe that the inner product becomes by virtue of the orthonormality of the basis vectors

\left( \vec{a},\; \vec{b} \right) = \mathbf{a}^\mathrm{T} \mathbf{b}\equiv \left(a_x,\;a_y,\;a_z\right) \begin{pmatrix}b_x\\b_y\\b_z\end{pmatrix} \equiv a_xb_x+a_yb_y+a_zb_z. $$ The invariance of the inner product under $$\mathcal{R}$$ leads to

\big(\mathbf{R}\mathbf{a}\big)^\mathrm{T}\; \mathbf{R}\mathbf{b} = \mathbf{a}^\mathrm{T} \mathbf{R}^\mathrm{T}\; \mathbf{R}\mathbf{b} $$ since this holds for any pair a and b it follows that a rotation matrix satisfies

\mathbf{R}^\mathrm{T} \mathbf{R} = \mathbf{E} $$ where E is the 3&times;3 identity matrix. For finite-dimensional matrices one shows easily

\mathbf{R}^\mathrm{T} \mathbf{R} = \mathbf{E} \quad \Longleftrightarrow\quad\mathbf{R}\mathbf{R}^\mathrm{T}   = \mathbf{E}. $$