What do we mean by the term distance? Distance is the space between two places, objects, or things. In geometrical terms, distance is the line between two points, two planes, a point, and a plane, and two planes. But, why must one know the distance formula? Well, the distance formula helps construct new buildings, find locations, route new ways in emergent cases, and much more. Therefore, it is necessary to learn how to find the distance between two points in both three and two dimensions. Then, what is the distance formula? Let’s find out!

**Distance between two points formula in 2D**

The distance formula used in general is the Euclidean distance formula, derived by Euclid’s famous mathematician. Consider two points (x_{1}, y_{1}) and (x_{2}, y_{2}) in the two-dimension, then the distance between these two points is given by,

d = √[(x_{2}-x_{1})²+(y_{2}-y_{1})²]

Do you know how this distance formula has been derived? This distance formula has been derived from the Pythagorean theorem. Consider a right-angled triangle with sides AB and AC and BC be the hypotenuse of the triangle. Then according to the Pythagorean theorem,

BC^{2} = AB^{2} + AC^{2}

d^{2} = (x_{2}-x_{1})²+(y_{2}-y_{1})²

Taking square root on both the sides, we get,

d = √[(x_{2}-x_{1})²+(y_{2}-y_{1})²], which is the required distance between two points formula in two dimensions.

**Distance formula between two points in 3D **

Do you know that we can also figure out the distance between two points using the distance formula in the three dimensions? Consider two points having coordinates (x_{1}, y_{1}, z_{1}) and (x_{2}, y_{2}, z_{2}). Then according to the formula, the distance is given by,

d = √[(x_{2}-x_{1})²+(y_{2}-y_{1})²+(z_{2}-z_{1})²]

However, the coordinates can increase as the dimensions increase, i.e., in four-dimension, the number of coordinates will be four, and so on.

**Distance formula from a point to a line in 2D**

In the two-dimensional world, one can calculate the distance between a point (x_{1}, y_{1}) and a line ax + by + c = 0 using the distance formula geometry. The distance between a point and a line is the perpendicular distance between them. Therefore, the distance is given by,

d = |ax_{1}+by_{1}+c|/√a²+b²

**Distance formula from a point to a line in 3D**

Finding distance in the three-dimensional world is not easy. To understand the distance formula geometry, one must have a thorough knowledge of the concept. Moreover, the distance formula physics is quite easy to grasp once understood thoroughly. Consider a line whose equation is denoted by x-x_{1}/a=y-y_{1}/b=z-z_{1}/c and a point with coordinates P (x_{o}, y_{o,} z_{o}). Then the distance formula between these is given by,

d = |PQ x s|/|s| , where

- P has the coordinates (x
_{o}, y_{o,}z_{o}) and is a point from which distance needs to be calculated through the line. - Q has the coordinates (x
_{1}, y_{1,}z_{1}) on the line whose equation is = x-x_{1}/a=y-y_{1}/b=z-z_{1}/c . - PQ = (x
_{1}– x_{0}, y_{1}– y_{0}, z_{1}– z_{0}) - s = <a, b, c> is the direction vector for the line = x-x
_{1}/a=y-y_{1}/b=z-z_{1}/c. - The cross product PQ x s is of s and PQ.

**Distance formula between two parallel lines **

When do we say two lines are parallel to each other? Two lines are parallel when their slopes are the same or are in the same ratio. For example, line 1 is given by 4x + 5y + 8 = 0 and line 2 is given by 4x + 5y + 24 = 0. These two lines are parallel because their slopes are in the same ratio. The slope for line 1 is 8, and the slope for line 2 is 24.

Then what is the distance formula between two parallel lines? The distance between two parallel lines is given by,

d = |C_{1}-C_{2}|/√A²+B²

Here, C_{1} and C_{2} are the slopes for lines 1 and 2, and A and B are the coefficients of x and y, respectively.

**Distance formula applications in the real world **

Why do we study distance formula physics? Is knowing the distance formula geometry important in the real world? The distance formula has many applications in the real world. A few of them are listed below.

- The distance formula can be used to find the distance between any object, whether in two or three dimensions.
- The distance formula is used in complex numbers to represent the plane and its magnitude.
- Moreover, with the help of distance formulas, the distance between two planes can be found in the three-dimensional or n-dimensional planes.
- It is also used to derive the magnitude formula needed in vectors.
- In geography, the distance formula is used to find the distance between two coordinates, two countries, or two far-off places with different topographical conditions.
- Surveyors and engineers use distance formulas to prepare maps and adjust the coordinates of new locations.
- The distance between two cities or countries by air is calculated using the distance formula.
- Various sailors use the distance formula to locate their positions using maps and coordinates in the sea.

**Summary of distance formulas **

For an easy understanding of various distance formulas, here is the list of all of them:

**Understanding what is distance formula through examples **

Example 1: What is the distance between two coordinates A (6, -13) and B (-3, 8)?
d = √[(x-x = √(6-(-13))²+(-3-8)² = √(19)²+(-11)² = 21.954
A = -6, B = 5, C From the distance formula, we have, d = |C Putting the values in the given equation, we get, d = |2-4|/√-6²+5²= 0.256.
d = |Ax Here, x Putting the values in the above equation, we get, d = |6×9+4×6+2×8+10|/√6²+4²+2² Solving the above equation, we get, d = 14.05. |