In 3 dimensions, a rotation can be characterized by a roll (an $\alpha$ degree rotation around the $x$ axis), pitch (a $\beta$ degree rotation around the $y$ axis), and a yaw (a $\gamma$ degree rotation around the $z$ axis), say in that order. (Let's call roll, pitch, and yaw the different 'modes' of rotation.) Therefore we can express the total rotation $R = R_\alpha * P_\beta * Y_\gamma$ where each is a rotation matrix that I don't want to write out here. We can bash out what this matrix product evaluates to (it's not that difficult), and we find that its trace is $tr(R) = \cos{\alpha} \cos{\beta} + \cos{\beta} \cos{\gamma} + \cos{\gamma}\cos{\alpha} + \sin{\alpha} \sin{\beta} \sin{\gamma}$.

Alternatively, we can characterize $R$ by an axis-of-rotation which it leaves fixed and the angle that everything else gets rotated by (around the axis-of-rotation). This is Euler's Rotation Theorem. Therefore, if we let $T$ be any rotation (there are many) that brings the axis-of-rotation to the x-y axis, and then $S_\theta$ a rotation around the x-y axis by the angle theta (ie. the matrix $\begin{pmatrix}\cos{\theta} & -\sin{\theta} & 0 \\ \sin{\theta} & \cos{\theta} & 0 \\ 0 & 0 & 1\end{pmatrix}$), we can write $R = T S_\theta T^{-1}$. Taking the trace, we get $tr(R) = tr(T S_\theta T^{-1}) = tr(T^{-1} T S_\theta) = tr(S_\theta) = 1 + 2\cos{\theta}$ where we use the following trace property:

Cyclic Permutation Property of Trace (or just the "Trace Property"). For three square matrices $A,B,C$, we have $tr(ABC) = tr(CAB) = tr(BCA) := x$. (Thus we also have $tr(BAC) = tr(ACB) = tr(CBA) :=y$; but $x \ne y$ in general.) Note that $CAB, BCA$ are cyclic permutations of $ABC$, hence the name of the property.

Therefore, we have $1 + 2\cos\theta = \cos{\alpha} \cos{\beta} + \cos{\beta} \cos{\gamma} + \cos{\gamma}\cos{\alpha} + \sin{\alpha} \sin{\beta} \sin{\gamma}$. It is interesting that this expression is symmetric in the variables $\alpha, \beta, \gamma$.

This means that if we exchange the angles of in any of the 3!=6 ways (while keeping the modes in the same order), we obtain rotations that still have the same angle of rotation (but possibly different axes). Call this the "Angle Permutation Property". The Trace Property above also implies the same with the 3 cyclic permutations of the modes of rotation - call that the "Mode Cyclic Permutation Property". Combining the 6 permutations of the angles ($\alpha, \beta, \gamma$) with the 3 cyclic permutations of the modes, we have found a set of 18 related rotations all of which have the same angle of rotation (but possibly different axes).

Is there a geometric argument for the truth of the Angle Permutation Property? of the Mode Cyclic Permutation Property (for which a geometric argument for the Trace Property suffices)? Are their axes related in a similar way as well? What is the geometric significance of this equivalence of these 18 rotations?

By the way, assuming $\alpha, \beta, \gamma$ are all small, we obtain $\theta^2 \approx \alpha^2 + \beta^2 + \gamma^2 (+\alpha\beta\gamma)$, which perhaps makes sense because the three rotations are in some vague sense "orthogonal" (which sense?) but is perhaps surprising given that the surface of the sphere has only two dimensions, not three!

  • 1
    $\begingroup$ This may be related to the 1-parameter group of rotations associated to each axis. The composition of rotations corresponds to the Lie bracket of their infinitesimal generators (angular velocity vectors), and this may have something to do with Jacobi identity (cyclic permutation of Lie brackets is zero), but I'm too tired to explore this line of thought. $\endgroup$
    – Compacto
    Feb 17, 2022 at 14:03
  • $\begingroup$ It’s not a surprise that the space of rotations is three-dimensional, since a rotation can be described by an axis (two degrees of freedom) and an angle (one degree). $\endgroup$ Feb 17, 2022 at 22:26

2 Answers 2


If $A$ is a rotation by angle $θ$ about $\vec v$, and $B$ is a rotation, then the conjugate $BAB^{-1}$ is a rotation by the same angle $θ$ about $B\vec v$. This one fact lets us establish both properties without any trigonometry.

Mode Cyclic Permutation Property

Let $C = \left[\begin{smallmatrix}0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0\end{smallmatrix}\right]$ be the rotation by $\frac{2π}{3}$ about $(1, 1, 1)$. Then $R_α P_β Y_γ$ has the same angle as

\begin{gather*} C(R_αP_βY_γ)C^{-1} = (CR_αC^{-1})(CP_βC^{-1})(CY_γC^{-1}) = P_αY_βR_γ, \\ C^{-1}(R_αP_βY_γ)C = (C^{-1}R_αC)(C^{-1}P_βC)(C^{-1}Y_γC) = Y_αR_βP_γ. \end{gather*}

Angle Permutation Property

$R_αP_βY_γ$ has the same angle as $R_{-α}(R_αP_βY_γ)R_α = P_βY_γR_α$, which has the same angle as $R_βP_γY_α$ by MCPP.

Also, $R_αP_βY_γ$ has the same angle as

\begin{gather*} P_π(R_αP_βY_γ)P_π = (P_πR_αP_π)(P_πP_βP_π)(P_πY_γP_π) = R_{-α}P_βY_{-γ}, \\ Y_{π/2}(R_{-α}P_βY_{-γ})Y_{-π/2} = (Y_{π/2}R_{-α}Y_{-π/2})(Y_{π/2}P_βY_{-π/2})(Y_{π/2}Y_{-γ}Y_{-π/2}) = P_{-α}R_{-β}Y_{-γ}, \end{gather*}

which is the inverse of (thus has the same angle as) $Y_γR_βP_α$, which has the same angle as $R_γP_βY_α$ by MCPP.

Compositions of these two angle permutations $(αβγ)$ and $(αγ)$ generate all six.

Rotation axes

We can extract the corresponding rotation axes from these proofs. If $R_αP_βY_γ$ has axis $\vec v$, then

  • $P_αY_βR_γ$ has axis $C\vec v$,
  • $R_βP_γY_α$ has axis $C^{-1}R_{-α}\vec v$,
  • $R_γP_βY_α$ has axis $-CY_{π/2}P_π\vec v$.

The axes for all eighteen compositions generated by these will be the six coordinate permutations of $\vec v = (a, b, c)$, the six coordinate permutations of $R_{-a}\vec v = (a, e, f)$, and the six coordinate permutations of $Y_γ\vec v = (d, e, c)$:

  • $R_αP_βY_γ$ has axis $(a, b, c)$, $P_αY_βR_γ$ has axis $(c, a, b)$, $Y_αR_βP_γ$ has axis $(b, c, a)$,
  • $R_βP_αY_γ$ has axis $(e, d, c)$, $P_βY_αR_γ$ has axis $(c, e, d)$, $Y_βR_αP_γ$ has axis $(d, c, e)$,
  • $R_βP_γY_α$ has axis $(e, f, a)$, $P_βY_γR_α$ has axis $(a, e, f)$, $Y_βR_γP_α$ has axis $(f, a, e)$,
  • $R_γP_βY_α$ has axis $(c, b, a)$, $P_γY_βR_α$ has axis $(a, c, b)$, $Y_γR_βP_α$ has axis $(b, a, c)$,
  • $R_γP_αY_β$ has axis $(c, d, e)$, $P_γY_αR_β$ has axis $(e, c, d)$, $Y_γR_αP_β$ has axis $(d, e, c)$,
  • $R_αP_γY_β$ has axis $(a, f, e)$, $P_αY_γR_β$ has axis $(e, a, f)$, $Y_αR_γP_β$ has axis $(f, e, a)$.

It is totally correct that the "net" angle of any two rotations does not depend on the order in which they are performed. However the "net" rotation axis does in a very complicated way I think.

Using Quaternions

Consider two rotations which we write as unit quaternions \begin{align} p&=x_0+\boldsymbol{i}x_1+\boldsymbol{j}x_2+\boldsymbol{k}x_3\,,\\ q&=y_0+\boldsymbol{i}y_1+\boldsymbol{j}y_2+\boldsymbol{k}y_3\,. \end{align} The rotation axes are $$ \boldsymbol{x}=\left(\begin{matrix}x_1\\x_2\\x_3\end{matrix}\right)\,,~~\boldsymbol{y}=\left(\begin{matrix}y_1\\y_2\\y_3\end{matrix}\right) $$ and the rotation angles are related to the lengths of these vectors (resp. to the real parts of the quaterions) by $$ \cos(\beta/2)=x_0=\sqrt{1-x_1^2-x_2^2-x_3^2}\,,~~\cos(\gamma/2)=y_0=\sqrt{1-y_1^2-y_2^2-y_3^2}\,. $$ Quaternion multiplication can be written as \begin{align} pq&=\underbrace{x_0y_0-x_1y_1-x_2y_2-x_3y_3}_{\text{scalar}}\\ &+\underbrace{\boldsymbol{i}(x_0y_1+x_1y_0)+\boldsymbol{j}(x_0y_2+x_2y_0)+\boldsymbol{k}(x_0y_3+x_3y_0)}_{\text{symmetric}}\\ &+\underbrace{\boldsymbol{i}(x_2y_3-x_3y_2)+\boldsymbol{j}(x_3y_1-x_1y_3)+\boldsymbol{k}(x_1y_2-x_2y_1)}_{\text{anti symmetric}}\,. \end{align} The scalar part defines the "net" rotation angle and is clearly symmetric in $x$ and $y\,.$

The axis of the rotation by $pq$ is contained in the rest of the above expression and is seen to be $$ x_0\boldsymbol{y}+y_0\boldsymbol{x}+\boldsymbol{x}\times\boldsymbol{y}\,. $$ When we swap $\boldsymbol{x}$ and $\boldsymbol{y}$ the rotation axis is $$ x_0\boldsymbol{y}+y_0\boldsymbol{x}-\boldsymbol{x}\times\boldsymbol{y}. $$ The difference between the two axes is then the vector $$ \boxed{\quad 2\boldsymbol{x}\times\boldsymbol{y}\,.\quad} $$ Regarding the "angle permutation property": In quaternion terms we want to know what rotation angle we get when the axes $\boldsymbol{x},\boldsymbol{y}$ keep their orientation but swap their lenghts. In other words, $\boldsymbol{x}'$ has the length of $\boldsymbol{y}$ and $\boldsymbol{y}'$ has the length of $\boldsymbol{x}:$ $$ \boldsymbol{x}':=\frac{|\boldsymbol{y}|}{|\boldsymbol{x}|}\left(\begin{matrix}x_1\\x_2\\x_3\end{matrix}\right)\,,~~ \boldsymbol{y}':=\frac{|\boldsymbol{x}|}{|\boldsymbol{y}|}\left(\begin{matrix}y_1\\y_2\\y_3\end{matrix}\right)\,. $$ This implies $$ x_0'=\sqrt{1-|\boldsymbol{y}|^2}\,,~~y_0'=\sqrt{1-|\boldsymbol{x}|^2}\,. $$ Obviously, $$ x_iy_i=x_i'y_i'~~~\forall i=0,1,2,3\,. $$ Therefore the net angle of the rotation $p'q'$ is the same as in $pq$ since the "scalar" term above does not change.

Not using Quaternions

The product of the three rotations $$ R_x(\alpha)=\left(\begin{matrix}1&0&0\\0&\cos\alpha&-\sin\alpha\\0&\sin\alpha&\cos\alpha\end{matrix}\right)\,,\quad R_y(\beta)=\left(\begin{matrix}\cos\beta&0&\sin\beta\\0&1&0\\-\sin\beta&0&\cos\beta\end{matrix}\right)\,,\quad R_z(\gamma)=\left(\begin{matrix}\cos\gamma&-\sin\gamma&0\\\sin\gamma&\cos\gamma&0\\0&0&1\end{matrix}\right) $$ is \begin{align} &R_x(\alpha)R_y(\beta)R_z(\gamma)\\& =\left(\begin{matrix}\cos\beta\cos\gamma&-\cos\beta\sin\gamma&\sin\beta\\\sin\alpha\sin\beta\cos\gamma+\cos\alpha\sin\gamma&-\sin\alpha\sin\beta\sin\gamma+\cos\alpha\cos\gamma&-\sin\alpha\cos\beta\\-\cos\alpha\sin\beta\cos\gamma+\sin\alpha\sin\gamma&\cos\alpha\sin\beta\sin\gamma+\sin\alpha\cos\gamma&\cos\alpha\cos\beta\end{matrix}\right)\,. \end{align} The trace of this is $$ \cos\beta\cos\gamma-\sin\alpha\sin\beta\sin\gamma+\cos\alpha\cos\gamma+\cos\alpha\cos\beta $$ and this is symmetric in any permutation of $\alpha,\beta,\gamma\,.$

  • $\begingroup$ I think this is a great start towards answering the question! This proves the Trace Property $tr(AB) = tr(BA)$. I'm wondering if you can try doing this for the Angle Permutation Property? $\endgroup$ Feb 12, 2022 at 16:55
  • $\begingroup$ @FarazMasroor . Done . A MacDonald writes in his Survey "For many, quaternions are a 19 th century mathematical curiosity. But many roboticists, aerospace engineers, and game programmers know better: quaternions are the best way to represent rotations in 3D, as we will see in Section 2.2.1." $\endgroup$
    – Kurt G.
    Feb 12, 2022 at 17:38
  • $\begingroup$ Actually, the net angle does change if the permutation isn't cyclic. I did a numeric example for 10, 20 and 35 degrees. Permute the matrices manually and see: wolframalpha.com/…*+%7B%7B1%2C+0%2C+0%7D%2C%7B0%2C+cos%2820%29%2C+-sin%2820%29%7D%2C%7B0%2C+sin%2820%29%2C+cos%2820%29%7D%7D+*+%7B%7Bcos%2835%29%2C+-sin%2835%29%2C+0%7D%2C%7Bsin%2835%29%2C+cos%2835%29%2C+0%7D%2C%7B0%2C+0%2C+1%7D%7D $\endgroup$ Feb 14, 2022 at 19:35
  • $\begingroup$ The trace I derived has a $+\sin\alpha\sin\beta\sin\gamma$ but by swapping two of the matrices, this changes to a minus sign. $\endgroup$ Feb 14, 2022 at 19:36
  • 1
    $\begingroup$ @FarazMasroor : I surely will . That different trace is however not what we expect when we discuss what you called : angle permutation property . BTW reading OP again: the trace formula in your question is identical to mine (except for a minus sign at $\beta$) . You observed the same symmetry under any permutation already. I am really wondering what the outstanding questions still are. $\endgroup$
    – Kurt G.
    Feb 16, 2022 at 6:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .