29.23 회전 행렬(Rotation Matrix)의 구성과 2차원/3차원 회전 표현
1. 회전 행렬의 일반적 정의
**회전 행렬(rotation matrix)**이란 행렬식이 +1인 직교 행렬이다. 즉, n \times n 실수 행렬 R이 회전 행렬일 조건은
R^T R = I_n, \quad \det R = +1
이다. 회전 행렬의 전체 집합은 특수 직교군(special orthogonal group) SO(n)을 이루며, 이는 방향(orientation)을 보존하는 등거리 선형 변환의 군이다.
2. 차원 회전 행렬
2.1 유도
\mathbb{R}^2에서 원점을 중심으로 반시계 방향으로 각도 \theta만큼 회전하는 변환 R_\theta를 고려하라. 표준 기저 벡터의 상을 구하면
R_\theta(e_1) = R_\theta\begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} \cos\theta \\ \sin\theta \end{pmatrix}
R_\theta(e_2) = R_\theta\begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} -\sin\theta \\ \cos\theta \end{pmatrix}
이 상을 열벡터로 배치하면 2차원 회전 행렬을 얻는다.
R(\theta) = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}
2.2 직교성 검증
R(\theta)^T R(\theta) = \begin{pmatrix} \cos\theta & \sin\theta \\ -\sin\theta & \cos\theta \end{pmatrix}\begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}
\det R(\theta) = \cos^2\theta + \sin^2\theta = 1. \checkmark
2.3 차원 회전 행렬의 성질
합성(덧셈 공식). 두 회전의 합성은 각도의 합에 대응한다.
R(\alpha) R(\beta) = R(\alpha + \beta)
증명.
R(\alpha)R(\beta) = \begin{pmatrix} \cos\alpha\cos\beta - \sin\alpha\sin\beta & -\cos\alpha\sin\beta - \sin\alpha\cos\beta \\ \sin\alpha\cos\beta + \cos\alpha\sin\beta & -\sin\alpha\sin\beta + \cos\alpha\cos\beta \end{pmatrix} = \begin{pmatrix} \cos(\alpha+\beta) & -\sin(\alpha+\beta) \\ \sin(\alpha+\beta) & \cos(\alpha+\beta) \end{pmatrix}
삼각함수의 덧셈 정리를 사용하였다. \blacksquare
이 결과는 SO(2)가 가환군(abelian group)임을 보여준다.
역행렬.
R(\theta)^{-1} = R(\theta)^T = R(-\theta)
각도 \theta의 회전의 역변환은 각도 -\theta의 회전이다.
고유값. 특성 다항식은
\det(\lambda I - R(\theta)) = \lambda^2 - 2\cos\theta \cdot \lambda + 1 = 0
고유값: \lambda = \cos\theta \pm i\sin\theta = e^{\pm i\theta}
\theta \neq 0, \pi이면 실수 고유값이 존재하지 않는다. 이는 0이 아닌 회전이 어떤 방향도 고정시키지 않는다는 기하학적 사실과 부합한다.
3. 차원 회전 행렬
3.1 좌표축 중심 회전
\mathbb{R}^3에서 세 좌표축 각각을 중심으로 하는 기본 회전 행렬(elementary rotation matrix)은 다음과 같다.
x축 중심 회전 (R_x(\theta)):
R_x(\theta) = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos\theta & -\sin\theta \\ 0 & \sin\theta & \cos\theta \end{pmatrix}
y축 중심 회전 (R_y(\theta)):
R_y(\theta) = \begin{pmatrix} \cos\theta & 0 & \sin\theta \\ 0 & 1 & 0 \\ -\sin\theta & 0 & \cos\theta \end{pmatrix}
z축 중심 회전 (R_z(\theta)):
R_z(\theta) = \begin{pmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{pmatrix}
각 행렬에서 회전축에 대응하는 행과 열은 항등 행렬의 행/열과 동일하며, 나머지 2 \times 2 부분 행렬이 해당 평면에서의 회전을 나타낸다.
3.2 오일러 정리(Euler’s Rotation Theorem)
정리. \mathbb{R}^3에서의 임의의 회전(원점을 고정하는 방향 보존 등거리 변환)은 원점을 지나는 어떤 축을 중심으로 하는 단일 회전으로 표현된다.
이 정리는 모든 R \in SO(3)가 고유값 \lambda = 1에 대응하는 고유벡터를 갖는다는 사실로부터 증명된다. \det R = 1이고 고유값의 곱이 1이므로, 복소 고유값 쌍 e^{\pm i\theta}와 실수 고유값 1이 존재한다. 고유값 1에 대응하는 고유벡터가 회전축의 방향이다.
3.3 임의의 축에 대한 회전: 로드리게스 회전 공식
단위 벡터 \hat{n} = (n_1, n_2, n_3)^T (\|\hat{n}\| = 1)를 축으로 하여 각도 \theta만큼 회전하는 행렬은 **로드리게스 회전 공식(Rodrigues’ rotation formula)**으로 주어진다.
R(\hat{n}, \theta) = I\cos\theta + (1 - \cos\theta)\hat{n}\hat{n}^T + \sin\theta [\hat{n}]_\times
여기서 [\hat{n}]_\times는 \hat{n}의 **반대칭 행렬(skew-symmetric matrix)**이다.
[\hat{n}]_\times = \begin{pmatrix} 0 & -n_3 & n_2 \\ n_3 & 0 & -n_1 \\ -n_2 & n_1 & 0 \end{pmatrix}
이 행렬은 벡터곱(cross product) \hat{n} \times v = [\hat{n}]_\times v를 행렬-벡터 곱으로 표현한다.
3.4 로드리게스 공식의 성분별 표현
R(\hat{n}, \theta) = \begin{pmatrix} \cos\theta + n_1^2(1-\cos\theta) & n_1 n_2(1-\cos\theta) - n_3\sin\theta & n_1 n_3(1-\cos\theta) + n_2\sin\theta \\ n_2 n_1(1-\cos\theta) + n_3\sin\theta & \cos\theta + n_2^2(1-\cos\theta) & n_2 n_3(1-\cos\theta) - n_1\sin\theta \\ n_3 n_1(1-\cos\theta) - n_2\sin\theta & n_3 n_2(1-\cos\theta) + n_1\sin\theta & \cos\theta + n_3^2(1-\cos\theta) \end{pmatrix}
3.5 로드리게스 공식의 유도
벡터 v의 회전을 기하학적으로 분해한다. v를 회전축 \hat{n}에 평행한 성분 v_\parallel과 수직인 성분 v_\perp로 분해하면
v_\parallel = (\hat{n}^T v)\hat{n} = (\hat{n}\hat{n}^T)v, \quad v_\perp = v - v_\parallel
v_\parallel은 회전축 위에 있으므로 회전에 의해 불변이다. v_\perp는 축에 수직인 평면에서 각도 \theta만큼 회전한다. 이 평면에서 v_\perp에 직교하는 벡터는
w = \hat{n} \times v = [\hat{n}]_\times v
이며, \|w\| = \|v_\perp\|이다. 따라서 회전된 v_\perp는
v_\perp' = v_\perp \cos\theta + w \sin\theta
전체 회전 결과는
R v = v_\parallel + v_\perp' = (\hat{n}\hat{n}^T)v + (v - \hat{n}\hat{n}^T v)\cos\theta + (\hat{n} \times v)\sin\theta
= v\cos\theta + (1-\cos\theta)(\hat{n}\hat{n}^T)v + \sin\theta [\hat{n}]_\times v
이를 행렬 형태로 정리하면 로드리게스 공식을 얻는다. \blacksquare
4. 차원 회전의 합성과 비교환성
4.1 오일러 각(Euler Angles)
임의의 3차원 회전은 세 좌표축에 대한 기본 회전의 합성으로 표현할 수 있다. 오일러 각(Euler angles) (\phi, \theta, \psi)에 의한 표현은
R = R_z(\phi) R_y(\theta) R_z(\psi)
또는 다른 관례에 따라 축의 순서가 달라질 수 있다. 항공학에서 널리 사용되는 롤-피치-요(roll-pitch-yaw) 표현은
R = R_z(\psi) R_y(\theta) R_x(\phi)
이다.
4.2 비교환성
SO(3)는 비가환군(non-abelian group)이다. 일반적으로 R_x(\alpha) R_y(\beta) \neq R_y(\beta) R_x(\alpha)이다.
구체적 예시. \alpha = \beta = \frac{\pi}{2}로 두면
R_x\left(\frac{\pi}{2}\right) R_y\left(\frac{\pi}{2}\right) = \begin{pmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{pmatrix}
R_y\left(\frac{\pi}{2}\right) R_x\left(\frac{\pi}{2}\right) = \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & -1 \\ -1 & 0 & 0 \end{pmatrix}
두 결과가 상이하다. 이 비교환성은 3차원 회전의 본질적 성질이며, SO(2)의 가환성과 대비된다.
5. 회전 행렬의 지수 사상 표현
반대칭 행렬(skew-symmetric matrix) \Omega \in \mathfrak{so}(3) (\Omega^T = -\Omega)에 대하여, 행렬 지수함수(matrix exponential)
R = e^\Omega = \sum_{k=0}^{\infty} \frac{\Omega^k}{k!}
는 회전 행렬을 생성한다. \Omega = \theta [\hat{n}]_\times로 두면 e^\Omega은 축 \hat{n}, 각도 \theta의 회전 행렬과 일치하며, 이는 로드리게스 공식의 또 다른 표현이다.
증명의 핵심. [\hat{n}]_\times^3 = -[\hat{n}]_\times라는 관계식을 이용하면 급수를 닫힌 형태로 합산할 수 있다.
e^{\theta[\hat{n}]_\times} = I + \sin\theta [\hat{n}]_\times + (1-\cos\theta)[\hat{n}]_\times^2
[\hat{n}]_\times^2 = \hat{n}\hat{n}^T - I이므로 이는 로드리게스 공식과 동일하다. \blacksquare
이 지수 사상은 리 군(Lie group) SO(3)와 리 대수(Lie algebra) \mathfrak{so}(3) 사이의 대응을 구현하며, 회전의 미소 변화와 무한소 생성자를 다루는 이론적 기반을 제공한다.
6. 짐벌 락(Gimbal Lock) 현상
오일러 각 표현에는 **짐벌 락(gimbal lock)**이라는 특이점(singularity)이 존재한다. 특정 각도 조합(예: 피치 각 \theta = \pm\frac{\pi}{2})에서 두 회전축이 정렬되어 자유도가 하나 감소하는 현상이다.
이 문제를 해결하기 위해 사원수(quaternion) 표현이 사용되며, 사원수는 짐벌 락 없이 3차원 회전을 4개의 매개변수로 표현한다. 단위 사원수 q = (w, x, y, z) (w^2 + x^2 + y^2 + z^2 = 1)에 대응하는 회전 행렬은
R = \begin{pmatrix} 1 - 2(y^2+z^2) & 2(xy-wz) & 2(xz+wy) \\ 2(xy+wz) & 1-2(x^2+z^2) & 2(yz-wx) \\ 2(xz-wy) & 2(yz+wx) & 1-2(x^2+y^2) \end{pmatrix}
이다.