Content-Type: text/html
Unlike real or complex numbers, multiplication of quaternions is not commutative: ij = k, ji = -k, jk = i, kj = -i, ki = j, ik = -j.
Quaternions were discovered by [William Rowan Hamilton]?. Hamilton was looking for ways of extending complex numbers (which can be viewed as points on a plane) to higher spatial dimensions. He could not do so for 3-dimensions, but 4-dimensions produce quaternions. (According to a story he told, he was out walking one day when the solution in the form of equation i2 = j2 = k2 = ijk = -1 suddenly occured to him; he then proceeded to carve this equation into the side of a bridge!)
Quaternions are sometimes used in [computer graphics]? (and associated geometric analysis) to represent the orientation of an object in 3d space. A unit quaternion, a quaternion of length 1, can represent a 3d rotation (in fact the unit quarternions form a [double cover]? of the space of 3d rotations). The advantages are: non singular representation (compared with [Euler angles]? for example), more compact (and faster) than matrices.
See also: Hypercomplex numbers