Is the quaternion obtained from Hamilton product a rotated quaternion? I'm currently working on a Quaternion Neural Network and I was wondering if a Quaternion rotation was only defined when a Quaternion $q$ is rotated using an unit quaternion $u$ ($uqu^{-1}$), or if the Hamilton product between two Quaternions was a kind of rotation ? The point is to understand how the Hamilton product can be seen in a 3D space to finally understand how Quaternion Neural Networks can perform better.
Thanks a lot !
 A: In simple terms, a quaternion does not need to be a unit quaternion in order to rotate another quaternion (e.g. by calculating the Hamilton product). But if it is not a unit quaternion, it will cause scaling in addition to rotation, so this will not be a pure rotation.
So, for example, if you want to apply several rotations $q_1,q_2,...$ to a quaternion $p$ (which might represent a point in 3D space), the quaternions $q_i$ representing the individual rotations do not need to be normalized in advance. You can simply multiply all of them, then normalize the result (thus eliminating the unwanted scaling) before using it to rotate the quaternion $p$.
A: The quaternions $\mathbb{H}$ are an algebra containing the reals $\mathbb{R}$ and form a four-dimensional real inner product space, with a norm satisfying $|x|^2:=\langle x,x\rangle$ and $|xy|=|x||y|$.
Thus, if $p,q$ are unit quaternions (with $|p|=|q|=1$), the function $f(x):=pxy$ satisfies
$$ |f(x)|=|pxq|=|p||x||q|=|x|. $$
Since $f$ is $\mathbb{R}$-linear and preserves the norm, it is an isometry, and in fact it is a rotation of $\mathbb{H}$, or in other words of four-dimensional space. 
If $pq=1$, so we can write $p=u$ and $q=u^{-1}$, the function $f(x)=uxu^{-1}$ satisfies $f(1)=1$ and hence restricts to a rotation of the orthogonal complement of $1$ inside $\mathbb{H}$, which is the three-dimensional subspace of purely imaginary quaternions.
If $|p|=1,q=1$, then $f(x)=px$ is a left-isoclinic rotation of 4D space, and if $p=1,|q|=1$ then $f(x)=xq$ is a right-isoclinic rotation of 4D space.
If $|p|\ne1,q=1$ then $|f(x)|=|p||x|\ne |x|$ so the function $f(x)=px$ does not preserve the norm, hence is not an isometry, so not a rotation. Similarly if $p=1,|q|\ne1$ then $f(x)=xq$ is not a rotation. On the other hand, if $|p||q|=1$ then $f(x)=pxq$ does preserve the norm, and in that case we can simply normalize $p$ and $q$ to be unit quaternions (replace $p$ with $p/|p|$ and $q$ with $q/|q|$) so there is no generality lost by using unit quaternions.
