# How does one create a rotation about a given axis in $R^{3}$ from rotations about the other axes?

I was told that you can rotate a vector about a given axis in Cartesian space by combining rotations about the other two axes. I found a quick method for 90 degree rotations but I'm unsure how to generalise it for arbitrary angles?

The method for 90 degree rotations: e.g. you want to rotate a vector by 90 deg about the y-axis, then you rotate 90 deg about z-axis, 90 deg about the x-axis and then -90 deg about the z-axis.

-
The 90 and -90 rotations around the z-axis in your example are bringing the y-axis in line with the x-axis, so just change the angle you rotate about x-axis to be whatever you wanted the angle to rotate around the y-axis to have been. –  Shard Jan 20 at 14:39
This seemed to do the trick. Thanks @Shard ! –  User 17670 Jan 20 at 15:00
add comment

## 1 Answer

In order to rotate by $\theta$ around some axis denoted by $\hat{u}=[u_{x},u_{y},u_{z}]$ you can construct the following $3\times3$ matrix, where $c_{\theta}=\cos{\theta}$ and $s_{\theta}=\sin{\theta}$:

$$\mathbf{R}_{\hat{u}}\triangleq\begin{bmatrix}c_{\theta}+u_{x}^{2}(1-c_{\theta}) & u_{x}u_{y}(1-c_{\theta})+u_{z}s_{\theta} & u_{x}u_{z}(1-c_{\theta})-u_{y}s_{\theta} \\ u_{x}u_{y}(1-c_{\theta})-u_{z}s_{\theta} & c_{\theta}+u_{y}^{2}(1-c_{\theta}) & u_{y}u_{z}(1-c_{\theta})+u_{x}s_{\theta} \\ u_{x}u_{z}(1-c_{\theta})+u_{y}s_{\theta} & u_{y}u_{z}(1-c_{\theta})-u_{x}s_{\theta} & c_{\theta}+u_{z}^{2}(1-c_{\theta})\end{bmatrix}$$

-
+1 What a nice result! –  B.S. Jan 20 at 14:43
While it is a very nice result, I'm not sure it actually answers the question in that the matrix $\bf{R_{\hat{u}}}$ would appear difficult to decompose. –  User 17670 Jan 20 at 14:59
add comment