
Quaternions (or 'sets of four'), the name of a calculus of peculiar power and generality invented by Sir William Rowan Hamilton (q.v.) of Dublin. As a geometry, it primarily concerns itself with the operations by which one directed quantity or Vector (q.v.) is changed into another. Such an operation is called a quaternion, for reasons which will appear hereafter. From this point of view alone we shall discuss it here. We assume the law of vector addition, which asserts that the vector or directed line AC (see fig. 1) is equal to the sum of the vectors AB and BC—or any other directed lines parallel and equal to them. For example, the resultant of two velocities or coterminal forces is a vector equal to the vector sum of the components (see COMPOSITION). Quantities which do not involve the idea of direction or directedness are called Scalars; such are the quantities used in arithmetic and ordinary algebra. Parallel vectors can all be represented as scalar multiples of one another, or (better) of the parallel vector whose length is unity. By the latter representation, the scalar multiple gives the length or tensor of the vector. Thus any vector may be factorised into its tensor and directed unit part. This is symbolised by the equation , where T and U appear as selective symbols of operation, separating out the length and direction respectively.

The operation which simply rotates a vector into a new direction without changing its length is a particular kind of quaternion called a Versor. A second application of this versor produces an extra equal rotation in the same plane—i.e. about the same axis. With every versor, therefore, are associated an axis having a definite direction and an angle through which any vector perpendicular to this axis is rotated by the versor operating on it. A very important case is the quadrantal or right versor, which turns a perpendicular vector through a right angle. Let represent the right versor whose axis is perpendicular to the plane of the paper. Then (fig. 2) if is any vector in the plane of the paper, the quantity gives a vector perpendicular to and to the axis of . A second operation gives
or symbolically . Thus the square of any right versor is negative unity. It is easy to show that , where is a scalar, is an operator which still turns any appropriate vector through a right angle, but at the same time increases its tensor times. Such an operator is a quadrantal quaternion, whose tensor is and versor . A quaternion can always be factorised into its tensor and versor parts.
Now let (fig. 3) be the axes of two right versors and , making angle with each other. Describe the sphere of unit radius with as centre, and draw the vector or perpendicular to and in the plane . Draw or perpendicular to and —i.e. upward from the plane of the paper; and finally draw or perpendicular to and . Then first and secondly ; so that is the versor which rotates into the position . This versor has its axis parallel to , and its angle equal to the complement of . Thus any versor can be represented by the product of two right versors perpendicular to it and making with each other the appropriate angle. If the two right versors are themselves at right angles, their product becomes the right versor perpendicular to both. We thus arrive at what is historically the basis of quaternions—viz. Hamilton's remarkable system of mutually perpendicular right versors, . As operators (see fig. 4) they are connected by the equations
The special point to notice is the non-commutative character of the process of multiplication, not being the same as .

The discovery of the equation on October 16, 1843, was quickly followed by the development of the whole calculus of quaternions. Now, if and were vectors instead of right versors, the equation would still be true as an equation of operations. In fact, as is capable of easy proof, right versors obey the law of vector addition; and in the identification of unit vectors and right versors, or more generally of vectors and right quaternions, lies one of the great simplifications of the calculus. Thus the operator is a right quaternion whose axis (see fig. 4) is along the diagonal of the square of which and are the sides, and whose tensor is equal to the length of this diagonal.

The following conclusions are readily come to. The square of every unit vector is negative unity; the product of two parallel vectors is minus the product of their tensors; the product of two perpendicular vectors is a third vector perpendicular to both and having its tensor equal to the product of the tensors of its factors; the product of any two unit vectors is in general a versor; the product of any two vectors is a quaternion whose tensor is the product of the tensors, and whose versor is as mentioned in the preceding sentence. The quaternion transforms into the vector ; and , being itself that quaternion which undoes the effect of the right quaternion , must also be a right quaternion—i.e. a vector. In fact, is always equal to a scalar multiple of . Hence the quaternion is the operator which changes the vector into the vector . This operation involves four numbers: first, the change of length; second, the angle through which the one vector must be rotated so as to bring it into parallelism with the other; and third and fourth, the two numbers necessary to fix the aspect of the plane in which the rotation takes place, or the direction of the axis about which rotation takes place. Thus a quaternion, in general, depends on four numbers, whence the name. A vector or quadrantal quaternion is a degenerate quaternion, involving only three numbers; while a scalar, which might be defined as the quaternion which changes one vector into a parallel one, is still more degenerate, involving only one number—viz. itself.
There is still one very important representation of a quaternion to consider. This is done most simply as follows: Let be the two vectors OA, OB (fig. 5). Resolving along and perpendicular to we get ; and hence .

But OA · OM, being the product of two parallel vectors, is minus the product of the lengths or tensors. On the other hand, the product OA · ON, being the product of two perpendicular vectors, is a vector perpendicular to the plane of the paper with tensor equal to twice the area of the triangle OAB. Thus the quaternion is equal to the sum of a scalar and a vector; and generally for any quaternion () we have the relation
where S selects the scalar part and V the vector part. The geometrical meanings of S and V operating on are easily seen to be these—
where is the unit vector perpendicular to and .
We end with a few illustrations. Thus, if is a constant vector, and a variable vector, the equation , a constant, means that the resolved part of along the direction of is constant, and that therefore the extremity of traces out a plane perpendicular to . The versor that turns any line through an angle in a given plane has the form , where is the right versor perpendicular to that plane. Demoivre's theorem (see DEMOIVRE) at once follows if we write . Finally, if represents a force acting at the extremity of , is the vector moment of the force about the origin; and in the almost self-evident equation
we have a completely general demonstration of Varignon's theorem of moments. See MOMENT.
Hamilton's Lectures on Quaternions (1853) and his Elements of Quaternions (1866) are still the classical works on the subject. Tait's Elements of Quaternions (3d ed. 1890) is probably better fitted as a text-book for the student to work through, and contains some original applications of high physical interest. Kelland and Tait's Introduction to Quaternions (1874) may be recommended to the beginner. Tait's treatise has been translated into French and German.