Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a vector, which I rotated with respect to $x$, $y$ and $z$ axes, respectively.

Now I want to recover this operation, that means I want to bring it to the previous position by rotating it with $-\theta$, $-\alpha$ and $-\beta$, where $\theta$, $\alpha$ and $\beta$ are the amounts of initial rotation, in radians/degrees.

I tried to do it by computing the dot product of this vector with axis vectors ($(1,0,0)$ for $x$-axis, $(0,1,0)$ for $y$-axis and $(0,0,1)$ for $z$-axis).

However, this did not produce the right result possibly because It was rotated in 3d, thus the dot product was resulting in a different value that it should be.

What I should do in order to perform this operation? Thanks.

share|cite|improve this question
do you mean you rotated using Euler angles? or did you rotate around the fixed axes? – nbubis Aug 15 '12 at 7:03
I'm not really sure what you're asking. Do you mean that you know the position $x$ of your point before rotating, the position $x'$ of the point after rotating, and then you want to find the angles $\theta,\alpha,\beta$ such that $x'$ gets send back to $x$? Or do you already know $\theta, \alpha,\beta$ and you just want to know how to use these to create a rotation that sends $x'$ back to $x$? – Lieven Aug 15 '12 at 7:12
@Lieven The latter one. I know $\theta$,$\alpha$ and $\beta$, and I want to find the rotation that sends $x'$ back to $x$. – user13791 Aug 15 '12 at 8:00
@nbubis using Euler angles. – user13791 Aug 15 '12 at 8:31
As @nbubis mentioned, Euler angles is what you are looking for. – Sait Aug 15 '12 at 8:34

If you used Euler angles, simply multiply your vector by the rotation matrices in reverse order. If you used $\alpha$ around $\hat{x}$, then $\beta$ around $\hat{y}$, and finally $\gamma$ around $\hat{z}$ to get at a vector $v$, then the original vector $v_0$ is given by: $$v_0 = Z(-\gamma)Y(-\beta)X(-\alpha)v$$ Where $X,Y,Z$ are the rotation matrices.

share|cite|improve this answer
More at Rotation Matrix. – Frenzy Li Aug 15 '12 at 10:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.