Absolute value of a negative number

167 Views Asked by At

I was reading 'The method of Coordinates - Gelfand' and in the section about the absolute value of a number, it is stated what follows :

if x > 0, then |x| = x,
if x < 0, then |x| = -x,
if x = 0, then |x| = 0

"Since the points a and -a are located at the same distance from the origin of coordinates, the numbers a and -a have the same absolute value: |x| = |-x|."

I don't understand the second statement : if x < 0, then |x| = -x. Why is the absolute value of a negative number negative if a distance between 2 points, I suppose, can't be negative ? Plus, the author contradicts himself by saying that |x| = |-x|, because if |x| = x and |x| = |-x|, then |-x| = x. Is it a typing error or am I missing something ?

1

There are 1 best solutions below

2
On

You can define the absolute value by

$$|x|=\max(x,-x)$$

if $x<0$, $-x$ is bigger than $x$.