Absolute Difference of Two Integers

2k Views Asked by At

New to math. I'm looking for an explanation (proof, rule, relationship or property) that explains that the absolute value of the difference between two integers $x$ and $y$ are equal regardless of:

  1. the sign of $x$ or $y$
  2. the order of subtraction. meaning regardless whether $x$ is the minuend or subtrahend

$$x - y = |d| = y - x$$

4

There are 4 best solutions below

4
On BEST ANSWER

What you wrote, $x-y=|d|=y-x$ is incorrect. Take x=1 an y=2 for example. $1-2\neq2-1$

What you probably meant to say is this. ($d$ is positive)

$$|x-y|=d=|y-x|$$

Here is my explanation:

$$x-y=-(-x)+(-y)$$ $$x-y=-((-x)+y)$$ $$x-y=-(y-x)$$

Now, in simple terms, the absolute value of a a number just makes it posotive. Because of that, for any variable $n, |-n|=|n|$. Therefore:

$$|-(y-x)|=|y-x|$$ so $$|x-y|=|y-x|$$

0
On

If $A \ge 0$ then $|A| = A $.

If $A < 0$ then $A = -|A|$ and $|A| =-A $.

So if $y > x $ then $y - x > 0$ so $|y-x| = y -x $, while $x - y < 0$ so $|x-y| = -(x - y) = -x + y = y - x = |y-x|.$

If $y < x $ then $y - x < 0$ and $|y-x|=-(y-x)=x - y $ while $x - y > 0$ so $|x-y| = x-y = |y-x|$.

And if $y=x $ then $y-x=x-y=0$ and $|y-x|=|x-y|=0$.

0
On

More colloquially:

An absolute value renders everything positive (or zero). If the number is positive to begin with then the absolute value is the original number. If the number is negative, then the absolute value is "the same size but it's positive opposite".

If you subtract a smaller number from a bigger number you get a positive number. If you subtract a bigger number from a smaller number you get a negative number. X - Y and Y - X will both be "the same size" but one will be positive and the other negative (assume X and Y are different numbers). So their "absolute size regardless of sign" will both be the same.

0
On

As I understand, you are asking why the absolute difference of two numbers is not dependent on the order in which those numbers are subtracted. In other words, you are asking why the following equation is true. $$|x-y|=|y-x|$$ The absolute value of a number, $a$, ignores the sign of that number, thus $$|a|=|-a|$$ In the above equation, if $$a=x-y$$ then we see that $$|x-y|=|-(x-y)|$$ which simplifies to $$|x-y|=|y-x|$$