Spherical law of cosines
Template:Short description In spherical trigonometry, the law of cosines (also called the cosine rule for sides[1]) is a theorem relating the sides and angles of spherical triangles, analogous to the ordinary law of cosines from plane trigonometry.

Given a unit sphere, a "spherical triangle" on the surface of the sphere is defined by the great circles connecting three points Template:Math, and Template:Math on the sphere (shown at right). If the lengths of these three sides are Template:Math (from Template:Math to Template:Math (from Template:Math to Template:Math), and Template:Math (from Template:Math to Template:Math), and the angle of the corner opposite Template:Math is Template:Math, then the (first) spherical law of cosines states:[2][1]
Since this is a unit sphere, the lengths Template:Math, and Template:Math are simply equal to the angles (in radians) subtended by those sides from the center of the sphere. (For a non-unit sphere, the lengths are the subtended angles times the radius, and the formula still holds if Template:Math and Template:Math are reinterpreted as the subtended angles). As a special case, for Template:Math, then Template:Math, and one obtains the spherical analogue of the Pythagorean theorem:
If the law of cosines is used to solve for Template:Math, the necessity of inverting the cosine magnifies rounding errors when Template:Math is small. In this case, the alternative formulation of the law of haversines is preferable.[3]
A variation on the law of cosines, the second spherical law of cosines,[4] (also called the cosine rule for angles[1]) states:
where Template:Math and Template:Math are the angles of the corners opposite to sides Template:Math and Template:Math, respectively. It can be obtained from consideration of a spherical triangle dual to the given one.
Proofs
First proof
Let Template:Math, and Template:Math denote the unit vectors from the center of the sphere to those corners of the triangle. The angles and distances do not change if the coordinate system is rotated, so we can rotate the coordinate system so that is at the north pole and is somewhere on the prime meridian (longitude of 0). With this rotation, the spherical coordinates for are where Template:Mvar is the angle measured from the north pole not from the equator, and the spherical coordinates for are The Cartesian coordinates for are and the Cartesian coordinates for are The value of is the dot product of the two Cartesian vectors, which is
Second proof
Let Template:Math, and Template:Math denote the unit vectors from the center of the sphere to those corners of the triangle. We have Template:Math, Template:Math, Template:Math, and Template:Math. The vectors Template:Math and Template:Math have lengths Template:Math and Template:Math respectively and the angle between them is Template:Math, so
using cross products, dot products, and the Binet–Cauchy identity
Third proof
The following proof relies on the concept of quaternions and is based on a proof given in Brand:[5] Let Template:Math, Template:Math, and Template:Math denote the unit vectors from the center of the unit sphere to those corners of the triangle. We define the quaternion Template:Math. The quaternion Template:Mvar is used to represent a rotation by 180° around the axis indicated by the vector Template:Math. We note that using Template:Math as the axis of rotation gives the same result, and that the rotation is its own inverse. We also define Template:Math and Template:Math.
We compute the product of quaternions, which also gives the composition of the corresponding rotations:
where Template:Math represents the real and imaginary parts of a quaternion, Template:Mvar is the angle between Template:Math and Template:Math, and Template:Math is the axis of the rotation that moves Template:Math to Template:Math along a great circle. Similarly we define:
The quaternions Template:Mvar, Template:Mvar, and Template:Mvar are used to represent rotations with axes of rotation Template:Math, Template:Math, and Template:Math, respectively, and angles of rotation Template:Math, Template:Math, and Template:Math, respectively. Because these are double angles, each of Template:Mvar, Template:Mvar, and Template:Mvar represents two applications of the rotation implied by an edge of the spherical triangle.
From the definitions, it follows that
which tells us that the composition of these rotations is the identity transformation. In particular, Template:Math gives us
Expanding the left-hand side, we obtain
Equating the scalar parts on both sides of the identity, we obtain
Because Template:Math is parallel to Template:Math, Template:Math is parallel to Template:Math, and Template:Mvar is the angle between Template:Math and Template:Math, it follows that . Thus,
Rearrangements
The first and second spherical laws of cosines can be rearranged to put the sides (Template:Math) and angles (Template:Math) on opposite sides of the equations:
Planar limit: small angles
For small spherical triangles, i.e. for small Template:Math, and Template:Math, the spherical law of cosines is approximately the same as the ordinary planar law of cosines,
To prove this, we will use the small-angle approximation obtained from the Maclaurin series for the cosine and sine functions:
Substituting these expressions into the spherical law of cosines nets:
or after simplifying:
The big O terms for Template:Math and Template:Math are dominated by Template:Math as Template:Math and Template:Math get small, so we can write this last expression as:
History
Something equivalent to the spherical law of cosines was used (but not stated in general) by al-Khwārizmī (9th century), al-Battānī (9th century), and Nīlakaṇṭha (15th century).[6]
See also
Notes
- ↑ 1.0 1.1 1.2 W. Gellert, S. Gottwald, M. Hellwich, H. Kästner, and H. Küstner, The VNR Concise Encyclopedia of Mathematics, 2nd ed., ch. 12 (Van Nostrand Reinhold: New York, 1989).
- ↑ Romuald Ireneus 'Scibor-Marchocki, Spherical trigonometry, Elementary-Geometry Trigonometry web page (1997).
- ↑ R. W. Sinnott, "Virtues of the Haversine", Sky and Telescope 68 (2), 159 (1984).
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ Template:Cite book