2

When rotating a 3-dimensional coordinate system, we apply three rotation matrices $R_x, R_y,$ and $R_z$ which are to be multiplied by the primary point $(x,y,z)$ to get the new coordinates $(x',y',z')$. Does the order of the matrices matter? And how are they applied? (Say, $(x',y',z')=R_xR_yR_z(x,y,z)$.)

Thanks!

J.G.
  • 115,835
karparvar
  • 5,730
  • 1
  • 14
  • 36
  • 2
    Some of the ways to define a rotation involve three matrices like that. There are other ways to construct a rotation. If you use $R_x,$ $R_y,$ and $R_z$ then yes, the order matters, no, there is not a single "standard" way to do it. That's why you can go on some Web sites that explain Euler angles and be told there are $24$ different variations of the method. – David K Feb 12 '19 at 18:16
  • It seems silly to picture this as multiplying by three matrices. You can multiply the three matrices together into a single matrix, one which will do the right thing for any point you supply it. Yes, the order of those three matrices will matter. – rschwieb Feb 12 '19 at 19:23
  • Famously, the noncommutativity of 3D rotation can be described with quaternions. – J.G. Feb 12 '19 at 19:33
  • 1
    you might be interested to read this related post – G Cab Feb 12 '19 at 19:37
  • Try it out with some objects in front of you. Rotate around one axis and then another. Then try doing the same rotations in the opposite order. – Doug M Feb 12 '19 at 19:48

1 Answers1

4

In general, matrix multiplication is not commutative. Order matters. In particular, 3-D rotation matrices only commute when they have a common rotation axis.

You can perform a simple experiment yourself with only two rotations. Hold out the thumb and first two fingers of your right hand so that they’re approximately at right angles to each other. Rotate your hand around your index finger so that your thumb ends up where your middle finger was, and then rotate around your thumb so that your index finger ends up where your middle finger was after the first rotation. Take note of how you’re holding your hand after these maneuvers. Now perform those two rotations in the opposite order: rotate about your middle finger so that your thumb ends up where your index finger was, and then rotate about your thumb to to bring your middle finger to where your index finger was. Which way are you holding your hand now?

amd
  • 53,693