Hamilton’s quaternion number system is a non-commutative extension of the complex numbers, consisting of numbers of the form where
are real numbers, and
are anti-commuting square roots of
with
,
,
. While they are non-commutative, they do keep many other properties of the complex numbers:
- Being non-commutative, the quaternions do not form a field. However, they are still a skew field (or division ring): multiplication is associative, and every non-zero quaternion has a unique multiplicative inverse.
- Like the complex numbers, the quaternions have a conjugation
although this is now an antihomomorphism rather than a homomorphism:
. One can then split up a quaternion
into its real part
and imaginary part
by the familiar formulae
(though we now leave the imaginary part purely imaginary, as opposed to dividing by
in the complex case).
- The inner product
is symmetric and positive definite (with
forming an orthonormal basis). Also, for any
,
is real, hence equal to
. Thus we have a norm
Since the real numbers commute with all quaternions, we have the multiplicative property
. In particular, the unit quaternions
(also known as
,
, or
) form a compact group.
- We have the cyclic trace property
which allows one to take adjoints of left and right multiplication:
- As
are square roots of
, we have the usual Euler formulae
for real
, together with other familiar formulae such as
,
,
, etc.
We will use these sorts of algebraic manipulations in the sequel without further comment.
The unit quaternions act on the imaginary quaternions
by conjugation:
This action is by orientation-preserving isometries, hence by rotations. It is not quite faithful, since conjugation by the unit quaternion is the identity, but one can show that this is the only loss of faithfulness, reflecting the well known fact that
is a double cover of
.
For instance, for any real , conjugation by
is a rotation by
around
:
Similarly for cyclic permutations of . The doubling of the angle here can be explained from the Lie algebra fact that
is
rather than
; it also closely related to the aforementioned double cover. We also of course have
acting on
by left multiplication; this is known as the spinor representation, but will not be utilized much in this post. (Giving
the right action of
makes it a copy of
, and the spinor representation then also becomes the standard representation of
on
.)
Given how quaternions relate to three-dimensional rotations, it is not surprising that one can also be used to recover the basic laws of spherical trigonometry – the study of spherical triangles on the unit sphere. This is fairly well known, but it took a little effort for me to locate the required arguments, so I am recording the calculations here.
The first observation is that every unit quaternion induces a unit tangent vector
on the unit sphere
, located at
; the third unit vector
is then another tangent vector orthogonal to the first two (and oriented to the left of the original tangent vector), and can be viewed as the cross product of
and
. Right multplication of this quaternion then corresponds to various natural operations on this unit tangent vector:
Now suppose one has a spherical triangle with vertices , with the spherical arcs
subtending angles
respectively, and the vertices
subtending angles
respectively; suppose also that
is oriented in an anti-clockwise direction for sake of discussion. Observe that if one starts at
with a tangent vector oriented towards
, advances that vector by
, and then rotates by
, the tangent vector now at
and pointing towards
. If one advances by
and rotates by
, one is now at
pointing towards
; and if one then advances by
and rotates by
, one is back at
pointing towards
. This gives the fundamental relation
relating the three sides and three equations of this triangle. (A priori, due to the lack of faithfulness of the action, the right-hand side could conceivably have been
rather than
; but for extremely small triangles the right-hand side is clearly
, and so by continuity it must be
for all triangles.) Indeed, a moments thought will reveal that the condition (4) is necessary and sufficient for the data
to be associated with a spherical triangle. Thus one can view (4) as a “master equation” for spherical trigonometry: in principle, it can be used to derive all the other laws of this subject.
Remark 1 The law (4) has an evident symmetry
, which corresponds to the operation of replacing a spherical triangle with its dual triangle. Also, there is nothing particularly special about the choice of imaginaries
in (4); one can conjugate (4) by various quaternions and replace
here by any other orthogonal pair of unit quaternions.
Remark 2 If we work in the small scale regime, replacing
by
for some small
, then we expect spherical triangles to behave like Euclidean triangles. Indeed, (4) to zeroth order becomes
which reflects the classical fact that the sum of angles of a Euclidean triangle is equal to
. To first order, one obtains
which reflects the evident fact that the vector sum of the sides of a Euclidean triangle sum to zero. (Geometrically, this correspondence reflects the fact that the action of the (projective) quaternion group on the unit sphere converges to the action of the special Euclidean group
on the plane, in a suitable asymptotic limit.)
The identity (4) is an identity of two unit quaternions; as the unit quaternion group is three-dimensional, this thus imposes three independent constraints on the six real parameters
of the spherical triangle. One can manipulate this constraint in various ways to obtain various trigonometric identities involving some subsets of these six parameters. For instance, one can rearrange (4) to get
Conjugating by to reverse the sign of
, we also have
Taking the inner product of both sides of these identities, we conclude that
is equal to
Using the various properties of inner product, the former expression simplifies to , while the latter simplifies to
We can write and
so on substituting and simplifying we obtain
which is the spherical cosine rule. Note in the infinitesimal limit (replacing by
) this rule becomes the familiar Euclidean cosine rule
In a similar fashion, from (5) we see that the quantity
is equal to
The first expression simplifies by (1) and properties of the inner product to
which by (2), (3) simplifies further to . Similarly, the second expression simplifies to
which by (2), (3) simplifies to . Equating the two and rearranging, we obtain
which is the spherical sine rule. Again, in the infinitesimal limit we obtain the familiar Euclidean sine rule
As a variant of the above analysis, we have from (5) again that
is equal to
As before, the first expression simplifies to
which equals . Meanwhile, the second expression can be rearranged as
and so the inner product is , leading to the “five part rule”
In the case of a right-angled triangle , this simplifies to one of Napier’s rules
which in the infinitesimal limit is the familiar . The other rules of Napier can be derived in a similar fashion.
Example 3 One application of Napier’s rule (6) is to determine the sunrise equation for when the sun rises and sets at a given location on the Earth, and a given time of year. For sake of argument let us work in summer, in which the declination
of the Sun is positive (due to axial tilt, it reaches a maximum of
at the summer solstice). Then the Sun subtends an angle of
from the pole star (Polaris in the northern hemisphere, Sigma Octantis in the southern hemisphere), and appears to rotate around that pole star once every
hours. On the other hand, if one is at a latitude
, then the pole star an elevation of
above the horizon. At extremely high latitudes
, the sun will never set (a phenomenon known as “midnight sun“); but in all other cases, at sunrise or sunset, the sun, pole star, and horizon point below the pole star will form a right-angled spherical triangle, with hypotenuse subtending an angle
and vertical side subtending an angle
. The angle subtended by the pole star in this triangle is
, where
is the solar hour angle
– the angle that the sun deviates from its noon position. Equation (6) then gives the sunrise equation
or equivalently
A similar rule determines the time of sunset. In particular, the number of daylight hours in summer (assuming one is not in the midnight sun scenario
) is given by
The situation in winter is similar, except that
is now negative, and polar night (no sunrise) occurs when
.