# Distance Between Two Points Formula

**Distance between two points formula** uses the coordinates of two points in space. In coordinate geometry, the distance between two points can be calculated using distance formula, present in a two-dimensional or three-dimensional space. The distance formula for two points is also an application of the Pythagoras theorem. Let us learn more in this article with examples.

## What is Distance Between Two Points Formula?

Distance between two points is the length of the line segment that connects the two points in a plane. The formula to find the distance between the two points is usually given by d=√((x_{2 }– x_{1})² + (y_{2 }– y_{1})²). This formula is used to find the distance between any two points on a coordinate plane or x-y plane.

## Distance Formula for Two Points

As discussed, the distance formula is used to find the distance between any two points, when we already know the coordinates. The points could be present alone on the x-axis or y-axis or in both axes.

Let us consider, there are two points say A and B in an XY plane. The coordinates of point A are (x_{1},y_{1}) and of B are (x_{2},y_{2}). Then the formula to find the distance between two points PQ is given by:

**Note:** If the coordinates of two points P and Q are such that, (x_{1}, 0) and (x_{2}, 0), the distance between PQ will be given by:

PQ = |x_{2} – x_{1}|

## Distance Between Two Points on a Coordinate Plane

In case of a two-dimensional plane, the two points lie along x-axis and y-axis. The distance of a point from the y-axis is known as its x-coordinate or abscissa. The distance of a point from the x-axis is known as its y-coordinate, or ordinate. The coordinates of a point on the x-axis and y-axis are of the form (x, 0) and (0, y), respectively.

In the above graph, the distance between point origin O(0,0) and P(x,y) is given by:

OP = √((x_{2 }– 0)² + (y_{2 }– 0)²)

OP = √((x_{2})² + (y_{2})²)

or simply,

OP = √(x² + y²)

where x and y are coordinates of point other than origin.

## Distance Between Two Points Formula in 3D Space

If we have to find the distance between the points in a three-dimensional space, then we consider here an extra coordinate which is present in the z-axis.

Let us consider two points A(x_{1},y_{1},z_{1}) and B(x_{2},y_{2},z_{2}) in 3d space. Then, the distance formula for these two points is given by;

Distance of any point P(x,y,z) in space from origin O(0,0,0), is given by,

\(AB = \sqrt{x^{2}+y^{2}+z^{2}}\)## Related Articles

- Distance Between Two Points
- Distance between Two Lines
- Midpoint theorem
- Distance Between Two Points in Three Dimensions

## Solved Examples

**Q.1: What is the distance between two points A and B whose coordinates are (3, 2) and (9, 7), respectively?**

Solution: Given, A (3,2) and B(9,7) are the two points in a plane.

We have to find the distance between A and B.

Using distance between formula for two points, we know;

distance, d=√((x_{2 }– x_{1})² + (y_{2 }– y1)²)

Here, x_{1} = 3, x_{2} = 9, y_{1} = 2 and y_{2} = 7.

Thus, putting all the values of x and y in the formula, we get;

d=√((9-3)² + (7-2)²)

d = √(6^{2} + 5^{2})

d = √(36 + 25)

d = √61 unit.

**Q.2: Find the distance of a point P(4, 3) from the origin.**

Solution: Given, P(4, 3) is a point at a distance from the origin.

The coordinates of a point at the origin will be (0,0).

Using the distance between formula for two points, we know;

distance, d=√((x_{2 }– x_{1})² + (y_{2 }– y1)²)

Here, x_{1} = 4, x_{2} = 0, y_{1} = 3 and y_{2} = 0.

Thus, putting all the values of x and y in the formula, we get;

d = √((0-4)² + (0-3)²)

d = √(4^{2} + 3^{2})

d = √(16 + 9)

d = √25

d = 5 unit