Quaternions and spherical trigonometry
What's new 2024-12-19
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 byin the complex case).
- The inner product
is symmetric and positive definite (withforming 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.
The unit quaternions act on the imaginary quaternions
by conjugation:
For instance, for any real , conjugation by
is a rotation by
around
:
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:
- Right multiplying
by
does not affect the location
of the tangent vector, but rotates the tangent vector
anticlockwise by
in the direction of the orthogonal tangent vector
, as it replaces
by
.
- Right multiplying
by
advances the tangent vector by geodesic flow by angle
, as it replaces
by
, and replaces
by
.
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
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, replacingby
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
In a similar fashion, from (5) we see that the quantity
As a variant of the above analysis, we have from (5) again that
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 declinationof 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
.