# Why are rotational matrices not commutative?

Is there any intuition why rotational matrices are not commutative? I assume the final rotation is the combination of all rotations. Then how does it matter in which order the rotations are applied?

• I can only guess what your second sentence means. $\qquad$ – Michael Hardy Nov 16 '16 at 15:59
• Two rotations in the plane are indeed commutative. However two rotations in 3d space are not commutative. – vadim123 Nov 16 '16 at 16:01
• It might help to pick up a die and try rotating it in different directions. It helped me greatly. – Riccardo Orlando Nov 16 '16 at 16:02
• I always find these “why do $XYZ$ not have property $PQR$” kind of questions strange. Why would rotations be commutative? Ab initio, there's no reason to assume any sort of mapping to be commutative. Certain mappings, like 2D rotations, happen to have this property; that's then surprising and warrants questions as to the intuition behind it. But by default, I'd always assume that any property you could ask for is not fulfilled by a given object. – leftaroundabout Nov 16 '16 at 17:32
• Find a bed. Stand at the foot of the bed. Fall forward onto the bed and then turn 90 degrees to your left.. Now stand at the foot of the bed again. Turn 90 degrees to your left and fall forward onto the floor. You made the same two rotations in two different orders, so why didn't you end up in the same place? – Eric Lippert Nov 17 '16 at 7:18

Here is a picture of a die:

Now let's spin it $90^\circ$ clockwise. The die now shows

After that, if we flip the left face up, the die lands at

Now, let's do it the other way around: We start with the die in the same position:

Flip the left face up:

and then $90^\circ$ clockwise

If we do it one way, we end up with $3$ on the top and $5, 6$ facing us, while if we do it the other way we end up with $2$ on the top and $1, 3$ facing us. This demonstrates that the two rotations do not commute.

Since so many in the comments have come to the conclusion that this is not a complete answer, here are a few more thoughts:

• Note what happens to the top number of the die: In the first case we change what number is on the left face, then flip the new left face to the top. In the second case we first flip the old left face to the top, and then change what is on the left face. This makes two different numbers face up.
• As leftaroundabout said in a comment to the question itself, rotations not commuting is not really anything noteworthy. The fact that they do commute in two dimensions is notable, but asking why they do not commute in general is not very fruitful apart from a concrete demonstration.
• I've always used a book as an example, but I think a die is way better. $+1$! – Cameron Williams Nov 16 '16 at 16:21
• Very nice and insightful. – StubbornAtom Nov 16 '16 at 17:52
• A Rubik's cube also works well. – Hans Lundmark Nov 17 '16 at 11:20
• I have no idea really why this answer was accepted. It does not answer the question of Why this happens, it only confirms that it happens. The question clearly suggests that the OP knows that it happens. – AnoE Nov 20 '16 at 10:32
• I also think that the accepted answer does not contain an answer. – Narasimham Nov 20 '16 at 15:50

Matrices commute if they preserve each others' eigenspaces: there is a set of eigenvectors that, taken together, describe all the eigenspaces of both matrices, in possibly varying partitions.

This makes intuitive sense: this constraint means that a vector in one matrix's eigenspace won't leave that eigenspace when the other is applied, and so the original matrix's transformation still works fine on it.

In two dimensions, no matter what, the eigenvectors of a rotation matrix are $[i,1]$ and $[-i,1]$. So since all such matrices have the same eigenvectors, they will commute.

But in three dimensions, there's always one real eigenvalue for a real matrix such as a rotation matrix, so that eigenvalue has a real eigenvector associated with it: the axis of rotation. But this eigenvector doesn't share values with the rest of the eigenvectors for the rotation matrix (because the other two are necessarily complex)! So the axis is an eigenspace of dimension 1, so rotations with different axes can't possibly share eigenvectors, so they cannot commute.

• I like this answer. Unlike the highest voted one (which, at the time of writing, has nearly 100 votes), which merely illustrates that 3D rotations are indeed non-commutative, this answer at least attempts to explain why they are non-commutative from a higher perspective. In fact, as opposed to the OP's claim, rotation matrices are commutative --- provided that we are talking about rotations on the $xy$-plane, and that's exactly because all those rotations share a common axis (the $z$-axis). 3D rotations have different axes and hence they are not commutative. – user1551 Nov 19 '16 at 9:27
• This answer gives a clear geometrical reason. – vesszabo Nov 22 '16 at 21:30
• it's not very intuitive however, someone must a lot of know.. – Widawensen Nov 25 '16 at 18:48
• @Widawensen It's really intuitive if you watch this video first. – Neil G Dec 13 '16 at 7:17
• @user1551 Lately I have discovered one thing, excuse me that I have some doubts about the last statement in the answer and returned to it. According to the last statement it is not possible to commute for matrices with different axes? But there is at least one case of commutation for matrices with different axes - take two matrices of rotations by $\pi$ about axes, say, $x$ and $y$ respectively. If we write down explicit forms of these matrices we see that they are both diagonal so they have to commute. – Widawensen Jan 11 at 9:48

In 3D space why they are not commutative?

Because you can exhibit two rotations $a,b$ such that $a\circ b\neq b\circ a$.

Take, for example, $a$ to be a rotation of $90$ degrees counterclockwise around the $x$ axis and $b$ to be a rotation of $90$ degrees counterclockwise around the $y$ axis.

Doing $a\circ b$ maps the $x$ axis onto the $y$ axis, but $b\circ a$ maps the $x$-axis onto the $z$ axis.

• This answers, like others, also just says that it happens, not why. The first sentence translates the informal question into the mathematical definition of commutativeness, the second is an example. – AnoE Nov 20 '16 at 10:34
• @AnoE and there's a reason for what you're seeing across the board: there isn't much else you do. Consider: given some random nonabelian group, someone asks "why is it nonabelian?" Well? Where's the deep explanation? The slight difference here is that it involves a group we have a lot of geometric experience with, and so maybe the eigenvalue answer is another good explanation. – rschwieb Nov 20 '16 at 12:01

Here is a pictorial explanation equivalent to Arthur's answer:

Consider the group of permutations of 3 objects in a line as generated by two 'rotations' $r,s$, where $r$ swaps the first two in the line and $s$ swaps the last two in the line.

$r(1,2,3) = (2,1,3)$.

$s(1,2,3) = (1,3,2)$.

Note that $rs \ne sr$ since:

$rs(1,2,3) = (3,1,2)$.

$sr(1,2,3) = (2,3,1)$.

Now you may ask, what has this got to do with 'real rotations' in space? In fact this is precisely the same phenomenon as the dice example given by Arthur. The 3 objects are the 3 orthogonal (undirected) axes that are perpendicular to the faces, and the two rotations mentioned indeed swap different pairs of axes!

• Just to be clear: this is an analysis of the axes of my die without signs / direction. You could include signs and make it $r(1, 2, 3) = (-2, 1, 3)$ and $s(1, 2, 3) = (1, 3, -2)$. You would get something that is more directly relatable to a die. That doesn't change your analysis, though. – Arthur Nov 17 '16 at 9:02
• @Arthur: Yeap that's why I wrote "undirected". Indeed one could use sign to indicate direction, or simply change to permutation of 6 axes/faces, as you say, but I wanted to give the simplest possible group representation of the visual analysis. One can learn a lot from a simple cube. =) – user21820 Nov 17 '16 at 9:05
• @user21820 I like your argumentation. However it would be clearer if you presented the whole table for all cases not only (1,2,3) ( although you defined it with the words) – Widawensen Nov 25 '16 at 18:44
• @Widawensen: Yea I should have used "a,b,c" instead of "1,2,3" in the first orange box, but never mind I think it's clear enough anyway. =) – user21820 Nov 26 '16 at 1:29
• @user21820 .. and one more remark.. permutations are illustrations of rotations about current axes, not fixed axes ..am I right ? If so is it possible to use them also for fixed axes..? – Widawensen Nov 26 '16 at 4:01

Picture the $x$-, $y$-, and $z$-axes in the positions in which they are conventionally drawn.

Rotate a cube $90^\circ$ counterclockwise with the $x$-axis as the axis of rotation.

Then rotate it $90^\circ$ counterclockwise with the $y$-axis as the axis of rotation.

After those two rotations, the $x$-axis now points in the negative-$z$ direction, the $z$-axis in the negative-$y$ direction, and the $y$-axis in the positive-$x$ direction.

Now do the same two rotations in the opposite order. You'll get a different result.

Here it is essential that the two axes about which we rotated were different. Rotations in $3$-dimensional space that are both about the same axis commute with each other.

Imagine yourself walking a narrow bridge across a deep canyon. You stop and rotate face down onto the bridge, then rotate on your side to watch the beautiful sunset at the far end of the valley. By that time, however, someone who would have done the very same rotations, only in the opposite order, would be lying face down at the bottom of the canyon.

• I'm not sure whether you mean the 'very same rotations' relative to your body, or relative to the landscape? – jwg Nov 18 '16 at 15:48
• @jwg You can think of it either way. In the end the only difference is which side of the bridge one falls off of. – dxiv Nov 18 '16 at 17:48

Rotations in 3d are non commutative because rotation changes direction of every potential other axis except itself (unlike in 2d where it is nothing to change because it is only one "axis" of rotation - it can be reduced in 3D to rotation about Z axis ).

Denote succession of rotations about Z-axis as $$Z_1, Z_2,... Z_n$$ (it's convenient to imagine that there is multitude of them by a small angular increment let's say $$1^\circ$$ or $$2^\circ$$ ) and one rotation about different axis $$X$$ ( it can be also not very big). When we have only rotations $$..Z_j...$$ we can change order of rotations in any way - the result will be the same.

But if we insert rotation $$\mathbf{X}$$ somewhere into middle of rotations succession $$Z_1,{Z_2}...{Z_n}$$ the final result $$Z_1,{z_2}...{Z_j}{\mathbf{X}} {Z_k}...{Z_n}$$ now depends on which place we inserted it because inserting it means that we are changing current axis of rotations for all successive rotations Z - the current Z axis, after this operation, is changed in the global frame.

It could be seen the other effect of inserting X rotation into different places of succession of $$Z_i$$ if we would track the end of X versor (vector $$i$$) :

• If this X rotation is made at the beginning the plane XY constant in current frame for Z rotations is changed and the endpoint of X axis is distancing itself from original XY plane with every successive incremental rotation about changed now Z-axis.
• If it would be made at the end, the distance from original XY plane still would be equal $$0$$ !

As the versors $$i,j,k$$ after whole linear operation represents the resulting matrix we clearly see that these two operations are quite different. Graphically one can imagine this track of the endpoint of $$X$$ versor on the surface of the unit sphere.

The simplest alternative presentation of non-commutativity in 3D (approach here is more algebraic than geometric as previous one) can be made using axis unit vector $$v_1$$ of rotation, say, $$R_1$$.

($$R_2$$, we assume, has different axis with vector $$v_2 \ne v_1$$ and moreover we assume $$R_2(v_1) \ne -v_1$$ which together with $$R_2(v_1) \ne v_1$$ states that transformed by $$R_2$$ vector $$v_1$$ is not lying in the axis of $$R_1$$).

Apply it to $$R_2R_1(v_1)=R_2(v_1) = v_{21}$$. (Obviously $$v_{21} \ne v_1$$).

In reverse order $$R_1R_2(v_1)=R_1(v_{21} )$$.
But $$v_{21}$$ is not lying in the axis of $$R_1$$ !
Hence the result must be different than $$v_{21}$$ and $$R_1R_2 \ne R_2R_1$$.

They commute only if they share common axis or in the case of different axes they preserve each other axes with result vector changing sign i.e. $$R_2(v_1)=-v_1$$ and $$R_1(v_2)=-v_2$$ what is possible when $$v_1$$ is orthogonal to $$v_2$$ and rotations are by $$\pi$$ angle.

• I will add in comment some short proof of orthogonality for vectors $v$ and $u$ (which is related to discussed above problem) in the case when we have $Rv=v$ and $Ru=-u$. Calculating $v^Tu$ we obtain $v^Tu= (Rv)^T(-Ru)=-v^TR^TRu=-v^Tu$, hence $v^Tu=0$. – Widawensen Jan 11 at 10:58

## protected by J. M. is a poor mathematicianMar 26 at 23:43

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).