In
spherical trigonometry
Spherical trigonometry is the branch of spherical geometry that deals with the metrical relationships between the sides and angles of spherical triangles, traditionally expressed using trigonometric functions. On the sphere, geodesics are grea ...
, the law of cosines (also called the cosine rule for sides
[) is a theorem relating the sides and angles of spherical triangles, analogous to the ordinary ]law of cosines
In trigonometry, the law of cosines (also known as the cosine formula, cosine rule, or al-Kashi's theorem) relates the lengths of the sides of a triangle to the cosine of one of its angles. Using notation as in Fig. 1, the law of cosines states ...
from plane trigonometry
Trigonometry () is a branch of mathematics that studies relationships between side lengths and angles of triangles. The field emerged in the Hellenistic world during the 3rd century BC from applications of geometry to astronomical studies. ...
.
Given a unit sphere, a "spherical triangle" on the surface of the sphere is defined by the great circle
In mathematics, a great circle or orthodrome is the circular intersection of a sphere and a plane passing through the sphere's center point.
Any arc of a great circle is a geodesic of the sphere, so that great circles in spherical geome ...
s connecting three points , and on the sphere (shown at right). If the lengths of these three sides are (from to (from to ), and (from to ), and the angle of the corner opposite is , then the (first) spherical law of cosines states:[Romuald Ireneus 'Scibor-Marchocki]
Spherical trigonometry
''Elementary-Geometry Trigonometry'' web page (1997).[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).]
:
Since this is a unit sphere, the lengths , and are simply equal to the angles (in radian
The radian, denoted by the symbol rad, is the unit of angle in the International System of Units (SI) and is the standard unit of angular measure used in many areas of mathematics. The unit was formerly an SI supplementary unit (before that ...
s) 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 and are reinterpreted as the subtended angles). As a special case, for , then , and one obtains the spherical analogue of the Pythagorean theorem
In mathematics, the Pythagorean theorem or Pythagoras' theorem is a fundamental relation in Euclidean geometry between the three sides of a right triangle. It states that the area of the square whose side is the hypotenuse (the side opposit ...
:
:
If the law of cosines is used to solve for , the necessity of inverting the cosine magnifies rounding error
A roundoff error, also called rounding error, is the difference between the result produced by a given algorithm using exact arithmetic and the result produced by the same algorithm using finite-precision, rounded arithmetic. Rounding errors are d ...
s when is small. In this case, the alternative formulation of the law of haversines is preferable.
A variation on the law of cosines, the second spherical law of cosines, (also called the cosine rule for angles[) states:
:
where and are the angles of the corners opposite to sides and , respectively. It can be obtained from consideration of a spherical triangle dual to the given one.
]
Proofs
First proof
Let , and denote the unit vector
In mathematics, a unit vector in a normed vector space is a vector (often a spatial vector) of length 1. A unit vector is often denoted by a lowercase letter with a circumflex, or "hat", as in \hat (pronounced "v-hat").
The term ''direction v ...
s 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
The North Pole, also known as the Geographic North Pole or Terrestrial North Pole, is the point in the Northern Hemisphere where the Earth's axis of rotation meets its surface. It is called the True North Pole to distinguish from the Ma ...
and is somewhere on the prime meridian
A prime meridian is an arbitrary meridian (a line of longitude) in a geographic coordinate system at which longitude is defined to be 0°. Together, a prime meridian and its anti-meridian (the 180th meridian in a 360°-system) form a great ...
(longitude of 0). With this rotation, the spherical coordinates
In mathematics, a spherical coordinate system is a coordinate system for three-dimensional space where the position of a point is specified by three numbers: the ''radial distance'' of that point from a fixed origin, its ''polar angle'' meas ...
for are , where ''θ'' 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 , and denote the unit vector
In mathematics, a unit vector in a normed vector space is a vector (often a spatial vector) of length 1. A unit vector is often denoted by a lowercase letter with a circumflex, or "hat", as in \hat (pronounced "v-hat").
The term ''direction v ...
s from the center of the sphere to those corners of the triangle. We have , , , and . The vectors and have lengths and respectively and the angle between them is , so
:,
using cross product
In mathematics, the cross product or vector product (occasionally directed area product, to emphasize its geometric significance) is a binary operation on two vectors in a three-dimensional oriented Euclidean vector space (named here E), and ...
s, dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
s, and the Binet–Cauchy identity .
Third proof
Let , and denote the unit vector
In mathematics, a unit vector in a normed vector space is a vector (often a spatial vector) of length 1. A unit vector is often denoted by a lowercase letter with a circumflex, or "hat", as in \hat (pronounced "v-hat").
The term ''direction v ...
s from the center of the sphere to those corners of the triangle. Consider the following rotational sequence where we first rotate the vector to by an angle , followed another rotation of vector to by an angle , after which we rotate the vector back to by an angle . The composition of these three rotations will form an identity transform. That is, the composite rotation maps the point to itself. These three rotational operations can be represented by quaternions
In mathematics, the quaternion number system extends the complex numbers. Quaternions were first described by the Irish mathematician William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space. Hamilton defined a quater ...
:
:
where , , and are the unit vectors representing the axes of rotations, as defined by the right-hand rule
In mathematics and physics, the right-hand rule is a common mnemonic for understanding orientation of axes in three-dimensional space. It is also a convenient method for quickly finding the direction of a cross-product of 2 vectors.
Most of ...
, respectively. The composition of these three rotations is unity, Right multiplying both sides by conjugates , we have , where and . This gives us the identity
:
The quaternion product on the right-hand side of this identity is given by
:
Equating the scalar parts on both sides of the identity, we have
:
Here . Since this identity is valid for any angles, suppressing the halves, we have
:
We can also recover the sine law by first noting that and then equating the vector parts on both sides of the identity as
:
The vector is orthogonal to both the vectors and , and as such . Taking dot product with respect to on both sides, and suppressing the halves, we have Now and so we have Dividing each side by , we have
:
Since the right-hand side of the above expression is unchanged by cyclic permutation, we have
:
Rearrangements
The first and second spherical laws of cosines can be rearranged to put the sides () and angles () on opposite sides of the equations:
:
Planar limit: small angles
For ''small'' spherical triangles, i.e. for small , and , 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
The small-angle approximations can be used to approximate the values of the main trigonometric functions, provided that the angle in question is small and is measured in radians:
:
\begin
\sin \theta &\approx \theta \\
\cos \theta &\approx 1 - \ ...
obtained from the Maclaurin series
Maclaurin or MacLaurin is a surname. Notable people with the surname include:
* Colin Maclaurin (1698–1746), Scottish mathematician
* Normand MacLaurin (1835–1914), Australian politician and university administrator
* Henry Normand MacLaurin ...
for the cosine and sine functions:
:
Substituting these expressions into the spherical law of cosines nets:
:
or after simplifying:
:
The big O terms for and are dominated by as and {{math, ''b'' get small, so we can write this last expression as:
:
See also
* Half-side formula
In spherical trigonometry, the half side formula relates the angles and lengths of the sides of spherical triangles, which are triangles drawn on the surface of a sphere and so have curved sides and do not obey the formulas for plane triangles.
F ...
* Hyperbolic law of cosines In hyperbolic geometry, the "law of cosines" is a pair of theorems relating the sides and angles of triangles on a hyperbolic plane, analogous to the planar law of cosines from plane trigonometry, or the spherical law of cosines in spherical trig ...
* Solution of triangles Solution of triangles ( la, solutio triangulorum) is the main trigonometric problem of finding the characteristics of a triangle (angles and lengths of sides), when some of these are known. The triangle can be located on a plane or on a sphere. A ...
* Spherical law of sines
In trigonometry, the law of sines, sine law, sine formula, or sine rule is an equation relating the lengths of the sides of any triangle to the sines of its angles. According to the law,
\frac \,=\, \frac \,=\, \frac \,=\, 2R,
where , and ...
Notes
Spherical trigonometry
Articles containing proofs
Theorems in geometry
he:טריגונומטריה ספירית#משפט הקוסינוסים