Quaternions in General
This page describes general definitions and manipulations with quaternions while the application of quaternions to define the orientation of rigid bodies is describes in QuaternionOrientation.
Quaternions are an expansion of compex numbers. A quaternion has three imaginary elements: , and and can be written in the form:
Where , and are independent imaginary numbers with the relation:
Further relations hold:
For better readablity a quaternion can also be written in matrix notation:
where the basis can be omitted.
A quaternion with no real component is called a pure quaternion. According to the notation of coordinates of a 3D vector, pure quaternions are marked by an underline:
In correspondance with complex numbers quaternions can also be written in the polar form:
where has to be normalized. For an interpretation of and see Axis Angles. is the norm of the quaternion .
The polar form of a unit quaternion () can be expanded and written in power series:
Since the square of a normalized pure quaternion is , the power series can be rewritten to:
Sorting the series for real and imaginary parts yield
where the power series of the real part is equal to the power series of and the power series of the imaginary part is equal to the power series of . So the following relation holds:
Multiplication of two quaternions:
Exponentiation, logarithm of a quaternion
is computed as
The exponential of a pure quaternion simplifies to:
And the logarithm of a normalized quaternion simplifies to: