The quaternions were invented in 1843 by the Irish mathematician William Rowan Hamilton. They consist of four ordered numbers, one real and three imaginary (1, i, j, k). The three imaginary numbers i, j and k (each square roots of -1) multiply with one another in a non-commutative way, such that j multiplied by i gives a number different from i multiplied by j:

After a period of neglect, they now find many applications, for example in controlling the flight of aircraft and in the coding of computer games. They can model rotations in 3D space.

The quaternions are constructed using ±1, ±i, ±j and ±k, each of which can be prefaced by a coefficient that can be 0. During the development of the new mathematics it was recognized that each quaternion can itself be represented by a string of four ordered polarities and mapped to the corners and faces of a cube.

Multiplication of one polarity string by a quaternion is performed in two steps: multiplication and ordering.

It is equivalent to a rotation of a cube from one face to another about an axis defined by two opposed corners.

Note that the sign multiplication rules on one side are the mirror opposite of those on the other: the rotation axis on one side is defined by a column of + + +, whereas that on the other is defined by a column of – – -. It is this switching of the sign multiplication rules that renders the interactions between the numbers noncommutative.