From Math Images
- Quaternions are a number system that work as an extension of complex numbers by having three imaginary components
Basic DescriptionQuaternions were discovered by William Rowan Hamilton on 16 October 1843. Quaternions are a number system that work as an extension of complex numbers by having three imaginary components (complex numbers have just one) and one real component.
They are used in theoretical mathematics as well as in applied mathematics, particularly in three dimensional computer graphics.
A quaternion can be represented as
where w is the real component and x,y and z are the imaginary components. The same quaternion can also be expressed as
where w is the “scalar” and v = (x,y,z) is the “vector”. Note, that even though v is called a vector, it is not a typical three dimensional vector but rather a vector in 4D space.
The magnitude of a quaternion is given by:
In case of the imaginary components of the quaternion, the following is true:
A More Mathematical Explanation
When adding two or more quaternions, the real and imaginary components are added independently as follows:
When subtracting one quaternion from the other, the real and imaginary components of the first are subtractedfrom the real and corresponding imaginary components of the second independently.
When multiplying two quaternions, each is placed in brackets and all terms are multiplied out. In case of the imaginary operators, the following rules are followed:
As an example, if you were to multiply two quaternions Q1 (a1+b1i+c1j+d1k) and Q2 (a2+b2i+c2j+d2k), and re-arrange all the terms, this is what you get:
Note: The multiplication of quaternions is not commutative. So, Q1 * Q2 does not equal Q2 * Q1. The non-commutative property of multiplication of quaternions has some unexpected consequences. Polynomial equations over quaternions can have more solutions than implied by the degree of the polynomial. For example, the polynomial z2 + 1 = 0 has infinitely many quaternions z = [0,(b,c,d)] (with b2+c2+d2=1) as solutions.
There are two identity quaternions.
The multiplicative identity quaternion is such that any quaternion multiplied by it will remain unchanged. The multiplicative identity quaternion is:
The additive identity quaternion is such that any quaternion added to it remains unchanged. The additive identity quaternion is:
Conjugate of a Quaternion
The conjugate of a quaternion is calculated by reversing the sign of(i.e. negating) the vector part of the quaternion. So, the conjugate of a quaternion, Q would be given by:
When a quaternion is expressed as a 4x4 matrix, its conjugate corresponds to the transpose of the matrix.
Use this quaternion calculator to try your hand at algebra involving quaternions.
Quaternions in Computer Graphics
Quaternions are used abundantly in the field of computer graphics. They extend the concept of rotation in three dimensions to rotation in four dimensions and allow for the implementation of smooth and continuous rotation. The applied use of quaternions extends beyond computer graphics to robotics, navigation, molecular dynamics and orbital mechanics of satellites.
Quaternions extend the concept of rotation in three dimensions to rotation in four dimensions. This avoids the problem of 'gimbal-lock'.
Conversion to Rotation Matrix
Quaternions are often used in skeletal animation systems as they provide an efficient means to interpolate the general rotations of joints in a skeleton. However, matrices are more efficient when many points or vertices need to be transformed. Thus the need to convert quaternions to rotational matrices arises.
For the quaternion, Q[w,(x,y,z)], the equivalent rotation matrix is given by:
- There are currently no teaching materials for this page. Add teaching materials.
Leave a message on the discussion page by clicking the 'discussion' tab at the top of this image page.