Let us consider vector bases $\mathcal{B\_0} = (a,b,c)$, $\mathcal{B\_1} = (i,j,k) $ and $\mathcal{B\_2} = (x,y,z)$ in $\mathbb{R}^3$, such that :

* $\mathcal{B\_1}$ is obtained by applying a rotation, defined by the matrix $R\_1$, to $\mathcal{B\_0}$
* $\mathcal{B\_2}$ is obtained by applying a rotation, defined by the matrix $R\_2$, to $\mathcal{B\_1}$

So we have :

* $i = R\_1 a$, $j = R\_1 b$ and $k = R\_1 c$
* $x = R\_2 i = R\_2 R\_1 a$, $y = R\_2 j = R\_2 R\_1 b$ and $z = R\_2 k = R\_2 R\_1 c$

Thus, the two successive rotations can be directly described by just one matrix $R\_3 = R\_2 R\_1$.

Now, introduce a vector $\mathbf{v}$, expressed as $\mathbf{v}\_0$ in $\mathcal{B\_0}$, $\mathbf{v}\_1$ in $\mathcal{B\_1}$ and $\mathbf{v}\_2$ in $\mathcal{B\_2}$.

By definition of a rotation matrix, the changes of basis from $\mathcal{B\_0}$ to $\mathcal{B\_1}$, and from $\mathcal{B\_1}$ to $\mathcal{B\_2}$ are expressed as :

* $v\_0 = R\_1 v\_1$
* $v\_1 = R\_2 v\_2$

So we have : $v\_0 = R\_1 R\_2 v\_2 = P\_0^2 v\_ 2$, where $P\_0^2$ allows to change from basis $\mathcal{B\_2}$ to basis $\mathcal{B\_1}$.

So, if we take $v = x$, we have $x\_2 = [1, 0, 0]^T$ and $x\_0 = R\_2 R\_1 a\_0$.

Since $a\_0 = [1, 0, 0]^T = x\_2$ $\implies$ $x\_0 = R\_2 R\_1 x\_2$ which is (obviously) different from $x\_0 = R\_1 R\_2 x\_2$

By definition of a rotation matrix, we should have $P\_0^2 = R\_3$, as for Euler angles rotation matrix. However the last line implies $P\_0^2 \neq R\_3$ as matrix product is not commutative. So where is the problem in my development ? Is it just that we do not compose change of basis like rotations ?