Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose I am standing at latitude, longitude $(-33, 151)$ and I want to calculate the angle between two points $(-32, 150)$ and $(-34, 152)$ from my point of view. Can someone please tell me how can I do that ?

share|cite|improve this question
Are you standing in Tarnow? – copper.hat Mar 15 '13 at 3:17
up vote 1 down vote accepted

If a spherical earth is good enough, you can convert the three points to Cartesian coordinates: $x=R \cos \phi \cos \lambda, y=R \cos \phi \sin \lambda, z=R \sin \phi$. Then subtract to get the two vectors from where you are to the other two points and use the dot product formula. This will give the angle in space between the vectors.

share|cite|improve this answer
Thanks for the answer Ross. Does the ϕ and λ represents latitude, longitude respectively ? – user975027 Mar 15 '13 at 2:19
The cross product might be better for small angles, $\arccos$ is insensitive for small angles. Also, increasing $\phi$ corresponds to north, increasing $\lambda$ corresponds to east. – copper.hat Mar 15 '13 at 2:27
@user975027: yes. These are standard. – Ross Millikan Mar 15 '13 at 2:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.