2차원
$R(\theta)=\begin{bmatrix} cos\theta & -sin\theta \\sin\theta & cos\theta \end{bmatrix}$
3차원
$R_n=\begin{bmatrix} c+(1-c)x^2 & (1-c)xy+sz & (1-c)xz-sy \\ (1-c)xy-sz & c+(1-c)y^2 & (1-c)yz+sx \\ (1-c)xz+sy & (1-c)yz-sx & c+(1-c)z^2\end{bmatrix}$
$c=cos\theta, s=sin\theta$
회전축이 정해져 있다면 아래와 같다.
$R_x(\theta)=\begin{bmatrix} 1 & 0 & 0 \\ 0 & cos\theta & -sin\theta \\ 0 & sin\theta & cos\theta \end{bmatrix}$
$R_y(\theta)=\begin{bmatrix} cos\theta & 0 & sin\theta \\ 0 & 1 & 0 \\ -sin\theta & 0 & cos\theta \end{bmatrix}$
$R_z(\theta)=\begin{bmatrix} cos\theta & -sin\theta & 0 \\ sin\theta & cos\theta & 0 \\ 0 & 0 & 1 \end{bmatrix}$
축의 +, - 에 따라 회전 방향이 달라진다.