Quaternions as rotations
Let be a 3d point represented as a quaternion using its homogeneous coordinates, and let be any non-zero quaternion then
Theorem: The product takes to
Before proving this theorem letβs make the following observation, we can express as a multiplication of a scalar quaternion and a unit quaternion , , then , because the scalar multiplication is commutative so the product doesnβt change irrespective of whether is a unit quaternion or not, finally notice that so we can write the action as note that from now on, is assumed to be a unit quaternion without loss of generality
Next, letβs prove that the scalar part is the same as the scalar of (we can use the formula to find the scalar component of a quaternion)
Therefore the scalar part of remains constants in the operation i.e. if then , and because multiplication preserves norms then and also
Theorem: if then acts to rotate around unit axis by
Let
Be two pure quaternions (which can be represented in 3d space), and an arbitrary quaternion which has the form
Let be the angle between and then , also let , then becomes
Letβs prove first that the product lies in the same plane as and , we do so by proving first that the product has the same components (dot and cross products) as
Then if that means that lies in the same plane as and , also forms an angle of with , furthermore , finally if the angle between and is then the angle between and is which confirms whatβs seen on the image above
Furthermore the same can be said of acting on , let then
Now any vector can be represented in terms of the base , and e.g. , weβve seen what does to and so letβs see what it does to
Before computing see that
So is a commutative operation because the cross product is the only term that makes the quaternion operation non-commutable and in that therm is zero therefore which means that does not modify
Thus the action of on any vector is a rotation around by
Quaternion rotation facts
Let be a quaternion which rotates the pure quaternion to and also let be a quaternion which rotates the vector to then will have the form
Therefore the combination of rotation followed by is given by
When the rotations are applied to the pure quaternion the result is equal to where