線形代数の基礎 - 変換行列
概要
線形代数において、回転行列とは、ユークリッド空間内における原点中心の回転変換の表現行列のことである。
2次元や3次元では、幾何学、物理学、コンピュータグラフィックスの分野での計算によく使用される。
N次元空間における回転行列は、実数を成分とする正方行列であり、行列式が1のN次直交行列として特徴付けられる。
等倍・偏倍行列
ユークリッド空間の2次元空間および3次元空間では、等倍・偏倍行列は、以下の形で表すことができる。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A = \begin{pmatrix} a & 0 \\ 0 & b \end{pmatrix} }
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A = \begin{pmatrix} a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c \end{pmatrix} }
反転行列
ユークリッド空間の2次元空間では、x軸まわりおよびy軸まわりの反転行列は、以下の形で表すことができる。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A(\mbox{x 軸 ま わ り }) = \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix} \qquad A(\mbox{y 軸 ま わ り }) = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} }
ユークリッド空間の3次元空間では、x軸まわり、y軸まわり、z軸まわりの反転行列は、以下の形で表すことができる。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A(\mbox{x 軸 ま わ り }) = \begin{pmatrix} -1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} \qquad A(\mbox{y 軸 ま わ り }) = \begin{pmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1 \end{pmatrix} \qquad A(\mbox{z 軸 ま わ り }) = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \end{pmatrix} }
平行移動
ユークリッド空間の2次元空間および3次元空間では、X軸方向にTx、Y軸方向にTyだけ移動する平行移動は、以下の形で表すことができる。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A = \begin{pmatrix} 1 & 0 & T_{x} \\ 0 & 1 & T_{y} \end{pmatrix} \qquad \begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} 1 & 0 & T_{x} \\ 0 & 1 & T_{y} \end{pmatrix} \begin{pmatrix} x \\ y \\ 1 \end{pmatrix} }
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A = \begin{pmatrix} 1 & 0 & 0 & T_{x} \\ 0 & 1 & 0 & T_{y} \\ 0 & 0 & 1 & T_{z} \end{pmatrix} \qquad \begin{pmatrix} x' \\ y' \\ z' \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 & T_{x} \\ 0 & 1 & 0 & T_{y} \\ 0 & 0 & 1 & T_{z} \end{pmatrix} \begin{pmatrix} x \\ y \\ z \\ 1 \end{pmatrix} }
2次元の回転行列
ユークリッド空間の2次元空間では、原点中心のθ回転(反時計回りを正)の回転行列は、以下の形で表すことができる。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle R(\theta )=\begin{pmatrix} \cos \theta &-\sin \theta \\ \sin \theta &\cos \theta \\ \end{pmatrix} }
これは、原点中心にθ回転して点(x, y)が(x', y')に写る時、図形的考察または加法定理より、x', y'は以下のように表される。
構文解析に失敗 (SVG (ブラウザーのプラグインで MathML を有効にできます): サーバー「https://wikimedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle x' = x\cos \theta - y\sin \theta}
これを行列の積で表すと、以下のようになる。
逆の回転は、回転角が-θとなるだけなので、
となる。
また、回転行列には、行列の指数関数を用いた表示もある。
3次元の回転行列
各軸周りの回転
3次元空間でのx軸、y軸、z軸周りの回転を表す回転行列は、それぞれ以下の通りである。
回転の方向において、Rxはy軸をz軸に向ける方向、Ryはz軸をx軸に向ける方向、Rzはx軸をy軸に向ける方向である。
オイラー角
一般の回転行列も、これら3つの各軸周りの回転行列Rx、Ry、Rzの積により得ることができる。
例えば、以下の積は、yxz系で表したときのオイラー角がα、β、γであるような回転を表す。
スキュー (せん断)
四角形を平行四辺形に変形する処理をスキュー(せん断)と呼ぶ。

