logo

回転変換 📂行列代数

回転変換

2次元

2次元平面でベクトルを$\theta$だけ反時計回りに回転させる変換は、以下の通りです。

$$ \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} $$

導出

三角関数の加法定理によると、$x^{\prime}, y^{\prime}$はそれぞれ以下のように書ける。

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

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

行列で表すと、以下のようになります。

$$ \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} $$