To try to understand the derivations of quaternion multiplication rules, I was conducting rotation experiments to actually verify the meaning of these rules.

In practice, according to this source (Quaternions: why does ijk = -1 and ij=k and -ji=k), it is stated that:

A right angle rotation about the X-axis followed by an equal amount of rotation about the Y-axis corresponds to an overall effective rotation of 90 degrees about the Z-axis. So, ij = k. Similarly, you can physically verify the quaternion multiplication laws.

So, I took a point A = (1, 1, 1) and tried applying the composition of ij and separately k. Here's what I did:

  1. I rotated A around the X-axis by 90 degrees, resulting in $A' = (1, -1, 1)$.
  2. I rotated A' around the Y-axis by 90 degrees, resulting in $A'' = (1, -1, -1)$.
  3. Then, I separately rotated A around the Z-axis by 90 degrees, resulting in $A'_1 = (-1, 1, 1)$.

According to the relation ij = k, I should have obtained $A'' = A'_1$, but this didn't happen in my experiment. Perhaps there's something I'm missing, and I haven't fully grasped the theory behind quaternions. What am I doing wrong?

  • 2
    $\begingroup$ The convention for group actions like this is normally that they are like functions. So $ij(P)=i(j(P))$ probably means do $j$ and then do $i$. $\endgroup$
    – Eric
    Jun 10, 2023 at 17:22
  • 1
    $\begingroup$ Also, his exact analogy is wrong. The exact relationship between quaternions and rotations is kinda tricky. $i$ doesn’t correspond to a 90 degree rotation. It corresponds to a 180 degree rotation and $-1$ happens to correspond to the identity rotation where you do a rotation of point $p$ by quaternion $q$ by calculating $qpq^{-1}$. This is all really nonobvious and still confuses me sometimes. $\endgroup$
    – Eric
    Jun 10, 2023 at 17:34
  • $\begingroup$ @Eric So when he talks about 90-degree rotations around the axes in the link, either he was mistaken or he wasn't referring to rotations relative to i, j, and k. However, as confirmed by the evidence, it is incorrect to claim that rotations around x and then y are equivalent to a rotation around z, if we are talking about a 90° rotation. It's worth noting that considering ij(P) = i(j(P)) is more helpful in understanding the composition of rotations when visualized in this way. $\endgroup$
    – Huntwer
    Jun 10, 2023 at 19:43

1 Answer 1


To summarize @Eric's comments:

  • order matters: $\mathbf{i\,j}$ means rotate first around $y$-axis then around $x$-axis (group acts from the left)

  • angle matters: each of $\mathbf{i\,,j\,,k}$ represents a rotation by $180^\circ$ degrees as we can learn from here.

Check: \begin{align} \begin{pmatrix}-1&0&0\\0&1&0\\0&0&-1\end{pmatrix}\begin{pmatrix}1\\1\\1\end{pmatrix}&=\begin{pmatrix}-1\\1\\-1\end{pmatrix}\quad\text{($180^\circ$ around $y$-axis)}\\[2mm] \begin{pmatrix}1&0&0\\0&-1&0\\0&0&-1\end{pmatrix}\begin{pmatrix}-1\\1\\-1\end{pmatrix}&= \begin{pmatrix}-1\\-1\\1\end{pmatrix}\quad\text{($180^\circ$ around $x$-axis)}\\[2mm] \begin{pmatrix}-1&0&0\\0&-1&0\\0&0&1\end{pmatrix}\begin{pmatrix}1\\1\\1\end{pmatrix}&=\begin{pmatrix}-1\\-1\\1\end{pmatrix}\quad\text{($180^\circ$ around $z$-axis)}\\[2mm] \end{align} Or more generally: \begin{align} \underbrace{ \begin{pmatrix}1&0&0\\0&-1&0\\0&0&-1\end{pmatrix}}_{\textstyle\mathbf{i}}\underbrace{\begin{pmatrix}-1&0&0\\0&1&0\\0&0&-1\end{pmatrix}}_{\textstyle\mathbf{j}}=\underbrace{\begin{pmatrix}-1&0&0\\0&-1&0\\0&0&1\end{pmatrix}}_{\textstyle\mathbf{k}}\,. \end{align}

  • $\begingroup$ Perfect! Now it's clear. However, if $i$ represents a 180-degree rotation around the $i$-axis, then $i^2 = i \cdot i$ implies two 180-degree rotations around the $i$-axis, resulting in 360 degrees or $0°$, a null rotation. In that case, it should be $i^2 = 1$ as a null rotation is an identity like 1 ($1 \cdot i = i \cdot 1$). So, why does $i^2 = -1$? I understand the analogy with complex numbers, but doesn't $i^2 = -1$ change the rules? $\endgroup$
    – Huntwer
    Jun 10, 2023 at 20:13
  • $\begingroup$ @Huntwer No. In the Wikipedia article to which I linked you see that a unit quaternion $q$ rotates a pure quaternion $p$ by $p'=qpq^{-1}\,.$ Therefore the sign of $q$ does not matter. In other words: $SU(2)$ is the double cover of $SO(3)\,.$ $\endgroup$
    – Kurt G.
    Jun 10, 2023 at 20:43
  • $\begingroup$ Yes. If you want a visual explanation, it’s because -1 represents a 360 degree rotation which in a weird way twists space which 720 doesn’t. See Dirac’s belt trick for an explanation: m.youtube.com/watch?v=EgsUDby0X1M $\endgroup$
    – Eric
    Jun 10, 2023 at 20:49
  • $\begingroup$ @KurtG. Are you referring to this?: "A physical rotation about $\vec {u}$ by $\theta$ and a physical rotation about $-\vec {u}$ by $\displaystyle 2\pi -\theta$ both achieve the same final orientation by disjoint paths through intermediate orientations. By inserting those vectors and angles into the formula for $q$ above, one finds that if $q$ represents the first rotation, $-q$ represents the second rotation. This is a geometric proof that conjugation by $q$ and by $−q$ must produce the same rotational transformation matrix." $\endgroup$
    – Huntwer
    Jun 10, 2023 at 21:20
  • $\begingroup$ @Huntwer . More or less yes. Everyone describes this in their own favourite way. Digest it patiently using your favourite source. One last hint: if you understood what $p'=qpq^{-1}$ means it is trivial that $q$ and $-q$ produce the same $p'\,.$ Quaternion rotations are neither tricky nor weird. Otherwise, not so many game programmers would use them. $\endgroup$
    – Kurt G.
    Jun 11, 2023 at 4:56

You must log in to answer this question.

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