# how to combine angle rotations along different axes into one rotation along a single vector [duplicate]

So, lets say I have some rotation a about the x-axis(vector:$(1, 0 ,0)$) and some other rotation about y-axis(vector $(0, 1, 0)$) and a rotation about the z-axis(vector: $(0,0,1)$). How would I combine these rotations so they have an equivalent rotation about a single vector?

## marked as duplicate by rschwieb, Davide Giraudo, user147263, Yiorgos S. Smyrlis, Rolf HoyerApr 29 '15 at 22:07

• You can find the combined rotation by matrix multiplication. The axis of rotation is then the $\lambda = 1$ eigenvector. – Omnomnomnom Apr 29 '15 at 19:30
• By searching "combine rotations," one of the top hits seems to be exactly what you're asking. Please try the search feature before posting. Steven Stadnicki's answer using quaternions is exactly what I'd do. – rschwieb Apr 29 '15 at 19:32

Rotations in 3D space can be represented by means of quaternions (see my answer here) with the representation $R_{\,\vec v,2\theta}(\vec y)= e^{\mathbf v\, \theta}\mathbf y e^{-\mathbf v\, \theta}$, were $\mathbf v$, $\mathbf y$ are the pure imaginary quaternions corresponding to the vectors $\vec v$ and $\vec y$.
$$R_{\,\vec i,2\alpha}\rightarrow e^{\mathbf i\, \alpha} \qquad R_{\,\vec j,2\beta}\rightarrow e^{\mathbf j\, \beta} \qquad R_{\,\vec k,2\gamma}\rightarrow e^{\mathbf k\, \gamma}$$
The product of the three rotations is not commutative, if we choose the order: $$R_{\,\vec k,2\gamma}R_{\,\vec j,2\beta}R_{\,\vec i,2\alpha}$$ than this corresponds to the quaternion $$e^{\mathbf k\, \gamma}e^{\mathbf j\, \beta}e^{\mathbf i\, \alpha}=\left( \cos \gamma + \mathbf k \dfrac{\sin \gamma}{\gamma}\right)\left( \cos \beta + \mathbf j \dfrac{\sin \beta}{\beta}\right)\left( \cos \alpha + \mathbf i \dfrac{\sin \alpha}{\alpha}\right)$$ performing this product you can put it in the form: $$\mathbf q=\cos \theta +\mathbf u \dfrac{\sin \theta}{\theta}= e^{\theta \mathbf u}$$ where $\mathbf u$ is the versor of the axis of rotation and $\theta$ is the angle.
Write them as $3 \times 3$ orthogonal matrices. Multiply the matrices. The find the real Jordan form of the product, and an orthogonal change of basis matrix which coverts the product into real Jordan form.