Geometry

##### Related Content

Tutors/teachers:

# Distance Formula

#### Lesson Contents

## What is the Distance Formula?

**The distance formula is a way of finding the distance between two points.** It does this by creating a virtual right triangle and using the Pythagorean theorem. The distance formula has a 2D (two-dimensional) variation and a 3D (three-dimensional) variation.

The 2D distance formula is given as:**d =**

The 3D distance formula is given as:**d =**

Where *d* is the distance between the points, (*x _{1}*,

*y*,

_{1}*z*) is point 1, and (

_{1}*x*,

_{2}*y*,

_{2}*z*) is point 2.

_{2}### How the Distance Formula Works

**The 2D distance formula is the Pythagorean formula applied to two points in the x-y coordinate plane.** The first component inside of the square root is (x_{2} – x_{1})^{2}. This is the horizontal leg of the right triangle. The second component inside the square root is (y_{2} – y_{1})^{2}. This is the vertical leg of the right triangle.

**We can visualize the 3D distance formula as a right triangle that happens to reside in the x-y-z 3D coordinate system.** Because the two points we are measuring between do not sit flat on a 2D plane, we add in the third term with the variable *z*. The third term inside of the square root is (z_{2} – z_{1})^{2}. It allows the distance between the points to be accurately calculated when they are in 3D space.

### 2D Distance Formula Example Problem

Find the distance between the points (2, 5) and (7, 3).

Solution:

1.) The points lie in a 2D system/plane. So, we will use the 2D formula.

2.) Let’s substitute the points into the equation and then simplify.

d =

d =

d =

3.) **The distance between the points is d =** .

### 3D Distance Formula Example Problem

Find the distance between the points (1, 4, 11) and (2, 6, 18).

Solution:

1.) The points are in 3D space, so we will use the 3D distance formula.

2.) Let’s substitute the points into the equation and then simplify.

3.) **The distance between the points is d =** .