# Distance Formula

The coordinates of two points in a plain fix the positions of the positions of the points in the plane and also the distance between them. The distance and the coordinates of the two points are related by an algebraic relation which can be deduced as shown below.

To find the distance between two points in a plane

Let A (x$$_{1}$$, y$$_{1}$$) and B (x$$_{2}$$, y$$_{2}$$) are the two points in the plane. OX and OY being the rectangular axes of reference. Let AB = d. Draw AP ⊥ OX,  BQ ⊥ OX and Ar ⊥ BQ

By the definition of coordinates,

OP = x$$_{1}$$, AP = y$$_{1}$$, OQ = x$$_{2}$$, BQ = y$$_{2}$$

From geometry, AR = PQ = OQ - OP = x$$_{2}$$  - x$$_{1}$$, and

BR = BQ - RQ = BQ - AP = y$$_{2}$$ - y$$_{1}$$.

In the right-angled triangle ARB,

AB$$^{2}$$ = AR$$^{2}$$ + BR$$^{2}$$

Or, d$$^{2}$$ = (x$$_{2}$$  - x$$_{1}$$)$$^{2}$$ + (y$$_{2}$$ - y$$_{1}$$)$$^{2}$$

Therefore,

d = $$\sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}$$

The distance between two points (x$$_{1}$$, y$$_{1}$$) and (x$$_{2}$$, y$$_{2}$$) = $$\sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}$$

= $$\sqrt{(difference of x-coordinates)^{2} + (difference of y-coordinates)^{2}}$$

This formula is known as distance formula.

Example: The distance between the points (2, 3) and (-1, -1)

= $$\sqrt{(-1 - 2)^{2} + (-1 - 3)^{2}}$$

= $$\sqrt{(-3)^{2} + (-4)^{2}}$$

= $$\sqrt{9 + 16}$$

= $$\sqrt{25}$$

= 5

That is 5 units.

Note:

(i) The distance between two points is always positive.

(ii) The distance of a point (x, y) from the origin (0, 0) = $$\sqrt{(x - 0)^{2} + (y - 0)^{2}}$$ = $$\sqrt{x^{2} + y^{2}}$$

(iii) The distance formula d$$^{2}$$ = (x$$_{2}$$  - x$$_{1}$$)$$^{2}$$ + (y$$_{2}$$ - y$$_{1}$$)$$^{2}$$ should be understood as an algebraic relation between five variables x$$_{1}$$, y$$_{1}$$, x$$_{2}$$, y$$_{2}$$ and d. Given any four of them, the fifth variable can be known.