# 3D Distance Formula

Distance Formula in 3D calculates the distance between two points, a point and a line, and a point and a plane in three-dimensional coordinates as well as a two-dimensional Cartesian Plane. This article deals with the distance formula of points in three-dimensional space. In three dimensions, a point is represented as P(x, y, z). In this article, we will learn the 3D Distance formula, its derivation, and solved examples based on it.

## What is 3D Distance Formula?

The 3D Distance formula is used to calculate the distance between two points, a point, and a line, and between a point and a plane in a three-dimensional space. 3D geometry comes into the picture to model real-world quantities such as velocity, fluid flows, electrical signals, and many other physical quantities. 3D geometry deals with three coordinate points represented using three coordinate axes namely x, y, and z which are mutually perpendicular. In 3D Distance Formula we will learn the 3D Distance formula for the** **following cases:

- Distance between Two Points in 3D
- Distance between a Point and Origin in 3D
- Distance of Point From a Line
- Distance Between Parallel Lines
- Distance of a Point from a Plane

### Distance between Two Points in 3D

For two points P(x_{1}, y_{1}, z_{1}) and Q(x_{2}, y_{2}, z_{2}) located in three dimensional space, the 3D distance formula is given as

In case of origin one of the points will be O(0, 0, 0) and hence we will use x_{1 }= 0, y_{1} = 0 and z_{1} = 0 in the formula to calculate the distance.

**Example: Find the distance between two points P(2, 5, 6) and Q(3, 4, 7)**

**Answer:**

For point P, x

_{1}= 2, y_{1}= 5, z_{1}= 6For point Q, x

_{2}= 3, y_{2}= 4, z_{2}= 7Distance between P and Q is given as

PQ = âˆš[(x

_{2}– x_{1})^{2}+ (y_{2}– y_{1})^{2}+ (z_{2}– z_{1})^{2}]Now filling the values of coordinates in the above formula we get

PQ = âˆš[(3 – 2)

^{2}+ (4 – 5)^{2}+ (7 – 6)^{2}]â‡’ PQ = âˆš(1 + 1 + 1) = âˆš3 units

### Distance between a Point and Origin in 3D

Like 2D system we can also calculate the distance between a point and origin. In 3D system the coordinates of origin is given as O(0, 0, 0). Hence, we need to put the values of x_{1} = 0, y_{1} = 0 and z_{1} = 0 or even can chose x_{2}, y_{2} and z_{2} to be zero as this does not cause any change is the value. The distance formula to calculate the distance between a point and origin in 3D is given in the image attached below:

**Example: Calculate the distance between P(-1, 2, 4) and origin O.**

**Solution:**

We know that the coordinates for origin is O(0, 0, 0)

Hence, the Distance between origin O(0, 0, 0) and P(-1, 2, 4) is given as

OP = âˆš(x

^{2}+ y^{2}+ z^{2})â‡’ OP = âˆš{(-1)

^{2}+ 2^{2}+ 4^{2}}â‡’ OP = âˆš{1 + 4 + 16} = âˆš21 units

### Derivation of 3D Distance Formula between Two Points

The derivation of 3D Distance Formula can be understood with the help of the following image.

Let there be two points P(x_{1}, y_{1}, z_{1}) and Q(x_{2}, y_{2}, z_{2}) in three-dimensional space and are part of rectangular axes. Through Points P and Q draw planes parallel to the coordinate plane. Thus we get a rectangular parallelepiped in which PQ is body diagonal.

Consider Point A adjacent to Q such that AP is face diagonal. Now, AP is along one of the coordinate axes, hence AP is perpendicular to AQ.

Using Pythagoras Theorem

PQ^{2} = AP^{2} + AQ^{2} ….. (i)

Now take a point M adjacent to P and A such that MQ is a body diagonal

AP^{2} = AM^{2} + PM^{2} ……(ii)

Putting the values of AP^{2} from (ii) to (i)

â‡’ PQ^{2} = AM^{2} + PM^{2} + AQ^{2}

PM = x_{2} – x_{1}

AQ = y_{2} – y_{1}

AM = z_{2} – z_{1}

Hence,

PQ^{2} = (x_{2} – x_{1})^{2} + (y_{2} – y_{1})^{2 }+ (z_{2} – z_{1})^{2}

Hence, if PQ = d

then distance formula between two points in 3D is given as

d^{2} = (x_{2} – x_{1})^{2} + (y_{2} – y_{1})^{2} + (z_{2} – z_{1})^{2}

â‡’ d = âˆš[(x_{2} – x_{1})^{2} + (y_{2} – y_{1})^{2} + (z_{2} – z_{1})^{2}]

If the distance is measured from the origin then the 3D Distance formula is given as

d = âˆš(x^{2}+ y^{2}+ z^{2})

**Example 1:****Find the distance between the points P(1, â€“3, 4) and Q (â€“ 4, 1, 2).**

**Solution:**

Using the formula to calculate the distance between point P and Q,

Distance (d) = âˆš[(x

_{2}– x_{1})^{2}+ (y_{2}– y_{1})^{2}+ (z_{2}– z_{1})^{2}]d =

(-4-1)âˆš[^{2}+(1+3)^{2}+(2-4)^{2}] = âˆš(25 + 16 + 4) = âˆš45 units

** Example 2: Show that the points P (â€“2, 3, 5), Q (1, 2, 3)**,

**and R (7, 0, â€“1) are collinear.****Solution:**

We know that points are said to be collinear if they lie on a line.

PQ = âˆš{(1+2)

^{2 }+ (2-3)^{2 }+ (3-5)^{2}} = âˆš{9+1+4} = âˆš14 unitsQR = âˆš{(7-1)

^{2}+ (0-2)^{2}+(-1-3)^{2}} = âˆš{36+4+16} = âˆš56 = 2âˆš14PR = âˆš{(7+2)2 + (0-3)2 + (-1-5)2} = âˆš{81+9+36} = âˆš126 = 3âˆš14

+As PQ=QRPRHence P, Q, and R are collinear.

### Distance** of Point From a Line**

**of Point From a Line**

The distance of a point from a line is the perpendicular distance from the point to the line.

Suppose we have to find the distance of a point P(x_{0}, y_{0, }z_{0}) from line l, then the formula is,

Distance (d) =

Where ‘s’ is the directing vector of line l.

**Example: Find the distance from point P(-6, 1, 21) to a line ****?**

**Solution:**

Let Line L :

P(-6, 1, 21) and P'(3t-4, t-5, t-1)

â‡’

â‡’

Now,

â‡’

â‡’ 9t + 6+t -6+t-22 = 0, 11t – 22=0 and t=2

â‡’

â‡’

â‡’

â‡’ d =

### Distance of a Point from a Plane

The distance from a point to a plane is the perpendicular distance from a point on a plane.

If Qx + Ry + Sz + T = 0 is a plane equation, then the distance from point P(P_{x}, P_{y}, P_{z}) to the plane can be found using the following formula:

Distance (d) =

**Example: Find the distance between plane 2x + 4y – 4z – 6 = 0 and point P(0, 3, 6)?**

**Solution:**

Using the formula:

Distance (d) =

â‡’ d =

â‡’ d = |-18|/âˆš36 = 18/6 = 3

### Distance Between Parallel Lines

The distance between any two parallel lines is the perpendicular distance from any point on one line to the other line.

Suppose there are two parallel lines y = mx + c_{1} and y = mx + c_{2}, then the formula is,

Distance (d) =

If the equation of two parallel lines is given as:

ax + by + d_{1} = 0 and ax + by + d_{2} = 0, then the formula is,

Distance (d) =

Where a and b are the coefficients of variables x and y in the line.

**Example 1: Find the distance between parallel lines y = 2x + 10 and y = 2x + 12.**

**Solution:**

The lines y = 2x + 10 and y = 2x + 12 are in form y = mx + c.

Where

c_{1}â€‹ = 10,c_{2 }â€‹= 12,= 2mUsing formula, the distance (d) = |12-10|/âˆš(1 + 2

^{2}) = 2/5

**Example 2: Find the distance between two parallel lines 4x + 3y + 6 = 0 and 4x + 3y – 3 = 0**

**Solution:**

The lines given are 4x + 3y + 6 = 0 and 4x + 3y – 3 = 0. Both lines are in the form ax + by + d = 0.

Hence,

d_{1 }â€‹= 6,d_{2 }â€‹= âˆ’3,= 4,a= 3bUsing the formula for this case, distance (d) will be calculated as:

â‡’ d =

â‡’ d =

â‡’ d = |-9|/âˆš(16 + 9)

â‡’ d = 9/âˆš25

â‡’ d = 9/5

**Read More,**

## Practice Questions on 3D Distance Formula

**Q1: Calculate the distance between the points P(-1, 0, 1) and Q(2, -1, 3)**

**Q2: Calculate the distance of the point (3, -5, 4) from the Origin.**

**Q3: Calculate the distance between the plane x + 2y – z + 3 = 0 and the Point (1, -2, 1)**

**Q4: Calculate the distance between two parallel lines 3x + 2y + 5 = 0 and 3x + 2y + 6 = 0**

## FAQs on 3D Distance Formula

### 1. How is a Point represented in 3D?

A Point is represented in 3D by using three coordinates as P(x, y, z) where, x, y, z are the coordinates of point P along the x, y, and z axis

### 2. What is 3D Distance Formula?

The 3D Distance Formula is used to calculate the distance between two points, between a point and a line, and between a point and a plane in three-dimensional space.

### 3. What is the Distance Formula between Two Points in 3D?

The distance formula between two points is 3D is given as PQ = âˆš[(x

_{2}– x_{1})^{2}+ (y_{2}– y_{1})^{2}+ (z_{2}– z_{1})^{2}]

### 4. What is the Distance Formula between a Point and the Origin in 3D?

The Distance between a point and origin in 3D is given as PO = âˆš(x

^{2}+ y^{2}+z^{2})

### 5. How to Derive Distance Formula for Two Points in 3D?

The distance formula for two points in 3D can be derived by drawing planes parallel to the coordinate axes such that the distance between two points appears as a part of a rectangular parallelepiped. The detailed derivation has been discussed under the heading ‘Derivation of Distance Formula Between Two Points in 3D’.

## Please

Loginto comment...