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

If I want to rotate a vector $V$ from coordinate system $A$ to $B$, I could use the rotation matrix by $V_B=R\cdot V_A$, where $R$ is the rotation matrix. There are many rotation sequences for $R$, such as $xyz$ and $yzy$. But after constructing those matrices, I found that different rotation sequence are not the same, e.q. $R_{xyz}V_A$ does not equal $R_{yay}V_B$, why is that? I thought if the Eulerian angles are the same, so the rotation matrix, no matter what rotation sequence it takes, should be the same. I know there is something wrong, could you please tell me where? Thanks!

share|cite|improve this question

You can rotate $(1,0,0)$ to $(0,1,0)$ by rotating a quarter-turn counterclockwise around the $z$-axis, or by rotating $(1,0,0)$ around the $y$-axis up to $(0,0,1)$ and then down around the $x$-axis to $(0,1,0)$. The first way, $(0,1,0)$ winds up at $(-1,0,0)$; the second way, it winds up at $(0,0,-1)$. So just knowing where one vector goes doesn't tell you where other vectors go.

share|cite|improve this answer
Neat and leading 1. +1 – Babak S. Feb 27 '13 at 16:28

Without seeing what the problem is, no, I can't tell you what it is. It is true that the rotation matrix from one coordinate system to another should be independent of how you describe the rotations. If you give the specifics of the rotation sequences we might be able to help.

share|cite|improve this answer
Thanks! Guys. Let me make an example. – Ray Feb 27 '13 at 14:45
The Euler angles between coordinate system A and B is angle = 0.8000 1.2000 0.2000 (rad) If we make the rotation matrix from xyz sequence, we have rotm1 = 0.3551 0.7937 -0.4939 -0.0720 0.5500 0.8321 0.9320 -0.2599 0.2525 and we also can have another matrix from yzy – Ray Feb 27 '13 at 14:49
sequence, which is rotm2 = 0.3551 0.7937 -0.4939 -0.0720 0.5500 0.8321 0.9320 -0.2599 0.2525 If we have one vector defined in coordinate system A, V_A= 0.9000 2.3000 -7.0000 Then V_Arotm1=[-6.3702, 3.7989, -0.2980], but V_Arotm2=[-6.6716, 0.3594, -3.2343], In the same coordinate system B, should they be the same? I want to have the same vector after rotation from different rotation matrix. Thanks! – Ray Feb 27 '13 at 14:55

$3$D rotations do not commute in general. Look up phenomena like Gimbal lock to see what can happen with Euler angles.

Also consider switching to representing your rotations by unit quaternions, you remove all the problems you get using Euler angles and they are very tidy.

share|cite|improve this answer

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.