Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The distance formula in 3-D space is defined as:

$$|P_1\, P_2| = \sqrt{(x_2- x_1)^2 + (y_2 -y_1)^2 + (z_2- z_1)^2}$$

My question is that if I have 2 points that have negative coordinates, do I have to use the absolute value on all the points?

For example my two points are $\,P(3, -2, -3)\,\,,\,\, Q(7,0,1)$

When I plug in the y and z values of P do I have to use positive 2 and positive 3?

Thanks in advance.

share|cite|improve this question
up vote 3 down vote accepted

Do it exactly like it says: $7-3=4$, $0-(-2)=2$, $1-(-3)=4$, so the distance is $$\sqrt{4^2+2^2+4^2}.$$ This turns out to be $\sqrt{36}$, which is $6$.

Another example: Suppose that $(x_1,y_1,z_1)=(-11, 9, -4)$ and $(x_2,y_2,z_2)=(-3, 5,6)$. Then $x_2-x_1=(-3)-(-11)=8$, $y_2-y_1=5-9=-4$, and $z_2-z_1=6-(-4)=10$, so the distance is $\sqrt{8^2+(-4)^2+10^2}$, which is $\sqrt{180}$.

As usual, one has to take care with the minus signs, since slips are all too easy to make.

share|cite|improve this answer

The formula is correct for all real numbers. You don't need absolute value. (Note that $-3$ and $1$ are $4$ units apart, not $2$.)

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.