---
title: Absolute Value, Bounded Sets, and Inequalities
module: Foundations and the Real Number System
moduleNumber: 1
lessonNumber: 3
order: 103
summary: >
  The absolute value turns the order on ℝ into a notion of distance, with the
  triangle inequality as the estimate underlying most later proofs. Covered: its
  algebra, the triangle and reverse-triangle inequalities, and the extension of the
  sup/inf vocabulary from sets to bounded functions.
topics: [Foundations and the Real Number System]
sources:
  - book: Lebl
    ref: "Ch. 1 — Real Numbers; §1.3 Absolute value and bounded functions"
draft: false
---

The [completeness axiom](/real-analysis/foundations/ordered-fields-completeness) gives
$\mathbb{R}$ its structure, but analysis is done with a second idea layered on top: distance.
The **absolute value** converts the order on $\mathbb{R}$ into a measure of how far apart two
numbers are, and its governing inequality, the triangle inequality, appears in essentially
every estimate in the subject.

## The absolute value as size

> **Definition (Absolute value).** For $x \in \mathbb{R}$,
> $$
> |x| = \begin{cases} x & \text{if } x \ge 0, \\ -x & \text{if } x < 0. \end{cases}
> $$

Think of $|x|$ as the size of $x$ with its sign discarded, and of $|x - y|$ as the distance
between $x$ and $y$ on the number line. The basic algebra follows straight from the two
cases.[^lebl-13]

> **Proposition (Properties of the absolute value).** For all $x, y \in \mathbb{R}$:
> - $|x| \ge 0$, with $|x| = 0$ if and only if $x = 0$;
> - $|-x| = |x|$ and $|xy| = |x|\,|y|$;
> - $|x|^2 = x^2$;
> - $|x| \le y$ if and only if $-y \le x \le y$;
> - $-|x| \le x \le |x|$.

The fourth item is the one used most: it converts a statement about a size into a pair of
ordinary inequalities, and back. In particular $|x - a| < \epsilon$ says exactly $a - \epsilon
< x < a + \epsilon$, i.e. $x$ lies within $\epsilon$ of $a$. The
[definition of a limit](/real-analysis/sequences-series/sequences-limits) is written in
exactly this form.

$$
% caption: The absolute value of a difference is the length of the segment between
% the two points, independent of which is larger.
\begin{tikzpicture}[scale=1.0, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->, black] (-0.3,0) -- (10.4,0);
\fill[black] (2.2,0) circle (2.2pt);
\fill[black] (7.6,0) circle (2.2pt);
\node[anchor=north] at (2.2,-0.1) {$x$};
\node[anchor=north] at (7.6,-0.1) {$y$};
% distance arrows
\draw[acc, thick, <->] (2.2,0.7) -- (7.6,0.7);
\node[text=acc, anchor=south] at (4.9,0.72) {distance from $x$ to $y$};
\draw[black, dashed] (2.2,0) -- (2.2,0.7);
\draw[black, dashed] (7.6,0) -- (7.6,0.7);
\node[anchor=north, black] at (0,-0.06) {$0$};
\end{tikzpicture}
$$

### Neighborhoods and the max/min identities

The interval interpretation of $|x - a| < \epsilon$ names a set used constantly in later
lessons: the **$\epsilon$-neighborhood** of $a$, the open interval $(a - \epsilon, a +
\epsilon)$ of points within $\epsilon$ of $a$. Convergence, continuity, and limits are all
phrased as "for every $\epsilon$-neighborhood of the target, eventually everything lands
inside it." The non-strict version, $|x - a| \le \epsilon \iff a - \epsilon \le x \le a +
\epsilon$, describes the closed interval $[a - \epsilon, a + \epsilon]$. Reading a distance
bound as membership in an interval, and back, is a move made without comment from here on.

$$
% caption: The epsilon-neighborhood of a is the open interval of points within
% distance epsilon of a, spanning one radius on each side of the center.
\begin{tikzpicture}[scale=1.0, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->, black] (-0.3,0) -- (10.4,0);
% the neighborhood band
\draw[acc!16, line width=9pt] (3.0,0) -- (7.0,0);
% center
\fill[black] (5.0,0) circle (2.4pt);
\node[anchor=north] at (5.0,-0.12) {$a$};
% open endpoints
\draw[black, thick, fill=white] (3.0,0) circle (2.4pt);
\draw[black, thick, fill=white] (7.0,0) circle (2.4pt);
% radius arrows on each side
\draw[black, ->] (5.0,0.5) -- (7.0,0.5);
\draw[black, ->] (5.0,0.5) -- (3.0,0.5);
\node[anchor=south] at (6.0,0.52) {radius};
\node[anchor=south] at (4.0,0.52) {radius};
\node[anchor=north, black] at (5.0,-0.72) {points within the radius of $a$};
\end{tikzpicture}
$$

The absolute value also gives closed-form expressions for the larger and smaller of two
numbers. Adding or subtracting the gap $|x - y|$ to the average $\tfrac{x+y}{2}$ selects the
maximum or the minimum:

$$
\max\{x, y\} = \frac{x + y + |x - y|}{2}, \qquad
\min\{x, y\} = \frac{x + y - |x - y|}{2}.
$$

If $x \ge y$ then $|x - y| = x - y$, and the first formula collapses to $x$, the second to $y$;
the case $x < y$ is symmetric. These identities make $\max$ and $\min$ ordinary algebraic
functions of $x$ and $y$, which is why the maximum of two continuous functions is again
continuous — a fact used when splitting a function into its positive and negative parts for
[integration](/real-analysis/riemann-integration/properties-of-the-integral).

## The triangle inequality

The triangle inequality compares the size of a sum with the sum of the sizes.

> **Theorem (Triangle inequality).** $|x + y| \le |x| + |y|$ for all $x, y \in \mathbb{R}$.

> **Proof.** From $-|x| \le x \le |x|$ and $-|y| \le y \le |y|$, add the two chains:
>
> $$
> -\bigl(|x| + |y|\bigr) \;\le\; x + y \;\le\; |x| + |y|.
> $$
>
> By the fourth property above (with $y \mapsto |x|+|y|$), this is exactly $|x + y| \le |x| +
> |y|$. $\blacksquare$

The name comes from the geometry it generalizes: the straight path from $0$ to $x + y$ is no
longer than the detour through an intermediate point. Written with distances, $|a - c| \le
|a - b| + |b - c|$ — the direct distance from $a$ to $c$ is at most the trip via $b$. Two
corollaries are used almost as often as the theorem.[^lebl-13]

> **Corollary (Reverse and difference forms).** For $x, y \in \mathbb{R}$:
> - **reverse triangle inequality**: $\bigl||x| - |y|\bigr| \le |x - y|$;
> - $|x - y| \le |x| + |y|$.

The reverse form bounds the size of a difference _below_ by the difference of sizes; it is what
guarantees that if $x$ and $y$ are close, then $|x|$ and $|y|$ are close, and so the absolute
value is a continuous function. To prove it, apply the triangle inequality to $a = (a - b) +
b$, obtaining $|a| - |b| \le |a - b|$, then swap $a$ and $b$ to get $|b| - |a| \le |a - b|$;
together these give the reverse form. The difference form is the plain triangle inequality with
$y$ replaced by $-y$.

> **Worked example.** Suppose $|x - 2| < \tfrac12$. The reverse triangle inequality gives
> $\bigl||x| - 2\bigr| \le |x - 2| < \tfrac12$, so $\tfrac32 < |x| < \tfrac52$. Taking
> reciprocals of the positive bounds,
> $$
> \frac{2}{5} < \frac{1}{|x|} < \frac{2}{3}.
> $$
> A crude control on $|x - 2|$ has become a two-sided bound on $1/|x|$, the exact move used to
> keep denominators away from zero in later limit estimates.

$$
% caption: The triangle inequality in the plane: the direct hop from the first
% point to the third is never longer than the two-leg route through the middle one.
\begin{tikzpicture}[scale=1.0, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\coordinate (A) at (0,0);
\coordinate (B) at (4.6,2.1);
\coordinate (C) at (6.4,0.2);
\fill[black] (A) circle (2.4pt);
\fill[black] (B) circle (2.4pt);
\fill[black] (C) circle (2.4pt);
\node[anchor=east] at (A) {$a$};
\node[anchor=south] at (B) {$b$};
\node[anchor=west] at (C) {$c$};
% two legs
\draw[black, thick] (A) -- (B);
\draw[black, thick] (B) -- (C);
% direct
\draw[acc, very thick] (A) -- (C);
\node[black, anchor=south east] at (2.3,1.05) {leg one};
\node[black, anchor=south west] at (5.5,1.15) {leg two};
\node[text=acc, anchor=north] at (3.2,0.1) {direct route};
\end{tikzpicture}
$$

### A worked estimate

Bounding an expression over an interval is the routine use of these inequalities.

> **Worked example.** Find an $M$ with $|x^2 - 9x + 1| \le M$ for all $-1 \le x \le 5$. By the
> triangle inequality (extended to three terms, itself proved by induction),
> $$
> |x^2 - 9x + 1| \;\le\; |x|^2 + 9|x| + 1.
> $$
> On $[-1, 5]$ the largest value of $|x|$ is $5$, so $M = 25 + 45 + 1 = 71$ works. The bound is
> far from best (a little calculus gives the true supremum $11$), but the aim is _some_ finite
> bound quickly, not the sharpest one.

Analysis proofs are full of deliberately loose bounds like this, because a crude inequality
that is easy to write often suffices to drive an error term to zero.

## Bounded functions

The estimate above says the function $x \mapsto x^2 - 9x + 1$ stays below a fixed number on
$[-1, 5]$. That is boundedness.

> **Definition (Bounded function).** A function $f : D \to \mathbb{R}$ is **bounded** if there
> is a number $M$ with $|f(x)| \le M$ for all $x \in D$.

The same polynomial is bounded on $[-1, 5]$ but unbounded on all of $\mathbb{R}$, so
boundedness is a property of the function _together with_ its domain. The sup/inf vocabulary
transfers from sets to functions by applying it to the range $f(D) = \{f(x) : x \in D\}$:

$$
\sup_{x \in D} f(x) := \sup f(D), \qquad \inf_{x \in D} f(x) := \inf f(D).
$$

A bounded function is one whose range is a bounded set, so $\sup_{x} f(x)$ and $\inf_{x} f(x)$
are finite real numbers. Geometrically the graph is trapped in a horizontal band: it never
rises above the line $y = \sup f$ nor drops below $y = \inf f$, and neither line can be moved
toward the graph and still bound it.

$$
% caption: A bounded function lives inside a horizontal band; the supremum and
% infimum lines are the tightest such bounds, each touched or approached by the graph.
\begin{tikzpicture}[scale=1.0, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
% axes
\draw[->, black] (-0.3,0) -- (8.4,0) node[anchor=north] {$x$};
\draw[->, black] (0,-1.6) -- (0,2.6) node[anchor=east] {$y$};
% sup and inf lines
\draw[acc, dashed, thick] (0,2.0) -- (8.0,2.0);
\node[text=acc, anchor=west] at (8.0,2.0) {$\sup f$};
\draw[acc, dashed, thick] (0,-1.2) -- (8.0,-1.2);
\node[text=acc, anchor=west] at (8.0,-1.2) {$\inf f$};
% the domain interval
\draw[black, line width=2pt] (1.0,0) -- (7.0,0);
\node[anchor=north, black] at (4.0,-0.05) {domain $D$};
% a bounded curve touching sup and approaching inf
\draw[black, thick] plot[smooth, tension=0.8] coordinates
  {(1.0,0.4) (2.0,2.0) (3.2,0.6) (4.3,-1.15) (5.5,0.3) (6.3,1.4) (7.0,-0.2)};
\fill[acc] (2.0,2.0) circle (1.8pt);
\fill[acc] (4.3,-1.15) circle (1.8pt);
\end{tikzpicture}
$$

Comparing two functions pointwise passes to their suprema, but only in one direction.

> **Proposition (Monotonicity of sup and inf).** If $f, g : D \to \mathbb{R}$ are bounded and
> $f(x) \le g(x)$ for all $x \in D$, then
> $$
> \sup_{x \in D} f(x) \le \sup_{x \in D} g(x)
> \qquad\text{and}\qquad
> \inf_{x \in D} f(x) \le \inf_{x \in D} g(x).
> $$

> **Proof.** Let $b = \sup g(D)$. For every $x$, $f(x) \le g(x) \le b$, so $b$ is an upper bound
> for $f(D)$, hence $\sup f(D) \le b$. The infimum statement is symmetric. $\blacksquare$

The variables on the two sides are independent (the $x$ in $\sup_x f(x)$ and the one in
$\sup_x g(x)$ range separately), so the conclusion reads $\sup_x f(x) \le \sup_y g(y)$. A
common error is to strengthen the conclusion to $\sup_x f(x) \le \inf_y g(y)$. That is false
under the pointwise hypothesis $f(x) \le g(x)$; it holds only under the stronger, "separated"
hypothesis $f(x) \le g(y)$ for _all_ pairs $x, y \in D$, the same distinction between pointwise
and uniform comparison seen in the [separated-sets proposition](/real-analysis/foundations/ordered-fields-completeness).

| Hypothesis | Valid conclusion |
| --- | --- |
| $f(x) \le g(x)$ for each $x$ (pointwise) | $\sup_x f \le \sup_x g$ and $\inf_x f \le \inf_x g$ |
| $f(x) \le g(y)$ for all pairs $x, y$ (separated) | $\sup_x f \le \inf_y g$ |

The difference is genuine: take $f = g$ any nonconstant bounded function. Pointwise $f(x) \le
g(x)$ holds with equality, and $\sup f = \sup g$, but $\sup f > \inf g$, so the separated
conclusion fails. Keeping the two hypotheses apart prevents a class of mistakes that
recurs whenever suprema are compared.

The triangle inequality chains these distance statements: if $x$ is near $y$ and $y$ is near
$z$, then $x$ is near $z$, with the errors adding. Every convergence proof in the
[sequences chapter](/real-analysis/sequences-series/sequences-limits) rests on this.

[^lebl-13]: **Lebl**, _Basic Analysis I_, §1.3 — Absolute value and bounded functions: the definition and algebraic properties of the absolute value, the triangle inequality with its reverse and difference forms, worked bounding estimates, and the extension of supremum and infimum to bounded functions with the pointwise-comparison proposition.
