# How can I derive the rotation matrix from the axis-angle rotation vector?

Given an axis-angle rotation vector $$\Theta = (2,2,0)$$, after finding the unit vector $$k=(1/\sqrt{2}, 1/\sqrt{2}, 0)$$ and angle $$\theta = 2\sqrt{2}$$ representing the same rotation, I need to derive the rotation matrix $$R$$ representing the same rotation and to show, that the matrix is orthonormal. How can I do that?

The rotation matrix $$R_k(\theta)$$ associated with a given unit-length vector $$k$$ and angle $$\theta$$ is given by the following formula

$$\small{R_k(\theta) = \begin{bmatrix} \cos \theta +k_x^2 \left(1-\cos \theta\right) & k_x k_y \left(1-\cos \theta\right) - k_z \sin \theta & k_x k_z \left(1-\cos \theta\right) + k_y \sin \theta \\ k_y k_x \left(1-\cos \theta\right) + k_z \sin \theta & \cos \theta + k_y^2\left(1-\cos \theta\right) & k_y k_z \left(1-\cos \theta\right) - k_x \sin \theta \\ k_z k_x \left(1-\cos \theta\right) - k_y \sin \theta & k_z k_y \left(1-\cos \theta\right) + k_x \sin \theta & \cos \theta + k_z^2\left(1-\cos \theta\right) \end{bmatrix}}$$

So, to find your specific rotation matrix, you just need to substitute the values of your $$k$$ and $$\theta$$ in the above matrix.

The derivation of this matrix can be found in section 9.2 Rotation Matrix Derivation of the PhD thesis Modelling CPV (2015), by Ian R. Cole. The basic idea of the derivation follows the following steps

1. Rotate the given axis $$k$$ and the point $$p$$ (that you want to rotate) such that the axis $$k$$ lies in one of the coordinate planes: xy, yz or zx

2. Rotate the given axis $$k$$ and the point $$p$$ (that you want to rotate) such that the axis $$k$$ is aligned with one of the two coordinate axes for that particular coordinate plane: $$x$$, $$y$$ or $$z$$

3. Use one of the fundamental rotation matrix to rotate the point $$p$$ depending on the coordinate axis with which the rotation axis is aligned

4. Reverse rotate the axis-point pair such that it attains the final configuration as that was in step 2 (that is, you have to undo step 2)

5. Reverse rotate the axis-point pair which was done in step 1 (that is, you have to undo step 1)

To show that a matrix is orthonormal, you need to show that it is orthogonal (each row is independent of any other row and each column is independent of any other column) and that the length of each row (and column) is 1. Equivalently, a square matrix $$Q$$ is orthogonal if and only if

$$Q^TQ = QQ^T = I$$

where $$Q^T$$ is the transpose of $$Q$$ and $$I$$ is the identity matrix. If you are really stuck, have a look at this proof https://math.stackexchange.com/a/537248/168764 (and this other answer https://math.stackexchange.com/a/156742/168764), but, at this point, it should just be a matter of replacing $$R_k(\theta)$$ in the equation above and check that the equation holds.