Distance Formula
The distance formula is used to calculate the distance between two points whose coordinates are known to us. In Euclidean geometry, the distance between two points in the XY plane is calculated by using the distance formula. It is an application of the Pythagorean theorem. Let us explore how to use the distance formula along with the solved examples.
Formula to Calculate Distance
The distance formula gives the shortest distance between any two points which are used to find the distance in the distance formula. The distance formula is applicable only when the coordinates of the points are known to us. Given two points A (x_{1}, y_{1}) and B (x_{2}, y_{2}), the distance between them is given by:
\(d = \sqrt{(x_2 x_1)^2 + (y_2y_1)^2}\)
where
 d is the distance between A and B.
Solved Examples Using the Distance Formula

Example 1: Distance between points P and Q is √17 unit. If the coordinates of Q is (3, 4) and the ycoordinate of P is 0, then what are the possible coordinates for the point P? Solve this by using the distance formula.
Solution:
Let x coordinate of P be m.
P = (m, 0)
Q = (3, 4)
PQ = √ 17 units
By using the distance formula,
\(PQ = \sqrt{(m3)^2 + (04)^2} = \sqrt{17}\)
Squaring both sides, we get
\( (m3)^2 + (04)^2 = 17 \)
\(m^2  6m + 9 + 16 = 17\)
\(m^26m+8 = 0\)
By using the quadratic formula, we solve and get m = 2 and m = 4. Therefore, possible coordinates of P are (2, 0) or (4, 0).
Answer: Coordinates of P are (2, 0) or (4, 0).

Example 2: A circle with center C(2, 4) and a point on the circle P (5, 9) is given. Find the circumference of this circle, solve this by using the distance formula. (Use √ 34 = 5.38 and π = 3.14)
Solution:
Let the radius of the circle be r.
r = Distance between points P and C
r = \( \sqrt{(5  2)^2 + (9  4)^2} = \sqrt{34} \)
Circumference of the circle = 2πr = 2 π √34 = 2 (3.14) (5.83) = 36.61 units
Answer: The circumference of the circle = 36.61 units