Absolute Value: Distance from 0

How do we measure the size of a number without its sign? That measure is the absolute value.

On the number line it is the distance from 0. Positive numbers stay as they are; negative numbers shed their sign. The rules of distance come with it. A length is never negative, and a combined walk never exceeds the sum of its parts. That is the triangle inequality.

For example, 🌡 −3 degrees and +3 degrees are the same distance from 0 degrees. The sign is the direction; the absolute value is the distance.

∣x∣={xx≥0−xx<0|x| = \begin{cases} x & x \ge 0 \\ -x & x < 0 \end{cases}
∣x+y∣≤∣x∣+∣y∣|x + y| \le |x| + |y|
∣xy∣=∣x∣ ∣y∣|xy| = |x| \, |y|

Examples & Exercises

Prove completely that for all real x,yx, y, the triangle inequality ∣x+y∣≤∣x∣+∣y∣|x + y| \le |x| + |y| holds.

∣x+y∣≤∣x∣+∣y∣|x + y| \le |x| + |y|
Opposite signs — the sum cancels in part, leaving slack.
Show proof
  1. Both sides are non-negative, so compare their squares. ∣x+y∣2=(x+y)2=x2+2xy+y2|x + y|^2 = (x + y)^2 = x^2 + 2xy + y^2.

  2. Trap the middle term: xy≤∣xy∣=∣x∣ ∣y∣xy \le |xy| = |x| \, |y|, so ∣x+y∣2≤∣x∣2+2∣x∣ ∣y∣+∣y∣2=(∣x∣+∣y∣)2|x + y|^2 \le |x|^2 + 2|x| \, |y| + |y|^2 = (|x| + |y|)^2.

  3. On non-negative numbers the square root preserves order. Taking square roots of both sides gives ∣x+y∣≤∣x∣+∣y∣|x + y| \le |x| + |y|. The proof is complete.

Prove completely that for all real x,yx, y, ∣∣x∣−∣y∣∣≤∣x−y∣\bigl| |x| - |y| \bigr| \le |x - y| holds.

∣∣x∣−∣y∣∣≤∣x−y∣\bigl| |x| - |y| \bigr| \le |x - y|
Two points in the same direction — the difference of lengths never exceeds the distance.
Show proof
  1. Since x=(x−y)+yx = (x - y) + y, the triangle inequality gives ∣x∣≤∣x−y∣+∣y∣|x| \le |x - y| + |y|. Rearranging, ∣x∣−∣y∣≤∣x−y∣|x| - |y| \le |x - y|.

  2. Swapping the roles of xx and yy gives ∣y∣−∣x∣≤∣y−x∣|y| - |x| \le |y - x|. But ∣y−x∣=∣x−y∣|y - x| = |x - y|, so ∣y∣−∣x∣≤∣x−y∣|y| - |x| \le |x - y| holds too.

  3. Combining the two, ∣∣x∣−∣y∣∣=max⁡(∣x∣−∣y∣,∣y∣−∣x∣)≤∣x−y∣\bigl| |x| - |y| \bigr| = \max(|x| - |y|, |y| - |x|) \le |x - y|. The proof is complete.

Find all real xx satisfying ∣x−1∣<2|x - 1| < 2, and prove the equivalence completely.

∣x−1∣<2  ⟺  −1<x<3|x - 1| < 2 \iff -1 < x < 3
x=1x = 1 — at the center the distance is 0.
Show proof
  1. By the definition, for r>0r > 0, ∣a∣<r|a| < r is equivalent to −r<a<r-r < a < r. Check by sign: if a≥0a \ge 0 then ∣a∣=a|a| = a, so a<ra < r and −r<0≤a-r < 0 \le a; if a<0a < 0 then ∣a∣=−a|a| = -a, so −a<r-a < r, i.e. −r<a-r < a, and a<0<ra < 0 < r.

  2. Applying this with a=x−1a = x - 1 and r=2r = 2, ∣x−1∣<2|x - 1| < 2 is equivalent to −2<x−1<2-2 < x - 1 < 2. Adding 1 throughout gives −1<x<3-1 < x < 3.

  3. So the solution set is the open interval (−1,3)(-1, 3): exactly the points whose distance from 1 is less than 2.

2. Number Systems