Distance Formula

In coordinate geometry, the distance formula is a formula which is used to find the distance between two points. It is an application of Pythagoras theorem. You should not get confused here with the previously learned formula of speed and distance. They are completely different topics where we discuss the real life scenarios and the formula for distance covered by an object is given by the product of speed of object and time taken to cover it. 

In this article, you will learn the distance formula, its derivation and some numerical examples to find distance between two points.

Distance Formula in Coordinate Geometry

To locate the position of an object or a point in a plane, we do it with the help of coordinate geometry. For this, we require two perpendicular axes (i.e., x-axis and y-axis) and the coordinate plane. The distance of a point from the y- axis is called its x-coordinate also called as abscissa, and the distance of the point from the x- axis is called its y-coordinate also called as ordinate. If the abscissa of a point is x and the ordinate is y, then the coordinates of the point is given by (x, y). So, when an object moves from one point to another point in a plane, then the distance between the start point and endpoint is calculated using the distance formula.

What is the Distance Formula?

The distance formula is a formula which is used to find the distance between two points in the coordinate plane. Let there are two points P(x1, y1) and Q(x2, y2) in the coordinate plane, then the distance between these two points is found using the distance formula, which is given by:

PQ = \[\sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}\]

Derivation of Distance Formula

The distance between two points P(x1, y1) and Q(x2, y2) is given by the formula  PQ = \[\sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}\]

Proof: Let P(x1, y1) and Q(x2, y2) be the given points.

Draw PR perpendicular to OX, QS perpendicular to OX and PT perpendicular to QS.

Now, OR = x1, OS =  x2, PR = y1 and QS = y2.

So, PT = RS = (OS - OR) = (x2 - x1),

QT = (QS - TS) = (QS - PR) = (y2 - y1)

Using Pythagoras theorem,

In right triangle PTQ, we have

PQ2 = PT2 + QT2

⇒ PQ2 = (x\[_{2}\] - x\[_{1}\])\[^{2}\] + (y\[_{2}\] - y\[_{1}\])\[^{2}\] 

⇒ PQ = \[\sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}\] 

Hence, the distance between the points P(x1, y1) and Q(x2, y2) is given by 

PQ = \[\sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}\].

Solved Examples

Q.1)  Find the Distance Between the Two Points P(13,7) and Q(9, 10).


The given points are P(13,7) and Q(9, 10).

Then, x1 = 13, y1 = 7 and x2 = 9, y2 = 10.

So, PQ =  \[\sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}\]

            = \[\sqrt{(9 - 13)^{2} + (10 - 7)^{2}}\]

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

            = \[\sqrt{16+9}\] = \[\sqrt{25}\] = 5 units.

Q.2) Find the Value of k for Which the Distance Between the Two Points A(3, -1) and B(11, k) is 10 Units.


The given points are A(3, -1) and B(11, k). Also, 

    AB = 10 

⇒ AB2 = 100 

⇒ (11 - 3)2 + (k + 1)2 = 100

⇒ 82 + (k + 1)2 = 100

⇒ (k + 1)2 = 100 - 64 = 36

⇒ (k + 1)2 = 62

⇒ k + 1 = 6

⇒ k + 1 = 6 or k + 1 = - 6

⇒ k = 5 or k = -7

Hence, the required values of k are 5 and -7.

Q.3) Check Whether the Given Points A(1, 1), B(-2, 7) and C(3, -3) are Collinear or Not.


In order to check the collinearity of three given points A, B and C, first of all we will find the distances AB, BC and AC. If the sum of any two of these distances is equal to the third distance then the given three points are collinear.

So, AB = \[\sqrt{(-2 - 1)^{2} + (7 - 1)^{2}}\] = \[\sqrt{(-3)^{2} + (6)^{2}}\] = \[\sqrt{45}\] = 3\[\sqrt{5}\] units

BC = \[\sqrt{(3 + 2)^{2} + (-3 - 7)^{2}}\] = \[\sqrt{(5)^{2} + (-10)^{2}}\] = \[\sqrt{125}\] = 5\[\sqrt{5}\] units

AC =  \[\sqrt{(3 - 1)^{2} + (-3 - 1)^{2}}\] = \[\sqrt{(2)^{2} + (-4)^{2}}\] = \[\sqrt{20}\] = 2\[\sqrt{5}\] units

Since, AB + AC = 3\[\sqrt{5}\] + 2\[\sqrt{5}\] = 5\[\sqrt{5}\] units = BC

Thus, AB + AC = BC

Therefore, the given three points A, B and C are collinear.

FAQ (Frequently Asked Questions)

Q.1) How Will You Obtain the Distance of the Point P(x, y) from the Origin O(0,0)?


Using the distance formula, the distance between point P and origin O is given by:

OP = √(x - 0)² + (y - 0)²  

OP = √x² + y²

Therefore, the distance of the point P(x, y) from the origin O(0, 0) is given by OP =  √x² + y².

Q.2) Can We Apply the Distance Formula for More than Two Points?


No, the distance formula can not be applied for more than two points at a time. In distance formula, the location of one point is expressed relative to the other point and it is used for determining how far apart the two points are from each other. We can extend the distance formula for multiple dimensions and generalise the formula to compute the distance between two points. 

Q.3) What is the Formula for Distance Between Two Points in a Three-dimensional Space?


Let the two points in a three-dimensional space be given by A(x1, y1, z1) and B(x2, y2, z2), then the distance between them in a three-dimensional space is given by formula:

AB =  √(x₂ - x₁)² + (y₂ - y₁)² + (z₂ - z₁)².