How to measure the distance between two cities in the map by knowing latitude point and longitude point of them? I want to measure the distance between two points in a map.
For example between London and Moscow by knowing that the latitude point and longitude point of them.
London latitude = 51.50, London longitude = -0.12, Moscow latitude = 55.75 and Moscow longitude = 37.62 .
Now what is the exact formula for measure the distance between them ?
 A: In an earlier geological epoch, when I was in high school, Spherical Trigonometry was a subject in the mathematical curriculum. It certainly would have been studied by anyone wanting to do Navigation. There, one learns how to “solve triangles” in ways that are reminiscent of the methods used for ordinary Plane Trigonometry. Here’s how it works:
Think of your situation, with your two cities. Let the difference in their longitudes be $\delta$, and their colatitudes be $\lambda$ and $\mu$. These numbers are exactly $\pi/2-$ latitude. You now have a triangle on the surface of the sphere, with angle (at the North Pole) of $\delta$ and legs $\lambda$ and $\mu$. You’re in a side-angle-side situation, and the recipe for handling that is of the same genus as in PT, but different species, the Law of Cosines. In ST, the L of C reads thus:
$$
\cos\kappa=\cos\lambda\cos\mu+\sin\lambda\sin\mu\cos\delta\,,
$$
where $\kappa$ is the third leg of the triangle, an angle which you’d have to convert to kilometers or miles, using the radius of the Earth.
If you want to get a more accurate reault, using the nonsphericity of the Earth, Eocene high-school mathematics is not adequate.
A: Well, you can actually look this up in a number of places.  So I'll give you a hint on deriving it.  The locations of London and Moscow are two vectors $\mathbf{x}_l$ and $\mathbf{x}_m$.  They have the same length $R$, i.e. the radius of the Earth.  The angle $\Omega$ between them is given by
$\cos \Omega = \mathbf{x}_l \cdot \mathbf{x}_m/R^2$.  The distance is given by $R \times \Omega$.
Now, $\mathbf{x}_l \cdot \mathbf{x}_m/R^2$ is also
$(x_l x_m + y_l y_m + z_l z_m)/R^2$.  And, letting latitude be $\lambda$ and longitude be $\phi$:
$x_l = R \sin\lambda_l \cos\phi_l , y_l = R \sin\lambda_l \sin\phi_l , z_l = R \cos \lambda_l$
with similar expressions for the location of Moscow.
Now, put all this into the expression for $\mathbf{x}_l \cdot \mathbf{x}_m/R^2$ to get $\cos \Omega$, and then get $\Omega$.  Finally, the distance is $R\times\Omega$.  In the midst of all this, you can use some trig identities to make the expression somewhat simpler.
