The straight lines of a sphere
On a flat plane, the shortest path between two points is a straight line, and any three non-collinear points form a triangle whose angles sum to exactly 180 degrees. On the surface of a sphere there are no straight lines in that sense — every path you draw is curved along with the surface. The role of "straight line" is instead played by the great circle: the intersection of the sphere with a plane through its center. The equator is a great circle; a line of latitude at 45 degrees is not, because its plane does not pass through the center.
Three points on a sphere, connected by three great-circle arcs, form a spherical triangle. Its sides are measured not in meters but in angular units — the angle each arc subtends at the sphere's center — and its interior angles are the angles between the tangent directions of the arcs where they meet. This single change of setting rewrites almost every formula from planar trigonometry.
The spherical law of cosines
Given two sides a and b of a spherical triangle and the included angle C between them, the third side c is found not by subtracting a cross term as in the planar law of cosines, but by a relation built entirely from sines and cosines of angles:
cos(c) = cos(a)cos(b) + sin(a)sin(b)cos(C) a, b, c are arc lengths expressed as angles (radians or degrees) C is the angle at the vertex opposite side c
There is also a law of sines, structurally identical to the planar one but with the sides replaced by their sines: sin(A)/sin(a) equals sin(B)/sin(b) equals sin(C)/sin(c). And there is a dual law of cosines for angles, unique to spherical geometry, that lets you recover a side purely from the triangle's three angles — something impossible on a flat plane, where angles alone never fix a scale. On a sphere they do, because the sphere's radius supplies the missing scale.
Girard's theorem and the spherical excess
The most visually strange fact about spherical triangles is that their angles never sum to exactly 180 degrees — they always sum to more. Consider an octant of a sphere bounded by two meridians 90 degrees apart and a quarter of the equator: each of its three angles is a right angle, and the sum is 270 degrees, fully 90 degrees over the flat-plane value.
Albert Girard's theorem, from 1629, makes the relationship exact. Define the spherical excess E as the sum of the three angles minus 180 degrees (converted to radians). Then the area of the triangle on a sphere of radius R is simply:
Area = R^2 * E, E = (A + B + C) - pi (E measured in radians)
Because area is always positive, E is always positive, and the angle sum always exceeds 180 degrees — the larger the triangle relative to the sphere, the greater the excess. Shrink the triangle toward a point and E shrinks toward zero: locally, a small enough patch of any sphere looks flat, and ordinary Euclidean trigonometry is recovered as the limiting case. This is the same reason a football field feels flat even though it sits on a curved Earth — its spherical excess is many orders of magnitude below what any instrument could measure.
Navigation: why the great-circle route looks bent
Every flat map projection distorts something — area, angle, or distance — because no curved surface can be unrolled onto a plane without stretching. On a Mercator map, straight lines are lines of constant compass bearing (rhumb lines), which are easy to steer by but are almost never the shortest route. The shortest route between two distant cities is the great-circle arc joining them, and on a Mercator projection that arc is drawn as a curve bowing toward the pole — which is exactly why a flight from New York to Tokyo tracks up near Alaska instead of running "straight" across the Pacific as the map would suggest.
Computing that route is a direct application of the formulas above: treat the two cities and the North Pole as the three vertices of a spherical triangle. The sides are the two cities' colatitudes (90 degrees minus latitude) and the unknown great-circle distance; the angle at the pole is the difference in longitude. One application of the spherical law of cosines gives the distance, and the law of sines gives the initial compass bearing to steer. This exact construction, refined over centuries of celestial navigation, still underlies the routing engines used by commercial aviation and marine navigation software today.
Beyond navigation
The same mathematics shows up wherever positions are naturally described on a sphere rather than a plane. Astronomers convert between coordinate systems on the celestial sphere — horizontal (altitude/azimuth), equatorial (right ascension/declination), ecliptic — using spherical triangles whose vertices are the pole, the zenith, and the object of interest. Geodesists use it to relate positions on the reference ellipsoid that approximates Earth's true shape. Crystallographers use spherical trigonometry on the "stereographic projection" of crystal faces. In every case the appeal is the same: once you accept that the surface is curved, spherical trigonometry gives exact, closed-form answers instead of approximations that quietly break down over long distances.
Frequently asked questions
Why do the angles of a spherical triangle always add up to more than 180 degrees?
Because the sides are arcs of great circles on a curved surface, not straight lines in a flat plane. Girard's theorem makes the excess exact: the area of a spherical triangle equals R squared times the spherical excess, the sum of the three angles minus 180 degrees. A flat triangle is just the limiting case of a vanishingly small spherical one, where the excess shrinks to zero.
How is the spherical law of cosines different from the ordinary one?
The planar law of cosines relates side lengths and one angle with a subtraction. The spherical version relates the cosines of arc lengths, measured as angles at the sphere's center, through products of sines and cosines instead: cos(c) = cos(a)cos(b) + sin(a)sin(b)cos(C). For small triangles on a large sphere the two formulas converge, which is why flat trigonometry works fine for surveying a city block but fails for a transoceanic flight.
Why do flight paths curve on a flat map?
Because the shortest path between two points on a sphere is a great-circle arc, and no flat map projection can show that arc as a straight line everywhere without distorting distance or angle. A great-circle route from New York to Tokyo passes near the Arctic, which looks like a detour on a Mercator map but is in fact the shortest possible track.
Try it live
Everything above runs in your browser — open Spherical Trigonometry and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Spherical Trigonometry simulation