Only some matrices produce rotations

The examples in Figure 3.5 span the main qualitative differences between various two-by-two matrices $ M$. Two of them were rotation matrices: the identity matrix, which is 0 degrees of rotation, and the $ 180$-degree rotation matrix. Among the set of all possible $ M$, which ones are valid rotations? We must ensure that the model does not become distorted. This is achieved by ensuring that $ M$ satisfies the following rules:

  1. No stretching of axes.
  2. No shearing.
  3. No mirror images.
If none of these rules is violated, then the result is a rotation.

To satisfy the first rule, the columns of $ M$ must have unit length:

$\displaystyle m_{11}^2 + m_{21}^2 = 1$    and $\displaystyle m_{12}^2 + m_{22}^2 = 1 .$ (3.9)

The scaling and shearing transformations in Figure 3.5 violated this.

To satisfy the second rule, the coordinate axes must remain perpendicular. Otherwise, shearing occurs. Since the columns of $ M$ indicate how axes are transformed, the rule implies that their inner (dot) product is zero:

$\displaystyle m_{11} m_{12} + m_{21} m_{22} = 0.$ (3.10)

The shearing transformations in Figure 3.5 violate this rule, which clearly causes right angles in the model to be destroyed.

Satisfying the third rule requires that the determinant of $ M$ is positive. After satisfying the first two rules, the only possible remaining determinants are $ 1$ (the normal case) and $ -1$ (the mirror-image case). Thus, the rule implies that:

$\displaystyle \det \begin{bmatrix}m_{11} & m_{12}  m_{21} & m_{22} \end{bmatrix} = m_{11} m_{22} - m_{12} m_{21} = 1.$ (3.11)

The mirror image example in Figure 3.5 results in $ \det M = -1$.

Figure 3.6: For a circle with unit radius, centered at the origin, a single parameter $ \theta $ reaches all $ xy$ points along the circle as it ranges from $ \theta =0$ to $ \theta =2\pi $.

The first constraint (3.9) indicates that each column must be chosen so that its components lie on a unit circle, centered at the origin. In standard planar coordinates, we commonly write the equation of this circle as $ x^2 + y^2 = 1$. Recall the common parameterization of the unit circle in terms of an angle $ \theta $ that ranges from 0 to $ 2 \pi$ radians (see Figure 3.6):

$\displaystyle x = \cos\theta$    and $\displaystyle y = \sin\theta .$ (3.12)

Instead of $ x$ and $ y$, we use the notation of the matrix components. Let $ m_{11} = \cos\theta$ and $ m_{21} = \sin\theta$. Substituting this into $ M$ from (3.4) yields

$\displaystyle \begin{bmatrix}\cos\theta & -\sin\theta  \sin\theta & \cos\theta \end{bmatrix},$ (3.13)

in which $ m_{12}$ and $ m_{22}$ were uniquely determined by applying (3.10) and (3.11). By allowing $ \theta $ to range from 0 to $ 2 \pi$, the full range of all allowable rotations is generated.

Think about degrees of freedom. Originally, we could chose all four components of $ M$ independently, resulting in $ 4$ DOFs. The constraints in (3.9) each removed a DOF. Another DOF was removed by (3.10). Note that (3.11) does not reduce the DOFs; it instead eliminates exactly half of the possible transformations: The ones that are mirror flips and rotations together. The result is one DOF, which was nicely parameterized by the angle $ \theta $. Furthermore, we were lucky that set of all possible 2D rotations can be nicely interpreted as points along a unit circle.

Steven M LaValle 2020-01-06