PDA

View Full Version : Distance Formula in 3 Dimensions


Draven
Oct25-09, 01:14 PM
Is it possible to change:
_______
distance = \/X2 + Y2

To:
_______________
distance = \/X^2 + Y^2 + Z^2

And get the distance between a point in 3 dimensional space and a the point of origin, just as the first equation does in 2 dimensional space?

Thanks!

HallsofIvy
Oct25-09, 01:30 PM
Yes, that's correct. On way to see that is to "drop" a perpendicular from (x, y, z) to (x, y, 0). The x-axis, from (0,0,0) to (x,0,0), the line from (x,0,0) to (x,y,0), and the direct line from (0,0,0) to (x, y, z) form a right triangle with legs of length x and y and hypotenuse of length \sqrt{x^2+ y^2}. Now that line from (0,0,0) to (x,y,0), the line from (x,y,0) to (x,y,z), and the line from (0,0,0) to (x,y,z) form a right triangle with legs of length \sqrt{x^2+ y^2} and z.

So you can use the Pythagorean theorem again to get that the distance from (0,0,0) to (x,y,z), the hypotenuse is \sqrt{(\sqrt{x^2+y^2}^2+ z^2}= \sqrt{x^2+ y^2+ z^2}.

Draven
Oct25-09, 04:37 PM
Ok cool!