線型代数において、回転行列(かいてんぎょうれつ、英: rotation matrix)とは、ユークリッド空間内における原点中心の回転変換の表現行列のことである。
2次元や3次元の回転は、幾何学、物理学、コンピュータグラフィックスの分野での計算に非常によく使われている。大半の応用で扱うのはこのふたつの場合だが、一般の次元でも回転行列を定義することができる。
n 次元空間における回転行列は、実数を成分とする正方行列であって、行列式が 1 の n 次直交行列として特徴づけられる:

n 次元の回転行列の全体は特殊直交群(あるいは回転群)と呼ばれる群をなす。
2次元ユークリッド空間では、原点中心の θ 回転(反時計回りを正とする)の回転行列は、以下の形で表すことができる。

なぜならば、原点中心に θ 回転して点 (x, y) が (x ', y ') に写るとすると、図形的考察または三角関数の加法定理より、x ', y ' は以下のように表されることが分かる。


このことを行列の積で表すと、

となるからである。
逆の回転は、回転角が −θ になるだけなので、

となる。
また回転行列には行列の指数関数を用いた表示

もある。
3次元空間でのx軸、y軸、z軸周りの回転を表す回転行列は、それぞれ次の通りである:



ここで回転の方向は、
はy軸をz軸に向ける方向、
はz軸をx軸に向ける方向、
はx軸をy軸に向ける方向である。
一般の回転行列も、これら3つの各軸周りの回転行列
の積によって得ることができる[1]。
例えば、次の積

は、yxz系で表したときのオイラー角が α, β, γ であるような回転を表す。
任意の回転行列は、ある軸
まわりの角度
の回転という形に表示できる(オイラーの定理 (剛体) (英語版))[2]。このような回転行列はロドリゲスの回転公式により

と表示できる[3]。また、任意のベクトル
へのその作用は

と書ける[4][注釈 1]。
フェリックス・クラインによって考案されたケーリー・クラインのパラメータは、回転行列を4つの複素数
,
,
,
(ただし
,
を満たすものとする)を用いて

と表示するものである[5]。
- ^ ここでは角度
は右手の法則に従って選んでおり、Goldstein, Poole & Safko とは反対である。
- ^ Goldstein, Poole & Safko, pp. 151-154.
- ^ Goldstein, Poole & Safko, p. 156.
- ^ “Rodrigues' Rotation Formula”. Wolfram MathWorld. 2020年12月8日閲覧。
- ^ Goldstein, Poole & Safko, p. 162.
- ^ Goldstein, Poole & Safko, pp. 154-155.
- Goldstein, Herbert; Poole, Charles; Safko, John (2001). Classical Mechanics (third ed.). Pearson. ISBN 978-0201657029