[Math] How to prove associativity of quaternion multiplication using scalar and vector form

associativityquaternions

In scalar and vector form, a quaternion can be represented as $a=(q_0,{\bf{q}})$. The definition of quaternion multiplication is: $ab=(q_0,{\bf{q}})(p_0,{\bf{p}})=(p_0q_0-{\bf{q}}\cdot{\bf{p}},q_0{\bf{p}}+p_0{\bf{q}}+{\bf{q}}\times{\bf{p}})$$^{[1]}$.

Now I encountered a problem when I want to prove associativity of quaternion multiplication under this form. Specifically, a non-associative cross production is included in the multiplication definition which seems to be unable to reconcile with the fact that quaternion multiplication is associative. Following is my tentative proof.

Let $a=(q_0,{\bf{q}}), b=(p_0,{\bf{p}})$ and $c=(r_0,{\bf{r}})$.

Then

$(ab)c=(p_0q_0-{\bf{q}}\cdot{\bf{p}},q_0{\bf{p}}+p_0{\bf{q}}+{\bf{q}}\times{\bf{p}})(r_0,{\bf{r}})$
$=(p_0q_0r_0-r_0{\bf{q}}\cdot{\bf{p}}-q_0{\bf{p}}\cdot{\bf{r}}-p_0{\bf{q}}\cdot{\bf{r}}-({\bf{q}}\times{\bf{p}})\cdot{\bf{r}},$
$p_0q_0{\bf{r}}-{\bf{q}}\cdot{\bf{p}}\cdot{\bf{r}}+q_0r_0{\bf{p}}+p_0r_0{\bf{q}}+r_0{\bf{q}}\times{\bf{p}}+q_0{\bf{p}}\times{\bf{r}}+p_0{\bf{q}}\times{\bf{r}}+({\bf{q}}\times{\bf{p}})\times{\bf{r}})$,

and

$a(bc)=(q_0,{\bf{q}})(p_0r_0-{\bf{p}}\cdot{\bf{r}},p_0{\bf{r}}+r_0{\bf{p}}+{\bf{p}}\times{\bf{r}})$
$=(p_0q_0r_0-q_0{\bf{p}}\cdot{\bf{r}}-p_0{\bf{q}}\cdot{\bf{r}}-r_0{\bf{q}}\cdot{\bf{p}}-{\bf{q}}\cdot({\bf{p}}\times{\bf{r}}),$
$q_0p_0{\bf{r}}+q_0r_0{\bf{p}}+q_0{\bf{p}}\times{\bf{r}}+p_0r_0{\bf{q}}-{\bf{q}}\cdot{\bf{p}}\cdot{\bf{r}}+p_0{\bf{q}}\times{\bf{r}}+r_0{\bf{q}}\times{\bf{p}}+{\bf{q}}\times({\bf{p}}\times{\bf{r}}))$.

All terms in $(ab)c$ and $a(bc)$ are the same (note specifically that $({\bf{q}}\times{\bf{p}})\cdot{\bf{r}}={\bf{q}}\cdot({\bf{p}}\times{\bf{r}})$ which is established by interchange of lines in the determinant), except the last cross product terms: $({\bf{q}}\times{\bf{p}})\times{\bf{r}}$ in $(ab)c$ and ${\bf{q}}\times({\bf{p}}\times{\bf{r}})$ in $a(bc)$. We know that cross product does not satisfy associativity, so the above two cross products are not equal in general, i.e., $({\bf{q}}\times{\bf{p}})\times{\bf{r}}\ne{\bf{q}}\times({\bf{p}}\times{\bf{r}})$, which will lead to inequality of the two vector components of $(ab)c$ and $a(bc)$. Then associativity will not hold for quaternion multiplication. I believe associativity is not true for cross product but true for quaternion multiplication, so where did I made mistakes? Please stick to the scalar and vector form of quaternion representation. For the sake of the tedious latex formulas I input, please help me with this issue. Thanks a lot.

[1]Animating Rotation with Quaternion Curves, Ken Shoemake, SIGGRAPH 1985.

Best Answer

$(q \cdot p)r$, not $q \cdot p \cdot r$. $q \cdot p$ is a scalar, so this is just scalar multiplication. Fix those, then use $q \times (p \times r) = p (q \cdot r) - r (q \cdot p)$. This is called the BAC CAB rule.