# What is the distance between (-5,13,4) and (2,-16,-2)?

Feb 5, 2016

$d \approx 30.4302$

#### Explanation:

We know that the distance formula for cartesian coordinates is as follows:

$\sqrt{{\left({x}_{2} - {x}_{1}\right)}^{2} + {\left({y}_{2} - {y}_{1}\right)}^{2}}$

In the case where there are three dimensions $\left(x , y , z\right)$, you just need to add another term to account for the z-coordinates.

$\sqrt{{\left({x}_{2} - {x}_{1}\right)}^{2} + {\left({y}_{2} - {y}_{1}\right)}^{2} + {\left({z}_{2} - {z}_{1}\right)}^{2}}$

Plugging in the values from the given...

[Given]
${P}_{1} : \left(- 5 , 13 , 4\right)$
${P}_{2} : \left(2 , - 16 , - 2\right)$

[Solution]
$d = \sqrt{{\left(2 - \left(- 5\right)\right)}^{2} + {\left(- 16 - 13\right)}^{2} + {\left(- 2 - 4\right)}^{2}}$
$d = \sqrt{{7}^{2} + {\left(- 29\right)}^{2} + {\left(- 6\right)}^{2}}$
$d = \sqrt{49 + 841 + 36}$
$d = \sqrt{926}$
$d \approx 30.4302$