Misunderstanding of quaternion multiplication rules

quaternionsrotations

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?

Best Answer

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}