# Distance Between Two Points 3D

Distance refers to a mathematical quantity that shows how far the two points lie from each other. Indeed, distance is one of the essential mathematical quantities. It plays a significant role in advanced mathematics and physics. It helps to determine the velocity of a moving object, magnitude and direction of gravitational and electrical forces, and it helps with signal processing too. In mathematics, distance formula is used for finding the distance between two points in a coordinate plane. The distance between the two points formula can be evaluated when you know the coordinates of the two points in a plane. By inserting those points in the formula, you can quickly find the distance between two points. In this article, you can learn about the distance between two points in 3D, its formula, and examples.

### Distance Between Two Points Formula

Typically, in 2D space, each point in the space gets qualified by two parameters: x-coordinate and y-coordinate. You require a pair of coordinate axis to locate the exact position of a point in a plan. The combination of x and y coordinates gets expressed in the form of an ordered pair such as, (x, y). So, the coordinates of a point, say M, can get expressed as, M (x, y). That ordered pair (x, y) gives you the coordinate of the point.

Before you learn to find the distance between two points 3D, you must know the basic distance formula, which is as below.

Considering two points M (x1, y1) and N (x2, y2) on the given coordinate axis, you can find the distance between them using the formula:

Steps to find the distance between two points:

• First, you need to take coordinates of two points like (x1, y1) and (x2, y2).

• Then, you have to use the distance formula, which is √ [(x2 – x1)² + (y2 – y1)²].

• Now, you have to calculate the vertical and horizontal distance between the two points. The horizontal distance (x2 – x1) represents the points on the x-axis, and vertical distance (y2 – y1) denotes the points on y-axis.

• Next, you have to square both the values obtained from (x2 – x1) and (y2 – y1).

• Now, all you need to do is add both the values, which looks like, (x2 – x1)2 + (y2 – y1)2.

• Finally, you need to find the square root of the obtained value.

• The value you get in the end is the distance between two points in the coordinate plane.

### Distance Between Two Points in 3D

The following study can get extended to find out the distance between two points in space. We can determine the distance between two points in 3D using a formula as derived below.

For now, refer to the fig. 1. Here, points P (x1, y1, z1) and Q (x2, y2, z2) refer to a system of rectangular axes OX, OY, and OZ.

From the points P and Q, you need to draw planes parallel to the coordinate plane. Then, you get a rectangular parallelepiped with PQ as the diagonal.

As you can see in the figure, ∠PAQ is forming a right angle. It enables us to apply the Pythagoras theorem in triangle PAQ.

So, now you get PQ2 = PA2 + AQ2 . . . . (I)

Also note that, in triangle ANQ, ∠ANQ is a right angle. Now, you need to apply Pythagoras theorem to ΔANQ as well.

Now, you obtain AQ2=AN2+NQ2 . . . . (II)

From equation (I) and equation (II), you get PQ2=PA2+NQ2+AN2.

As you know the coordinates of the points P and Q, PA = y2− y1, AN = x2− x1 and NQ = z2−z1.

Hence, $PQ^{2} = (x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2} + (z_{2} - z_{1})^{2}$.

Finally, the formula to obtain the distance between two points in 3D is –

$PQ = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2} + (z_{2} - z_{1})^{2}}$

That formula can give you the distance between two points P (x1, y1, z1) and Q (x2, y2, z2) in 3D.

Also note that the distance of any point Q (x, y, z) in space from origin O (0, 0, 0), can get expressed as, $OQ = \sqrt{x^{2} + y^{2} + z^{2}}$.

### Solved Examples

Question 1: Find the distance between two points given by A (6, 4, -3) and B (2, -8, 3).

Answer: Here, we need to use the distance formula to find the distance between points A and B.

You have, $AB = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2} + (z_{2} - z_{1})^{2}}$

$AB = \sqrt{(6 - 2)^{2} + (4 - (-8)^{2} + (-3 -3)^{2}}$

$AB = \sqrt{16 + 144 + 36}$

Finally, AB = 14; so the distance between points A and B is 14.

Question 1. Explain Three Dimensions and 3D Coordinate System.

Answer: Typically, the space dimensions get expressed as x-y-z, and they represent the width, length, and height. Three-dimensional shapes refer to shapes such as cone, sphere, prism, cylinder, cube, and rectangle, etc. All these shapes occupy space, and they have a certain volume too. Further, the 3D coordinate system refers to a Cartesian coordinate system; it relies on the point called an origin. It comprises three mutually perpendicular vectors that define three coordinate axes, namely x, y, and z. You can call them as abscissa, ordinate, and applicate axis, in a respective manner.

Question 2. Can the Distance Between Two Points be Negative?

Answer: No, you cannot have the distance between two points as a negative integer. Here are three reasons why distance cannot be negative.

• Distance represents how far the two points are from each other. It’s a physical quantity, and it cannot be negative.

• From the distance formula, it’s an outcome of the square root of the addition of two positive numbers. Keep in mind that the addition of two positive numbers is positive and their square root must be positive too.

• Even if the distance between two points is zero; it is still a non-negative integer. And that’s why the distance between two points can never be negative.