Difference between revisions of "Multiplication of quaternions"

From Robotics
Jump to: navigation, search
 
Line 31: Line 31:
 
\begin{align}
 
\begin{align}
 
(qp)r &= q(pr) \\
 
(qp)r &= q(pr) \\
(q+p)r &= qr+pr \qquad r(q+p) &= rq+rp
+
(q+p)r &= qr+pr \qquad r(q+p) = rq+rp
 
\end{align}
 
\end{align}
 
</math>
 
</math>

Latest revision as of 15:57, 15 October 2015

← Back: Addition of quaternions Overview: Quaternions Next: Rotations using quaternions

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


\begin{align}
q &= q_0 + q_1i + q_2j + q_3k \\
p &= p_0 + p_1i + p_2j + p_3k
\end{align}

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:


\begin{align}
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
\end{align}

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:


\begin{align}
(qp)r &= q(pr) \\
(q+p)r &= qr+pr \qquad r(q+p) = rq+rp
\end{align}