Multiplying by quaternions on the left and right
The map that takes a quaternionx to the quaternion qx is linear, so it can be represented as multiplication by a matrix. The same is true of the map that takesx toxq, but the two matrices are not the same because quaternion multiplication does not commute.
Letq =a + bi + cj +dkand let qM be the matrix that represents multiplication on the left by q. Then
Now let Mq be the matrix that represents multiplication on the right by q. Then
Can prove both matrix representations are correct by showing that they do the right thing whenq = 1,i,j, andk. The rest follows by linearity.
You might speculate that the matrix representation for multiplying on the right by q might be the transpose of the matrix representation for multiplying on the left byq. You can look at the matrices above and see that's not the case.
In this post I talk about how to represent rotations with quaterions, and in this post I give an equation for the equivalent rotation matrix for a rotation described by a quaternion. You can prove that the matrix representation is correct by multiplying out qM and Mq* . Keep in mind thatq in that case is a unit quaterion, so the sum of the squares of its components add to 1.
Related posts- Dot, cross, and quaternion Products
- Faster quaternion rotations
- Matrix representation of number systems