# Real Analysis: The Real Numbers

## Absolute Value

### Motivation - Magnitude

Real numbers can be either positive or negative. However, we would sometimes like to know the magnitude of a number without knowing its sign. For example, the numbers 100 and -100 are both one hundred "in size," and we would like to be able to capture this fact somehow. This is done by taking the absolute value of a number.

### Absolute Value

The absolute value of a real number $a$ is given by the function $| \cdot | : \mathbb{R} \rightarrow \mathbb{R},$ which denoted by placing vertical bars around the argument, and is defined as follows:

$$|x| = \left\{ \begin{array}{rl} x & x \geq 0\\ -x & x < 0 \end{array} \right.$$

It follows from the definition that the absolute value of any real number is always non-negative. This function captures the similarity in "size" of numbers by simply removing the negative sign, should there be one, such that $|x| = |-x|.$

### A Nice Little Toolbox

The problems below deal with proving various facts about the absolute value function, which are frequently useful in more advanced proofs. Since the absolute value function contains two cases, the proofs about its properties often involve dealing with two cases (or more!), and as such it's tidier to prove these these properties here in isolation rather than in the course other proofs, especially when certain facts are used over and over again. By keeping those bigger proofs tidier, we can focus on the bigger ideas they're setting out to prove without getting distracted by simpler things like absolute value.

## Problems

1. Show that $|x| \geq x$ for all $x \in \mathbb{R}$.

If $x \geq 0$, then $|x| = x$. If instead $x < 0$, then $x < 0 < -x = |x|$. Therefore $|x| \geq x$.

2. Triangle Inequality: Show that $|x + y| \leq |x| + |y|$.

Either $|x + y| = x + y$ or $|x + y| = -(x + y)$. Because $x \leq |x|$, we see that $x + y \leq |x| + y$. By the same logic, we see that $|x| + y \leq |x| + |y|$. Therefore $x + y \leq |x| + |y|$. Likewise, $-(x+y) = -x - y \leq |-x| - y \leq |-x| + |-y| = |x| + |y|$. Therefore $|x + y| \leq |x| + |y|$.

3. Show that $|xy| = |x||y|$.

Consider the first case when $|xy| = xy$. Then either $x$ and $y$ are both positive or both negative. If the former, $|x||y| = xy$. If the former, $|x||y| = (-x)(-y) = xy$. Consider the second case when $|xy| = -xy$. Then one of $x$ and $y$ is negative and the other is positive. If $x<0$ and $y>0$, then |x|=-x and $|y|=y$, so $|x||y| = -xy$. If instead $x>0$ and $y<0$, then $|x|=x$ and $|y|=-y$, so $|x||y| = -xy$. Thus in both cases $|xy| = |x||y|$.

4. Show that $\sum\limits_{i=1}^n x_i \leq \sum\limits_{i=1}^n |x_i|$.

Proof by induction. Base case: Let $n = 1$. Then $\sum\limits_{i=1}^1 x_i = x_i \leq |x_i| = \sum\limits_{i=1}^1|x_i|$. Inductive step: Assume $\sum\limits_{i=1}^n x_i \leq \sum\limits_{i=1}^n |x_i|$. Then

$\sum\limits_{i=1}^{n+1} x_i = x_{n+1} + \sum\limits_{i=1}^n x_i \\ \sum\limits_{i=1}^{n+1} x_i \leq x_{n+1} + \sum\limits_{i=1}^n |x_i| \\ \sum\limits_{i=1}^{n+1} x_i \leq |x_{n+1}| + \sum\limits_{i=1}^n |x_i| \\ \sum\limits_{i=1}^{n+1} x_i \leq \sum\limits_{i=1}^{n+1} |x_i|$

5. Show that if $|a - b| \leq \frac{1}{2}|a|$, then $\frac{1}{2}|a| \leq |b| \leq \frac{3}{2}|a|$.

If $a - b = 0$, then $a = b$, and $|b| = |a| = \frac{1}{2}|a| + \frac{1}{2}|a| \geq \frac{1}{2}|a|$.

If $a - b > 0$, then $a > b$, and it follows that $a - b \leq \frac{1}{2}|a|$. Therefore $a - \frac{1}{2}|a| \leq b$. If $a \geq 0$, then $\frac{1}{2}|a| \leq b$. Therefore $b > 0$, so $b = |b|$ and $\dfrac{1}{2}|a| \leq |b|$. If instead $a \leq 0$, then $b < 0$. Therefore $\frac{3}{2}a = -\frac{3}{2}|a| \leq b = -|b|$ and $|b| \leq \frac{3}{2}|a|$.

If $a - b < 0$, then $a < b$, and it follows that $b - a \leq \frac{1}{2}|a|$. Therefore $b \leq a + \frac{1}{2}|a|$. If $a \geq 0$, then $b > 0$ and $b = |b| \leq \frac{3}{2}|a|$. If instead $a \leq 0$, then $b \leq -\frac{1}{2}|a|$, so $|b| \geq \frac{1}{2}|a|$.

6. Show that $||a| - |b|| \leq |a - b|$.

First use the identity $a = (a - b) + b$:

$|a| = |(a - b) + b| \\ |a| \leq |a - b| + |b| \\ |a| - |b| \leq |a - b|$

Next use the identity $b = (b - a) + a$:

$|b| = |(b - a) + a| \\ |b| \leq |b - a| + |a| \\ |b| - |a| \leq |b - a| \\ |b| - |a| \leq |a - b| \\$

Since both $|a| - |b|$ and $|b| - |a|$ are less than or equal to $|a - b|$, it follows by the definition of absolute value that $||a| - |b|| \leq |a - b|$.

7. Show that if $|a| < \varepsilon$ and $|a + b| < \varepsilon,$ then $|b| < 2\varepsilon.$

If $|a| < \varepsilon,$ then $-\varepsilon < a < \epsilon.$ Likewise, if $|a + b| < \varepsilon,$ then $-\varepsilon < b + a < \varepsilon.$ There are three cases to consider.

1. If $a < 0,$ then $-\varepsilon < -\varepsilon - a < b < \varepsilon - a < 2\varepsilon.$

2. If $a = 0,$ then $|b| < \varepsilon.$

3. If $a > 0,$ then $-2\varepsilon < -\varepsilon - a < b < \varepsilon - a < \varepsilon.$

No matter the value of $a$, it follows that $-2\varepsilon < b < 2\varepsilon.$ Therefore $|b| < \varepsilon.$