logo

회전변환 📂Matrix Algebra

회전변환

2D

In a two-dimensional plane $\mathbb{R}^{2}$, the transformation that rotates a vector counterclockwise by $\theta$ is as follows.

$$ \begin{pmatrix} x^{\prime} \\ y^{\prime} \end{pmatrix} = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} $$

Derivation

Let $x = r \cos \phi$ and $y = r \sin \phi$. Define $(x^{\prime}, y^{\prime})$ as the point where the point $(x, y)$ is rotated by $\theta$. According to the addition formulas for trigonometric functions, $x^{\prime}, y^{\prime}$ are as follows, respectively.

$$ \begin{align*} x^{\prime} &= r \cos(\phi + \theta) \\ &= r\cos\phi \cos\theta - r\sin\phi \sin\theta \\ &= x \cos\theta - y \sin\theta \\ \end{align*} $$

$$ \begin{align*} y^{\prime} &= r \sin(\phi + \theta) \\ &= r\sin\phi \cos\theta + r\cos\phi \sin\theta \\ &= y \cos\theta + x \sin\theta \\ &= x \sin\theta + y \cos\theta \end{align*} $$

Expressed in matrix form, it is as follows.

$$ \begin{pmatrix} x^{\prime} \\ y^{\prime} \end{pmatrix} = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} $$