Quaternions are entities of the form *w+x***i**+y**j**+z**k** where
**i**, **j**, **k** are distinct, and neither quaternions themselves nor their components can be thought of as being complex numbers.
A quaternion is usually represented as a vector, [w, x, y, z]. They are added by adding the separate components, and are multiplied by expanding out and then simplifying by using the above relationships.
A quat of julia sets:
Note that quaternions are not numbers [Actually, they *are* numbers--in much the same way that the complex number system is a two-dimensional version of the real number system, the quaternion number system is a four-dimensional version of the real number system. Since multiplication isn't commutative, but every non-zero quaternion has a multiplicative inverse, this forms an algebraic system called a "division ring". Because real and complex number multiplications are both commutative and have inverses, these are called "fields".], and only some of the usual rules of arithmetic apply. In particular, the *commutative law* does **not** apply. Given two quaternions *a* and *b* it is **not** in general true that *ab = ba*. When simplifying expressions, the rules given above are used instead. You will find they don't imply simpler rules or any contradictions - you can't prove that **k** = 0, for example.
Quaternions are a Ring, and form a natural extension of the idea of complex numbers. Compared to complex numbers, they are of little interest, but do have applications in physics and computer graphics. In particular, quaternions are very useful in simulating flight, as they efficiently avoid 3 difficulties with the apparently simpler Euler angles of heading, pitch and roll: Zero divide when maneuvering vertically, gimbal lock and interpolation between 2 angles.
*Ok, but what do those relationships represent, metaphorically speaking?*
Suppose you have a unit vector **V** = x**i** + y**j** + z**k** which represents a rotation axis, and you have an angle theta which indicates how far you are rotating around that axis. Then you can represent this rotation as a unit quaternion:
*That's* where the advantage of quaternions comes in.

See also CliffordAlgebra and in particular the book GeometricAlgebraForComputerScience, which explains the generalisation of the rotation transformations discussed above. -- JohnFletcher

CategoryMath

- sq(
**i**) = sq(**j**) = sq(**k**) =**ijk**= -1 **ij**=**k**,**jk**=**i**,**ki**=**j****ji**= -**k**,**kj**= -**i**,**ik**= -**j**

**V***sin(theta/2) + cos(theta/2)

- "Quaternions came from Hamilton ... and have been an inmixed evil to those who have touched them in any way. Vector is a useless survival ... and has never been of the slightest use to any creature."
- -- Lord Kelvin

See also CliffordAlgebra and in particular the book GeometricAlgebraForComputerScience, which explains the generalisation of the rotation transformations discussed above. -- JohnFletcher

CategoryMath

EditText of this page (last edited August 27, 2011) or FindPage with title or text search