In this tutorial, we provide a concise introduction to rotation matrices in robotics and aerospace engineering. We explain how to derive the rotation matrices for the 2D case. Everything explained in this tutorial can easily be generalized to the three-dimensional case. The YouTube tutorial accompanying this webpage is given below.
Problem Formulation
First, let us start with the problem formulation. We consider the figure shown below.
The top panel of the figure shows a body frame
(1)
Since the point
Next, we rotate the body for the angle of
The next figure shows projections of the vector
The position vector
- The representation of the position vector
in the frame :(2)
where and are the projections of the distance vector onto the axes of the frame . - The representation of the position vector
in the frame :(3)
where and are the projections of the distance vector onto the axes of the frame .
Problem formulation: Given the projections of the vector
This problem is solved by deriving a rotation matrix. The rotation matrix will be used to transform the projections of the distance vector from one coordinate frame to another.
Derivation of the Rotation Matrix and Solution of the Projection Transform Problem
For presentation clarity and to simplify the notation, let us first denote the intensity of the vector
(4)
From the above figure, we have:
(5)
where
(6)
By substituting these formulas in (5), we obtain
(7)
Next, from Fig.2, it follows
(8)
By substituting (8) in (7), we obtain
(9)
The last equation can be written in the matrix format
(10)
The last equation can be written compactly like this
(11)
where
(12)
The matrix
(13)
is called the rotation matrix. It transforms projections from the rotated frame
The equation enables us to transform projections of a vector between two coordinate frames that are rotated with respect to one another.