What is the distance between (2, 3, 5) and (2, 7, 4) ?

1 Answer
Mar 13, 2016

sqrt(17) ~~ 4.123

Explanation:

The distance between (x_1, y_1, z_1) and (x_2, y_2, z_2) is given by the formula:

d = sqrt((x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2)

So in our case:

d = sqrt((2-2)^2+(7-3)^2+(4-5)^2)

=sqrt(0+16+1)=sqrt(17) ~~ 4.123

Distance formula for 3 dimensions

Here's how to derive the distance formula for 3 dimensions from Pythagoras theorem:

Given points (x_1, y_1, z_1) and (x_2, y_2, z_2), consider the triangle with vertices:

(x_1, y_1, z_1), (x_2, y_1, z_1), (x_2, y_2, z_1)

This is a right angled triangle with legs:

(x_1, y_1, z_1) (x_2, y_1, z_1) of length abs(x_2-x_1)

(x_2, y_1, z_1) (x_2, y_2, z_1) of length abs(y_2-y_1)

and hypotenuse:

(x_1, y_1, z_1) (x_2, y_2, z_1) of length sqrt((x_2-x_1)^2+(y_2-y_1)^2)

Next consider the triangle with vertices:

(x_1, y_1, z_1), (x_2, y_2, z_1), (x_2, y_2, z_2)

This is a right angled triangle with legs:

(x_1, y_1, z_1) (x_2, y_2, z_1) of length sqrt((x_2-x_1)^2+(y_2-y_1)^2)

(x_2, y_2, z_1) (x_2, y_2, z_2) of length abs(z_2-z_1)

and hypotenuse:

(x_1, y_1, z_1) (x_1, y_2, z_2) of length:

sqrt((sqrt((x_2-x_1)^2+(y_2-y_1)^2))^2+(z_2-z_1)^2)

=sqrt((x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2)