How to determine the distance to one point from another in a 3D coordinate system?

1.7k Views Asked by At

I wonder how I can calculate the distance between two coordinates in a $3D$ coordinate-system. Like this. I've read about the distance formula:

$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

(How) Can I use that it $3D$ coordinates, or is there any other method?

Thanks!

2

There are 2 best solutions below

1
On BEST ANSWER

In three dimensions, the distance between two points (which are each triples of the form $(x, y, z))$ is given by $$d= \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2 + (z_2-z_1)^2}$$

1
On

The distance between two points $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$ is given by

$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2+(z_2 - z_1)^2}$$