9. Rotations

 

Rotations

3.4장에서 언급한 바와 같이 orthogonal transformation matrix에 의한 linear mapping의 특징은 길이(length)와 각도(angle)이 보존된다는 것입니다. 이번 장에서는 rotation, 즉, 회전과 관련된 orthogonal transformation matrix에 대해 살펴보도록 하겠습니다.

rotation 은 원래의 평면을 $\theta$ 만큼 회전시키는 것이며, origin은 고정된 point입니다. Positive angle $\theta$ 는 일반적으로 반시계 방향으로 회전하는 것을 의미합니다.

위의 그림은 반시계 방향으로 112.5$^\circ$ 만큼 회전시킨 것이며, 이때의 tranformation matrix는 다음과 같습니다.

\[\boldsymbol{R} = \begin{bmatrix}-0.38&-0.92\\0.92&-0.38\end{bmatrix} \tag{3.74}\]

Rotations in $\mathbb{R}^2$

$\mathbb{R}^2$ 에서의 standard basis가 다음과 같을 때, 이 basis는 $\mathbb{R}^2$ 에서의 표준 좌표계(standard coordinate system)을 정의합니다.

\[\left\lbrace \boldsymbol{e}_1=\begin{bmatrix}1\\0\end{bmatrix}, \boldsymbol{e}_2=\begin{bmatrix}0\\1\end{bmatrix} \right\rbrace\]
Figure 3.16

여기서, 위의 그림에서 보여주는 것과 같이 $\theta$ 각도만큼 이 좌표계를 회전시킨다고 가정해봅시다. 회전된 벡터는 여전히 linearly independent 하기 때문에, 여전히 $\mathbb{R}^2$ 의 basis 입니다. 다만, basis가 바뀔 뿐입니다.

Rotation $\Phi$ 는 linear mapping 입니다. 따라서, rotation $\Phi$ 을 rotation matrix $\boldsymbol{R}(\theta)$ 로 표현할 수 있습니다. Figure 3.16에서 보여주는 것처럼 Trigonometry(삼각법)을 사용하면 $\boldsymbol{e}_1, \boldsymbol{e}_2$ 가 회전된 축에 대해 다음과 같이 변환되는 것을 알 수 있습니다.

\[\Phi(\boldsymbol{e}_1) = \begin{bmatrix}\cos\theta\\\sin\theta\end{bmatrix}, \quad \Phi(\boldsymbol{e}_2) = \begin{bmatrix}-\sin\theta\\\cos\theta\end{bmatrix} \tag{3.75}\]

따라서, rotation matrix $\boldsymbol{R}(\theta)$ 는 다음과 같습니다.

\[\boldsymbol{R}(\theta) = \begin{bmatrix}\Phi(\boldsymbol{e}_1)&\Phi(\boldsymbol{e}_2)\end{bmatrix} = \begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix} \tag{3.76}\]


Rotations in $\mathbb{R}^3$

$\mathbb{R}^2$ 에서의 회전과는 달리, $\mathbb{R}^3$ 에서의 회전은 2차원 평면을 고정된 1차원 축에 대해 회전시킵니다. General rotation matrix를 구하는 가장 쉬운 방법은 standard basis $\boldsymbol{e}_1,\boldsymbol{e}_2,\boldsymbol{e}_3$ 이 어떻게 회전되는지 보는 것이고, 회전된 basis $\boldsymbol{Re}_1,\boldsymbol{Re}_2,\boldsymbol{Re}_3$ 은 서로 직교(orthonormal) 합니다. 따라서, general rotation matrix $\boldsymbol{R}$ 은 standard basis로부터 변환된 basis의 조합으로 얻을 수 있습니다.

그전에 2차원 이상의 차원에서 회전을 수행할 때, ‘반시계방향(counterclockwise)’이 어떤 방향인지 정의해야 합니다. 여기서 우리는 ‘축의 끝에서 바라봤을 때 원점을 향하는 축’을 기준으로 반시계방향으로 회전시키는 것이라고 정의합니다. 말로 표현하니 조금 헷갈리는데, 간단하게 3차원의 경우에는 3개의 basis vector가 있을 때, 한 basis vector를 중심 축으로 반시계 방향으로 회전시킨다고 생각하면 됩니다.

아래 그림은 3차원 $\mathbb{R}^3$ 에서 basis vector 중 하나인 $\boldsymbol{e}_3$ 을 축으로 $\theta$ 만큼 반시계방향으로 회전시키는 것을 보여줍니다.

Counterclockwise의 정의에 따라서 $\mathbb{R}^3$ 에서의 rotation은 3개의 standard basis vector에 따른 3개의 rotation이 존재합니다.

  • $\boldsymbol{e}_1$ 에 대한 rotation matrix는 다음과 같습니다. 여기서 $\boldsymbol{e}_1$ 의 좌표는 고정되며, 반시계반향의 회전은 $\boldsymbol{e}_2\boldsymbol{e}_3$ 평면에서 수행됩니다.
\[\boldsymbol{R}_1(\theta) = \begin{bmatrix}\Phi(\boldsymbol{e}_1)&\Phi(\boldsymbol{e}_2)&\Phi(\boldsymbol{e}_3)\end{bmatrix} = \begin{bmatrix}1&0&0\\0&\cos\theta&-\sin\theta\\0&\sin\theta&\cos\theta\end{bmatrix} \tag{3.77}\]
  • $\boldsymbol{e}_2$ 에 대한 rotation matrix는 다음과 같습니다.
\[\boldsymbol{R}_2(\theta) = \begin{bmatrix}\cos\theta&0&\sin\theta\\0&1&0\\-\sin\theta&0&\cos\theta\end{bmatrix} \tag{3.78}\]
  • $\boldsymbol{e}_3$ 에 대한 rotation matrix는 다음과 같습니다.
\[\boldsymbol{R}_2(\theta) = \begin{bmatrix}\cos\theta&-\sin\theta&0\\\sin\theta&\cos\theta&0\\0&0&1\end{bmatrix} \tag{3.79}\]


Rotations in $n$ Dimensions

2D/3D Rotation에서 n-차원의 Euclidean vector space로 일반화된 rotation은 (n-2)-차원을 고정하고, n-차원 상에서 2차원 평면이 회전하는 것으로 제한할 수 있습니다. 3차원의 경우에서 본 것처럼, $\mathbb{R}^2$ 의 2차원 subspace라면 어느 평면이든 회전시킬 수 있습니다.

Definition 3.11 (Givens Rotation).
$V$ 를 n-차원의 Euclidean vector space라고 하고 $\Phi : V \rightarrow V$ 가 아래의 transformation matrix를 갖는 automorphism 이라고 합시다 ($1 \leq i < j \leq n$ and $\theta \in \mathbb{R}$ ).

\[\boldsymbol{R}_{ij}(\theta) := \begin{bmatrix}\boldsymbol{I}_{i-1}&\boldsymbol{0}&\cdots&\cdots&\boldsymbol{0}\\0&\color{RED}\cos\color{RED}\theta&\boldsymbol{0}&\color{RED}-\color{RED}\sin\color{RED}\theta&\boldsymbol{0}\\\boldsymbol{0}&\boldsymbol{0}&\boldsymbol{I}_{j-i-1}&\boldsymbol{0}&\boldsymbol{0}\\\boldsymbol{0}&\color{RED}\sin\color{RED}\theta&\boldsymbol{0}&\color{RED}\cos\color{RED}\theta&\boldsymbol{0}\\\boldsymbol{0}&\cdots&\cdots&\boldsymbol{0}&\boldsymbol{I}_{n-j}\end{bmatrix} \in \mathbb{R}^{n\times n} \tag{3.80}\]

이때, $\boldsymbol{R}_{ij}(\theta)$ 를 Givens rotation 이라고 합니다.

Givens rotation $\boldsymbol{R}_{ij}(\theta)$ 는 아래의 element를 갖는 항등 행렬 $\boldsymbol{I}_n$ 입니다.

\[r_{ii} = \cos\theta, \quad r_{ij} = -\sin\theta, \quad r_{ji} = \sin\theta, \quad r_{jj} = \cos\theta \tag{3.81}\]

2차원인 경우에는($n = 2$ ), special case로 식 (3.76)과 같습니다.

Properties of Rotations

Rotation은 orthogonal matrix(definitino 3.8)로부터 유도되는 몇 가지 유용한 성질들이 있습니다.

  • Rotation은 거리(distance)를 보존합니다. 즉, $\|\boldsymbol{x} - \boldsymbol{y}\| = \|\boldsymbol{R}_\theta(\boldsymbol{x}) - \boldsymbol{R}_\theta(\boldsymbol{y})\|$ 입니다. 따라서, rotation 변환 이후에 두 point 사이의 거리는 변하지 않습니다.
  • Rotation은 각도(angle)를 보존합니다. 따라서, $\boldsymbol{R}_\theta\boldsymbol{x}$ 와 $\boldsymbol{R}_\theta\boldsymbol{y}$ 간의 각도는 $\boldsymbol{x}$ 와 $\boldsymbol{y}$ 간의 각도와 같습니다.
  • 3차원 이상의 차원에서는 교환법칙(commutative)이 성립하지 않습니다. 따라서, 동일한 point를 회전시키더라도 roration이 적용되는 순서는 매우 중요합니다. 오직 2차원 벡터의 rotation만 교환법칙이 성립합니다.