Multiplication of quaternions

From Robotics
Jump to: navigation, search
← Back: Addition of quaternions Overview: Quaternions Next: Rotations using quaternions

Multiplying two quaternions results in a quaternion again. Assume two quaternions:

q &= q_0 + q_1i + q_2j + q_3k \\
p &= p_0 + p_1i + p_2j + p_3k

Like the addition of two quaternions, the multiplication can as well be solved by just replacing the two quaternions by their equations shown above and then solving the multiplication using regular mathematical rules. Like it is presented in the lecture notes in chapter 3.10.3, this leads to the following:

qp &= (q_0 + q_1i + q_2j + q_3k)(p_0 + p_1i + p_2j + p_3k) \\
&= ... = \\
&= (q_0p_0-q_1p_1-q_2p_2-q_3p_3)+(q_0p_1+q_1p_0+q_2p_3-q_3p_2)i + (q_0p_2-q_1p_3+q_2p_0+q_3p_1)j + (q_0p_3+q_1p_2-q_2p_1+q_3p_0)k

This expression can be reduced to the following using vector notation:

qp = q_0p_0-\vec{\mathbf{q}}\cdot\vec{\mathbf{p}} \oplus q_0\vec{\mathbf{p}}+p_0\vec{\mathbf{q}}+\vec{\mathbf{q}}\times\vec{\mathbf{p}}

Expanding this equation leads to the same result like it is presented above (see lecture notes for proof).

The equation above shows, that the multiplication of two quaternions is not commutative because the cross product is not commutative:

pq\ne qp

Multiplication is only commutative if the two vector parts are linearly dependent which leads to a cross product of zero.

But multiplication of two quaternions is associative and distributive over addition:

(qp)r &= q(pr) \\
(q+p)r &= qr+pr \qquad r(q+p) = rq+rp