Tap to Read ➤

Omkar Phatak
Jan 25, 2019

How is the distance between two geometrical points measured on any surface? What is the most useful formula for that purpose? Read to find all the answers.

One of the most basic problems in geometry, is finding the distance that separates points on a graph. Here we will discuss the calculation of segment length, connecting points on a 2D graph and 3D grid. The case of distance measurement on a sphere, is also discussed.

The formula is based on the Pythagoras theorem. Let us draw points on a graph. Let there be a reference frame, in the form of the X and Y axes intersecting at the origin. Every point will have an X-Coordinate and a Y-coordinate.

The X-coordinate is the distance of the point from the Y axis and the Y-coordinate is the distance of the point from the X axis.

Now, draw perpendiculars from both points, on both the axes. Then, draw a straight line joining the two points. As you can see, the perpendiculars drawn from the points and the segment joining the points, form a right-angled triangle. The distance is the length of the hypotenuse of the triangle.

Using the Pythagorean theorem formula, the distance can be calculated as:.

*Distance Separating Points [A(x*_{1}, y_{1}), B (x_{2}, y_{2})] = √[(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}]

the coordinates of both the points must be known. Then, using the formula, the distance can be calculated.

the coordinates of both the points must be known. Then, using the formula, the distance can be calculated.

What if the two points are situated on a three-dimensional grid? To locate a point on this grid, you will have to know three coordinates, instead of two.

This distance is calculated by modifying the Pythagoras formula:

*Distance Between Points [A(x*_{1}, y_{1}, z_{1}), B(x_{2}, y_{2}, z_{2})] = √[(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2} + (z_{2} - z_{1})^{2}]

The knowledge of the three coordinates of both points, will enable you to calculate the distance.

The knowledge of the three coordinates of both points, will enable you to calculate the distance.

The formula for points on a graph can not be used to measure distance on a sphere because a sphere is not a flat surface and Euclidean geometry is not applicable there. It has a 'Curvature', which makes calculation difficult.

Hence a complicated formula is required for calculating this distance. This formula can be used to calculate the great circle distance that separates two places on Earth (assuming the Earth is perfectly spherical).

The data you need is the knowledge of latitude and longitude of both those points and the radius of the sphere. The formula is as follows:

Distance Separating Two Points on a Sphere (D) = R * Δσ

where r is the radius of the sphere and Δσ is the central angle subtended by the two points, with the center of the sphere.** **

Distance Separating Two Points on a Sphere (D)

The points are** P (a**_{1}, b_{1}) and Q (a_{2}, b_{2}), where *a* and *b* are latitude and longitude coordinates. Δσ is calculated by using the following complicated formula (Also known as the Vincenty formula):

Δσ = arctan (A/B)

where **A = √[(cos a**_{1} sin Δb)^{2} + (cos a_{2} sin a_{1} - sin a_{2} cos a_{1} cos Δb)^{2}]

**B = sin a**_{2} sin a_{1} + cos a_{2} cos a_{1} cos Δb

Δσ = arctan (A/B)

Here, Δb = b_{1} - b_{2}. This might be a bit overwhelming, but it is as simple as it gets. While using the formula, convert the latitude and longitudes into radians, before substituting values.