Trigonometry
Spherical Trigonometry
GPS delivers 3-meter accuracy on the WGS84 ellipsoid. Every Uber route solves a problem on a sphere. The London-Tokyo flight over Siberia saves 2 hours of flight time - spherical trigonometry in action.
- GPS navigation: Haversine formula in every smartphone for distance computation
- Aviation navigation: great circle routes save up to 15% fuel
- Cartography: projection choice determines which properties (distances, angles, areas) are preserved
- Astronomy: spherical trigonometry for computing positions of stars and satellites
Предварительные знания
Spherical Law of Cosines: Geometry on a Globe
GPS delivers 3-meter accuracy working on the WGS84 ellipsoid. Every Uber route solves a problem on a sphere. The shortest path between two points on a globe is an arc of a great circle, computed via the spherical law of cosines.
**Spherical triangle:** sides a, b, c are angular distances (radians), angles A, B, C. **Spherical law of cosines:** cos a = cos b·cos c + sin b·sin c·cos A **Difference from planar:** cosines of arcs instead of side lengths. **Spherical excess:** E = A + B + C - π > 0 for any spherical triangle. Area of spherical triangle = E · R²
A spherical triangle is formed by the equator and two meridians 90 degrees apart. What is the sum of its angles?
The two meridians meet the equator at 90° each (meridians are perpendicular to the equator). At the North Pole the two meridians are 90° apart, so the polar angle is 90°. Sum = 90 + 90 + 90 = 270°. Spherical excess E = 270° − 180° = 90°, and area = E·R² = (π/2)·R².
Haversine Formula: GPS in Every Smartphone
The spherical law of cosines is numerically unstable for small distances: cos(small angle) ~ 1, and subtraction loses significant digits. The Haversine formula fixes this by computing sin²(d/2) instead of cos(d) - which is why it is used in every GPS application.
**Haversine:** hav(θ) = sin²(θ/2) = (1 - cos θ)/2 **Haversine formula:** a = sin²(Δφ/2) + cos φ₁·cos φ₂·sin²(Δλ/2) d = 2R·arcsin(sqrt(a)) where φ = latitude, λ = longitude, R = 6371 km. **Why more stable:** for small d, sin²(d/2) ~ d²/4 retains precision, while cos(d) ~ 1 - d²/2 loses significant bits.
Why is the Haversine formula more numerically accurate than the spherical law of cosines for nearby points?
For small distance d, cos(d/R) = 1 − d²/(2R²) + ... is extremely close to 1. Subtracting two nearly equal numbers (1 minus something near 1) causes catastrophic cancellation - significant precision is lost. The Haversine computes sin²(d/2R) ≈ d²/(4R²) for small d; this value is near zero and retains full floating-point precision.
Great Circle Routes and Geodesy
The London-Tokyo flight goes over Siberia, though on a Mercator map the shortest path looks like heading east. A great circle arc - the geodesic on a sphere - is genuinely shorter. Airlines save up to 15% fuel by flying great circle routes.
**Initial bearing** (angle from north): tan α = sin(Δλ)·cos φ₂ / (cos φ₁·sin φ₂ - sin φ₁·cos φ₂·cos Δλ) **Gnomonic projection:** projects the sphere from its center onto a tangent plane. Key property - any great circle maps to a straight line. **Intermediate points** on a great circle arc are computed via the parametric form with parameter t ∈ [0,1].
Why does a flight from London to Los Angeles go through northern Canada rather than due west along the 51st parallel?
A great circle is the shortest path on a sphere - the geodesic. Parallels (lines of constant latitude, except the equator) are NOT great circles; their radius is R·cos(φ) < R. On a Mercator map the parallel looks straight, but the great circle route through northern Canada is genuinely shorter in 3D space. Airlines save up to 15% fuel by flying great circle routes.
Key Ideas
- cos a = cos b·cos c + sin b·sin c·cos A - spherical law of cosines: analog of the planar law with arcs instead of lengths
- Haversine hav(θ) = sin²(θ/2): numerically stable formula for small distances, used in GPS
- Sum of angles in a spherical triangle > 180 deg; excess E = A+B+C-π proportional to area
- Great circle - shortest path on a sphere; looks curved on Mercator, straight on gnomonic projection
- d = 2R·arcsin(sqrt(sin²(Δφ/2) + cos φ₁·cos φ₂·sin²(Δλ/2))) - full Haversine formula
Related Topics
Spherical trigonometry connects geometry with navigation and physics:
- Law of Sines and Cosines — Planar analogs; spherical formulas reduce to them for small angles
- 3D Rotations — SO(3) rotation matrices describe rotations on the sphere