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 , so . 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 of 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 constant in the operation, i.e., if , then . And because multiplication preserves norms, then and also .
Theorem: If , then acts to rotate around the 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 first prove that the product lies in the same plane as and . We do so by first proving 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 basis , , 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 term 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 that rotates the pure quaternion to , and also let be a quaternion that 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 .