Why would anybody want so many different definitions of quaternions around? And several of them are used extensively as well. And the normal situation is to not state which one you are using. There’s actually not that much information about the different definitions either. From Joan Solà’s article “Quaternion kinematics for the error-state KF” available through google scholar, I’ll put down some differences and the most common conventions.

**Handedness:** The multiplication of the complex numbers can either be right-handed or left-handed:

which means that a right-handed quaternion that is numerically equal to a left-handed quaternion, represents a rotation in the opposite direction. So you need to conjugate the left-handed quaternion to get the same result.

**Order:** The order of the elements when represented in vector form. Either the scalar value w is in the first or in the last position.

**Function:** When talking about transforms you could see them either as active or passive, changing the vector or the frame of reference. If you are are standing and you have a chair in front of you, but you in fact want the chair to be on your left side, you could do two things: you can move the chair and put it on your left side, or you can turn your self to the right. Either way, the chair is now on your left side. The relation between an active quaternion and the equal numerically passive quaternion is again that the result will be a rotation in different direction.

And the same for rotation matrices:

The passive representation can be interpreted as a specification of orientation rather than a transform. The passive rotation matrix is sometimes referred to as the direction cosine matrix.

Each component c_ij is the cosine of the angle between axis i in the local frame and the axis j in the global frame.

**Direction: **In the interpretation of the quaternion as a passive operation, transforming the frame instead of the vector itself, there are different conventions in which direction the quaternion does this frame transform. It is either transforming the global frame to the local or the opposite, and one is as usual equal to the conjugate of the other:

The arguably most common two definitions of the quaternion, the Hamilton and the JPL, have these specifications:

Hamilton | JPL | |
---|---|---|

Order | first | last |

Handedness | right | left |

Function | passive | passive |

Direction | Local to Global | Global to Local |

This leads to the following result:

Which means that the JPL and the Hamilton quaternions are equal but mean different things.

## One thought on “Quaternions, quaternions, quaternions… and the different definitions”