Quaternion division not equal to multiplication with inverse (q1 / q2 != q1 * q2^-1)?

Viewed 156

From several docs, like [1] and [2], I learned that divide operation on a quaternion is equivalent to multiply its inverse. That is to say, for two quaternions q1 and q2, we have

However, when I verify this in MATLAB, which will give different results (also verified by further converting them to rotation matrix via quat2rotm). See code below:

q1 = [1 0 1 0];
q2 = [1 0.5 0.5 0.75];
q1 = quatnormalize(q1);  % this seems doesn't matter
q2 = quatnormalize(q2);  % this seems doesn't matter

res_1 = quatdivide(q1, q2)               % this will be [0.7385  0.1231 0.2462 -0.6155]
res_2 = quatmultiply(q1, quatinv(q2))    % this will be [0.7385 -0.6155 0.2462 -0.1231]

Any hint is appreciated.

1 Answers

Note that quaternion division leads to an ambiguous notation.

reading from your 2nd reference it states

lem

To expand upon this see what the result of the two interpretations are:

fgi1

They differ by the sign of the cross product in the vector part.

I suspect that quatdivide() uses the 2nd convention such as

quatdivide(q1,q2) = quatmultiply(quatinverse(q2),q1)
Related