[Math] Detail in the proof of the quaternion rotation identity

quaternionsrotations

I am trying to understand the proof of the quaternion rotation identity illustrated in wikipedia (http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation#Proof_of_the_quaternion_rotation_identity). I cannot understand the development of the last term in the first passage, i.e. why this should be true:

$\vec{u}\vec{v}\vec{u}=\vec{v}(\vec{u}\cdot\vec{u})-2\vec{u}(\vec{u}\cdot\vec{v})$

$\vec{u}$ and $\vec{v}$ are pure imaginary quaternions.

Thank you for your attention.

Best Answer

Further up the page, there is the identity: $uv=u\times v-u\cdot v$. Using this and the fact that $uu=-u\cdot u$, we have:

$$ uv=u\times v-u\cdot v\\=-v\times u +u\cdot v -2(u\cdot v)\\=-vu-2(u\cdot v) $$

Mulitplying on the right by $u$, you have the identity:

$$ uvu=(-vu-2(u\cdot v))u=-vuu-2u(u\cdot v)=v(u\cdot u)-2u(u\cdot v) $$