3.9 Rotations
Rotations are linear mappings that preserve both lengths and angles (as discussed in Section 3.4). They are represented by orthogonal matrices, where the transformation rotates vectors through a given angle \(\theta\) around the origin. Rotations are important in fields such as computer graphics and robotics, where objects or coordinate systems must be rotated precisely in space.
3.9.1 Rotations in \(\mathbb{R}^2\)
In \(\mathbb{R}^2\), a rotation by angle \(\theta\) about the origin is defined as: \[ \mathbf{R}(\theta) = \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{bmatrix}. \] This matrix transforms the standard basis vectors as follows: \[ \Phi(\mathbf{e}_1) = \begin{bmatrix} \cos \theta \\ \sin \theta \end{bmatrix}, \quad \Phi(\mathbf{e}_2) = \begin{bmatrix} -\sin \theta \\ \cos \theta \end{bmatrix}. \] The transformation is counterclockwise for \(\theta > 0\). Rotations in \(\mathbb{R}^2\) are commutative, meaning \(\mathbf{R}(\phi)\mathbf{R}(\theta) = \mathbf{R}(\theta)\mathbf{R}(\phi)\). The rotation matrix represents a basis change in the plane.
Example 3.27 Let \[ \mathbf{v}=\begin{bmatrix}1\\[4pt]2\end{bmatrix}\in\mathbb{R}^2. \] We want to rotate this vector 90 degrees.
The rotation matrix by angle \(\theta\) is \[ \mathbf{R}(\theta)=\begin{bmatrix} \cos\theta & -\sin\theta\\[4pt] \sin\theta & \cos\theta \end{bmatrix} = \begin{bmatrix} \cos(\tfrac{\pi}{2}) & -\sin(\tfrac{\pi}{2})\\[4pt] \sin(\tfrac{\pi}{2}) & \cos(\tfrac{\pi}{2}) \end{bmatrix} = \begin{bmatrix} 0 & -1\\[4pt] 1 & 0 \end{bmatrix}. \]
Apply this to \(\mathbf{v}\): \[ \mathbf{v}' = \mathbf{R}\!\big(\tfrac{\pi}{2}\big)\mathbf{v} = \begin{bmatrix}0 & -1\\[4pt]1 & 0\end{bmatrix} \begin{bmatrix}1\\[4pt]2\end{bmatrix} = \begin{bmatrix}-2\\[4pt]1\end{bmatrix}. \]
Now verify the rotation by checking the dot product between the original and the twice-rotated vector: \[ \mathbf{v}\cdot\mathbf{v}' = \begin{bmatrix}1 & 2\end{bmatrix} \begin{bmatrix}-2\\[4pt]1\end{bmatrix} = 1\cdot(-2) + 2\cdot 1 = -2 + 2 = 0. \]
Because the dot product is zero, \(\mathbf{v}\) and \(\mathbf{v}'\) are orthogonal.
3.9.2 Rotations in \(\mathbb{R}^3\)
In \(\mathbb{R}^3\), a rotation occurs in a two-dimensional plane about a one-dimensional axis. We define three fundamental rotation matrices corresponding to the standard coordinate axes.
1. Rotation about the \(e_1\)-axis: \[ \mathbf{R}_1(\theta) = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos \theta & -\sin \theta \\ 0 & \sin \theta & \cos \theta \end{bmatrix}. \]
2. Rotation about the \(e_2\)-axis: \[ \mathbf{R}_2(\theta) = \begin{bmatrix} \cos \theta & 0 & \sin \theta \\ 0 & 1 & 0 \\ -\sin \theta & 0 & \cos \theta \end{bmatrix}. \]
3. Rotation about the \(e_3\)-axis: \[ \mathbf{R}_3(\theta) = \begin{bmatrix} \cos \theta & -\sin \theta & 0 \\ \sin \theta & \cos \theta & 0 \\ 0 & 0 & 1 \end{bmatrix}. \]
Example 3.28 We will rotate a vector \(30^\circ\) about the \(z\)-axis.
The rotation matrix about the \(z\)-axis is: \[ \mathbf{R}_z(30^\circ) = \begin{bmatrix} \cos 30^\circ & -\sin 30^\circ & 0 \\ \sin 30^\circ & \cos 30^\circ & 0 \\ 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} \frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\ \frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\ 0 & 0 & 1 \end{bmatrix}. \]
Let the vector be \[ \mathbf{v} = \begin{bmatrix} 2 \\ 1 \\ 3 \end{bmatrix}. \]
After rotating \(\mathbf{v}\) by \(30^\circ\) about the \(z\)-axis, we compute: \[ \mathbf{v}' = \mathbf{R}_z(30^\circ)\mathbf{v}. \]
So, \[ \mathbf{v}' = \begin{bmatrix} \frac{\sqrt{3}}{2} & -\frac{1}{2} & 0 \\ \frac{1}{2} & \frac{\sqrt{3}}{2} & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 2 \\ 1 \\ 3 \end{bmatrix} = \begin{bmatrix} \sqrt{3} - \frac{1}{2} \\ 1 + \frac{\sqrt{3}}{2} \\ 3 \end{bmatrix}. \]
The \(z\)-coordinate remains the same, while the \((x,y)\)-components are rotated \(30^\circ\) counterclockwise in the \(xy\)-plane.
A rotation is considered counterclockwise when viewed along the axis toward the origin. In \(\mathbb{R}^3\), rotations do not commute; the order of rotations matters.
3.9.3 Rotations in \(n\) Dimensions
In \(n\)-dimensional Euclidean space, rotations generalize to two-dimensional planes within \(\mathbb{R}^n\). All other \(n-2\) dimensions remain fixed.
Definition 3.13 A Givens rotation \(\mathbf{R}_{ij}(\theta) \in \mathbb{R}^{n \times n}\) is defined as: \[ \mathbf{R}_{ij}(\theta) = \begin{bmatrix} I_{i-1} & & & & \\ & \cos \theta & & -\sin \theta & \\ & & I_{j-i-1} & & \\ & \sin \theta & & \cos \theta & \\ & & & & I_{n-j} \end{bmatrix}, \] for \(1 \leq i < j \leq n\) and \(\theta \in \mathbb{R}\).
This means: \[ r_{ii} = \cos \theta, \quad r_{ij} = -\sin \theta, \quad r_{ji} = \sin \theta, \quad r_{jj} = \cos \theta. \] In 2D, this reduces to the familiar matrix \(\mathbf{R}(\theta)\). Givens rotations are especially useful in numerical linear algebra for zeroing specific elements (e.g., QR decomposition).
Example 3.29 In \(\mathbb{R}^4\), rotate the given vector in the \(x\text{–}z\) plane, while leaving the \(y\) and \(w\) coordinates unchanged. Let \[ \mathbf{v} = \begin{bmatrix} 2 \\ 1 \\ 0 \\ 4 \end{bmatrix}. \]
The rotation matrix in the \(x\text{–}z\) plane by \(60^\circ\) is: \[ \mathbf{R}_y(60^\circ) = \begin{bmatrix} \cos 60^\circ & 0 & -\sin 60^\circ & 0 \\ 0 & 1 & 0 & 0 \\ \sin 60^\circ & 0 & \cos 60^\circ & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} \frac{1}{2} & 0 & -\frac{\sqrt{3}}{2} & 0 \\ 0 & 1 & 0 & 0 \\ \frac{\sqrt{3}}{2} & 0 & \frac{1}{2} & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}. \]
Now, we rotate the vector and \[ \mathbf{v}' = \mathbf{R}_y(60^\circ)\mathbf{v} = \begin{bmatrix} \frac{1}{2} & 0 & -\frac{\sqrt{3}}{2} & 0 \\ 0 & 1 & 0 & 0 \\ \frac{\sqrt{3}}{2} & 0 & \frac{1}{2} & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 2 \\ 1 \\ 0 \\ 4 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \\ \sqrt{3} \\ 4 \end{bmatrix}. \] Thus, \[ \mathbf{v}' = \begin{bmatrix} 1 \\ 1 \\ \sqrt{3} \\ 4 \end{bmatrix}. \]
Notice that only the \(x\) and \(z\) coordinates change due to the rotation; the \(y\) and \(w\) components remain fixed.
3.9.4 Properties of Rotations
Rotations have several key properties derived from their orthogonality:
Distance Preservation:
Rotations do not alter the distance between any two points. \[ \|\mathbf{x} - \mathbf{y}\| = \|\mathbf{R}_\theta(\mathbf{x}) - \mathbf{R}_\theta(\mathbf{y})\|. \]Angle Preservation:
The angle between \(\mathbf{x}\) and \(\mathbf{y}\) equals the angle between \(\mathbf{R}_\theta \mathbf{x}\) and \(\mathbf{R}_\theta \mathbf{y}\).Non-Commutativity (in 3D or higher):
The composition of rotations depends on their order:
\[ \mathbf{R}_i(\phi)\mathbf{R}_j(\theta) \neq \mathbf{R}_j(\theta)\mathbf{R}_i(\phi). \] Only in 2D do rotations commute and form an Abelian group.
Exercises
Exercise 3.63 Prove that rotations do not alter the distance between any two points. \[ \|\mathbf{x} - \mathbf{y}\| = \|\mathbf{R}_\theta(\mathbf{x}) - \mathbf{R}_\theta(\mathbf{y})\|. \]
Exercise 3.64
Prove that the angle between \(\mathbf{x}\) and \(\mathbf{y}\) equals the angle between \(\mathbf{R}_\theta \mathbf{x}\) and \(\mathbf{R}_\theta \mathbf{y}\).Exercise 3.65 Find an example that demonstrates that the composition of rotations depends on their order:
\[
\mathbf{R}_i(\phi)\mathbf{R}_j(\theta) \neq \mathbf{R}_j(\theta)\mathbf{R}_i(\phi).
\]
Exercise 3.67
Rotate the standard basis in \(\bbR^3\) \(45^o\) counterclockwise with respect to the \(z\)-axis.Exercise 3.68
A diamond is formed by attaching the ends of the vectors \(\begin{bmatrix}1\\0 \end{bmatrix},\begin{bmatrix}-1\\0 \end{bmatrix}, \begin{bmatrix}0\\2 \end{bmatrix}, \begin{bmatrix}0\\-2 \end{bmatrix}\). Rotate this \(90^0\) counterclockwise. Draw the pictures.Exercise 3.69
A trapezoid is formed by attaching the ends of the vectors \(\begin{bmatrix}1\\0 \end{bmatrix},\begin{bmatrix}-2\\0 \end{bmatrix}, \begin{bmatrix}0\\3 \end{bmatrix}, \begin{bmatrix}0\\-4 \end{bmatrix}\). Rotate this \(270^0\) counterclockwise. Draw the pictures.Exercise 3.70
Consider a vector \(v = \begin{bmatrix}2\\3 \end{bmatrix}\) with respect to the basis \(B=\set{\begin{bmatrix}-1\\1 \end{bmatrix},\begin{bmatrix}-1\\-1 \end{bmatrix}}\). Convert the vector into standard the standard basis, rotate it \(45^o\) counterclockwise, then change it back to the original basis.Exercise 3.71
Consider a vector \(v = \begin{bmatrix}-2\\1 \end{bmatrix}\) with respect to the basis \(B=\set{\begin{bmatrix}-1\\0 \end{bmatrix},\begin{bmatrix}1\\-1 \end{bmatrix}}\). Convert the vector into standard the standard basis, rotate it \(90^o\) counterclockwise, then change it back to the original basis.Exercise 3.72