Is quaternion multiplication associative with matrix multiplication?

86 Views Asked by At

Denoting a quaternion as $\mathsf{q}= (q_0,\mathbf{q})$, the quaternion product is given by:

$$ \mathsf{q} \otimes \mathsf{p} = \begin{pmatrix} q_0 p_0 - \mathbf{q}\cdot\mathbf{p} \\ q_0 \mathbf{p} + p_0 \mathbf{q} + \mathbf{q} \times \mathbf{p} \end{pmatrix}$$

It is well known that this product is noncommutative ($\mathsf{p}\otimes\mathsf{q} \neq \mathsf{q} \otimes \mathsf{p}$) but is associative ($\mathsf{a} \otimes ( \mathsf{b} \otimes \mathsf{c} ) = (\mathsf{a} \otimes \mathsf{b}) \otimes \mathsf{c}$).

However, oftentimes people seem to like to treat quaternions as simply vectors on $\mathbb{R}^4$ with this special additional operation, which is then often written as:

$$ \mathsf{q} \otimes \mathsf{p} = C(\mathsf{q}) \mathsf{p} ~~~\rightarrow C(\mathsf{q}) = \begin{pmatrix} q_0 & -\mathbf{q} \\ \mathbf{q}^T & \left[\mathbf{q}\right]_\times\end{pmatrix}$$

Where $[\mathbf{q}]_\times$ is the usual cross-product matrix such that $\mathbf{a}\times\mathbf{b} = [\mathbf{a}]_\times \mathbf{b}$.

Because they remain vectors on $\mathbb{R}^4$, you can then mix and match `conversion matrices' and usual matrices:

$$ A \left( \mathsf{q} \otimes \mathsf{p} \right)= A \left( C(\mathsf{q}) \mathsf{p} \right)$$

However, unless I am actively going insane, the matrix $C(\mathsf{q})$ resolutely does not associate with $A$, even though we would usually expect the matrix product to be associative:

$$ A \left( C(\mathsf{q}) \mathsf{p} \right) \neq \left(A C(\mathsf{q})\right) \mathsf{p}$$

Are these authors merely being careless, or forgetting to mention that their nice matrix equations are nowhere near as nice as they look, because there is a hidden heirarchy /huge numbers of missing parenthesis?

How does associativity of the matrix product interact with this implicit casting between quaternions and matrices? Have I missed something obvious?