The transforms only cancel and become the identity when they''re right next to each other, like RTR = I. If there''s a transform in between, it doesn''t work like that.
Here''s one way to visualize it. Take a coffee mug, and set it so that handle is pointing towards you. Rotate it around its vertical axis 90 degrees clockwise, so the handle is pointing to the left. Now tip it forward 90 degrees, so that the bottom is facing you. Now rotate it counterclockwise around its new vertical axis 90 degrees, so the handle is pointing towards you. You should get a coffee mug on its side, with the handle pointing towards you, and the bottom on the right. This is equivalent to
R0-1R1R0
Doing just R1 is tipping the mug forward 90 degrees, so you have a cup on its side with the handle pointing up and the bottom towards you.
The reason this happens is because the middle transform changes the axes. So you can''t undo the rotation by using the inverse of the original transform.
(I like using coffee mugs for this sort of thing because they''re a convenient desk object that''s asymmetrical.)
Jim Van Verth
Essential Math for Games