Math 2.0

Geometry Proposition

Haversine formula

Builds on Great-circle distanceSpherical trigonometry

Statement

For a real number xx, let hav⁡x=sin⁡2(x/2)=(1−cos⁡x)/2\operatorname{hav} x = \sin^2(x/2) = (1 - \cos x)/2. Let PP and QQ be points on a sphere of radius r>0r > 0, with latitudes φ1,φ2\varphi_1, \varphi_2 and longitudes λ1,λ2\lambda_1, \lambda_2. Let dd be the great-circle distance between PP and QQ, and let θ=d/r\theta = d/r. Then hav⁡θ=hav⁡(φ2−φ1)+cos⁡φ1cos⁡φ2hav⁡(λ2−λ1).\operatorname{hav}\theta = \operatorname{hav}(\varphi_2 - \varphi_1) + \cos\varphi_1 \cos\varphi_2 \operatorname{hav}(\lambda_2 - \lambda_1). Consequently d=2rarcsin⁡hav⁡(φ2−φ1)+cos⁡φ1cos⁡φ2hav⁡(λ2−λ1).d = 2r \arcsin\sqrt{\operatorname{hav}(\varphi_2 - \varphi_1) + \cos\varphi_1 \cos\varphi_2 \operatorname{hav}(\lambda_2 - \lambda_1)}.

Remarks

The proof starts from the spherical law of cosines, cos⁡θ=sin⁡φ1sin⁡φ2+cos⁡φ1cos⁡φ2cos⁡(λ2−λ1)\cos\theta = \sin\varphi_1 \sin\varphi_2 + \cos\varphi_1 \cos\varphi_2 \cos(\lambda_2 - \lambda_1). Substitute cos⁡x=1−2hav⁡x\cos x = 1 - 2\operatorname{hav} x for x=θx = \theta and x=λ2−λ1x = \lambda_2 - \lambda_1. Then use cos⁡(φ2−φ1)=cos⁡φ1cos⁡φ2+sin⁡φ1sin⁡φ2\cos(\varphi_2 - \varphi_1) = \cos\varphi_1\cos\varphi_2 + \sin\varphi_1\sin\varphi_2 and rearrange. The second formula follows because θ/2∈[0,π/2]\theta/2 \in [0, \pi/2], where sin⁡\sin is invertible. Example: two points on the equator with λ2−λ1=π/2\lambda_2 - \lambda_1 = \pi/2 give hav⁡θ=1/2\operatorname{hav}\theta = 1/2, so θ=π/2\theta = \pi/2 and d=πr/2d = \pi r/2.

Going deeper

For a student

The haversine form is a rewriting of the spherical law of cosines from spherical trigonometry. Its numerical weakness is the opposite case: for nearly antipodal points, the argument of arcsin⁡\arcsin is close to 11. A formula with atan2⁡\operatorname{atan2}, as used by Vincenty for the sphere, is accurate for all pairs. On the Earth, the spherical model gives errors up to about 0.5%0.5\%; for better accuracy one solves the geodesic problem on the ellipsoid.

Reading path

To understand this page from the ground up, read these 3 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Great-circle distance concept
  2. Spherical trigonometry concept
  3. Haversine formula statement

Further reading

  1. Web https://en.wikipedia.org/wiki/Haversine_formula
About this page
TagAQADG9N8EV
URIm2://AQADG9N8EV
Kindstatement, proposition
WritingW0 stub
MSC51M09, 86A30
StatusThis copy of the site has no build data. Run m2 status AQADG9N8EV.
AboutGreat-circle distance
UsesGreat-circle distance, Spherical trigonometry
Same as
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.