We define the absolute value x of a rational number x to be
We define the absolute value |x| of a rational number x to be :
|x| := x if x is positive.
|x| := x if x is negative.
|x| := 0 if x = 0.
The quantity |x y| is called the distance between x and y and is sometimes denoted
d(x, y), thus d(x, y) := |x y| where x y := x + (y).
Assuming that all the basic properties of order are true on Q the set of all rationals, show that :
i) |x + y| |x| + |y| (triangle inequality).
ii) y x y iff y |x|.
iii) d(x, z) d(x, y) + d(y, z).
Solution
i) |x| = max{x,-x}
|y| = max{y,-y}
So x+y <= |x| + |y|
And also -x + (-y) < = |x| + |y|
So max(x+y, -x+(-y)) <= |x| + |y|
hence |x+y| < = |x| + |y|
ii) y>= |x|
if and only if
y>= x and y >= -x
which is true if and only if
x<= y and x >= -y
iii) |x-z| = |x-y + y - z|
and now use i)
|x-y + y - z| < = |x-y| + |y-z|
