logo

회전변환 📂Matrix Algebra

회전변환

2D

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

(xy)=(cosθsinθsinθcosθ)(xy) \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=rcosϕx = r \cos \phi and y=rsinϕy = r \sin \phi. Define (x,y)(x^{\prime}, y^{\prime}) as the point where the point (x,y)(x, y) is rotated by θ\theta. According to the addition formulas for trigonometric functions, x,yx^{\prime}, y^{\prime} are as follows, respectively.

x=rcos(ϕ+θ)=rcosϕcosθrsinϕsinθ=xcosθysinθ \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*}

y=rsin(ϕ+θ)=rsinϕcosθ+rcosϕsinθ=ycosθ+xsinθ=xsinθ+ycosθ \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.

(xy)=(cosθsinθsinθcosθ)(xy) \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}