Continuity, Rigorously
A machinist is handed a drawing for a piston. In the corner, in a little box, sits the customer's
demand: diameter 80 mm ± 0.01 mm. The customer does not care how the machinist
achieves it — only that the output lands inside that band. The machinist's job is to
translate the demand backwards: how precisely must I control the inputs — the tool
position, the temperature of the blank, the feed rate — so that the finished diameter is guaranteed
to land within ± 0.01? Every engineering shop on Earth runs on this contract: you name the output
tolerance; I must find an input tolerance that secures it. And the contract is only honourable
if it can be met for every demand, however fussy — ± 0.01, ± 0.001, ± 10⁻⁹.
That contract is the rigorous definition of continuity. Informally, a function is
continuous if you can draw its graph "without lifting the pen". To prove theorems we need that
intuition pinned to an inequality, with no appeal to pens, motion, or time. The
working definition
is that the limit equals the value, and the
ε–δ definition of a limit
spells that out. Here we put the two together and — more importantly — learn to write the
proofs.
The definition, dissected
A function f is continuous at c
when: for every output tolerance \varepsilon > 0, there exists an input
tolerance \delta > 0 such that
|x - c| < \delta \;\;\Longrightarrow\;\; |f(x) - f(c)| < \varepsilon.
Every symbol earns its keep. |f(x) - f(c)| < \varepsilon is the customer's
spec: the output must land within \varepsilon of the target value
f(c). |x - c| < \delta is the machinist's
input control: hold the input within \delta of
c. The implication says the input control guarantees the output
spec — every x in the \delta-window, no
exceptions. And the quantifiers say the guarantee must be available for every demand:
\forall \varepsilon > 0 \;\; \exists \delta > 0 \;\; \forall x: \quad |x - c| < \delta \Rightarrow |f(x) - f(c)| < \varepsilon.
Read it as a game. An adversary moves first and names
\varepsilon — how close to f(c) the outputs
must land. You move second and answer with a \delta-window around
c so narrow that every input inside it is mapped inside the adversary's
band. Continuity at c means you have a winning strategy: whatever
\varepsilon is thrown at you, you can produce a working
\delta. A proof of continuity is nothing more than writing that strategy
down — usually as a formula giving \delta in terms of
\varepsilon.
-
The order of the quantifiers is everything.
\forall \varepsilon \, \exists \delta means
\delta is chosen after seeing
\varepsilon, so it may depend on it — and it almost always does.
Swap them to \exists \delta \, \forall \varepsilon and you are
claiming one \delta-window inside which
|f(x) - f(c)| < \varepsilon for every
\varepsilon — i.e. f(x) = f(c) there:
f is locally constant. A completely different (and much
rarer) property.
-
\delta depends on the point c
too. The same \varepsilon may need a much smaller
\delta where the function is steep. For
x^2, an \varepsilon-demand at
c = 100 needs a \delta roughly
100 times smaller than the same demand at
c = 1. Demanding one \delta that serves
all points at once is a genuinely stronger condition — uniform continuity, coming up
below.
-
You don't need the best \delta. If some
\delta works, every smaller one works too (a narrower input window
can only help). So a proof may happily give away slack — which is exactly why the
\min(1, \dots) trick below is standard practice, not cheating.
Warm-up proof: f(x) = 3x + 1 is continuous everywhere
Fix any point c and let the adversary name
\varepsilon > 0. Before choosing \delta, do
the scratch work: relate the output gap to the input gap.
|f(x) - f(c)| = |(3x + 1) - (3c + 1)| = |3x - 3c| = 3\,|x - c|.
The output gap is always exactly 3 times the input gap — a line of slope
3 stretches every interval by a factor of 3,
no more, no less. So to force 3|x - c| < \varepsilon we need
|x - c| < \varepsilon / 3, and the strategy writes itself.
Proof. Given \varepsilon > 0, choose
\delta = \varepsilon / 3. Then whenever
|x - c| < \delta,
|f(x) - f(c)| = 3\,|x - c| < 3\delta = 3 \cdot \frac{\varepsilon}{3} = \varepsilon. \qquad \blacksquare
Two lines, and it works at every c — the same
\delta = \varepsilon/3 everywhere, because a line is equally steep
everywhere. The general pattern for f(x) = mx + b with
m \ne 0 is \delta = \varepsilon / |m|: the
steeper the line, the tighter the input tolerance you must promise. (A slope-m
machine amplifies input error by |m| — exactly the "sensitivity" a
tolerance engineer computes.)
The first real proof: f(x) = x^2 at c = 2
Now the slope isn't constant, and a new idea is needed — the one that powers most ε–δ proofs you
will ever write. Scratch work first: factor the output gap.
|x^2 - 4| = |x - 2|\,|x + 2|.
The factor |x - 2| is under our control — it's the input gap. But the
factor |x + 2| is a nuisance: it varies with
x, so we can't just divide \varepsilon by it.
The trick: tether x first, then bound the nuisance factor by a
constant. Promise in advance that \delta \le 1. Then
|x - 2| < 1, so 1 < x < 3, and by the
triangle inequality
|x + 2| \le |x - 2| + 4 < 1 + 4 = 5.
Inside the tether, the awkward factor never exceeds 5, so
|x^2 - 4| < 5\,|x - 2| — the problem is now as easy as the linear one,
with "slope" 5.
Proof. Given \varepsilon > 0, choose
\delta = \min\!\left(1, \; \frac{\varepsilon}{5}\right).
Suppose |x - 2| < \delta. Since \delta \le 1,
the tether holds and |x + 2| < 5. Since
\delta \le \varepsilon / 5,
|x^2 - 4| = |x - 2|\,|x + 2| < \frac{\varepsilon}{5} \cdot 5 = \varepsilon. \qquad \blacksquare
The \min makes both promises true at once: small enough to keep
the bound on |x + 2| honest, and small enough to beat
\varepsilon. This tether–bound–divide pattern is the workhorse
of analysis; you will use it for x^3, for 1/x,
for products of continuous functions — everywhere a non-constant factor gets in the way.
And at a general point a? The identical argument runs
with |x^2 - a^2| = |x - a|\,|x + a|: tether with
\delta \le 1, bound
|x + a| \le |x - a| + 2|a| < 1 + 2|a|, and choose
\delta = \min\!\left(1,\; \frac{\varepsilon}{1 + 2|a|}\right).
So x^2 is continuous at every real number. But notice the catch worth
remembering: this \delta shrinks as |a|
grows — far from the origin the parabola is steep, and the input tolerance must tighten.
That dependence is the seed of the next idea.
See the contract in action
Here is the game made visual on y = x^2 at the point
a = 1. The horizontal band is the adversary's
\varepsilon-tolerance around f(a) = 1; the
vertical strip is your answering \delta-window, computed by the proof's
own formula \delta = \min(1, \varepsilon/3). Pull the slider down: as
\varepsilon shrinks, the strip narrows just enough that the parabola
never escapes the band inside it. Winning the game means this picture can be drawn for every
\varepsilon, however small — the readout shows the strategy responding
live.
Notice the picture's honest asymmetry: the parabola is steeper on the right edge of the strip than
on the left, so it is the right edge that touches the band first. The proof's
\delta is chosen to survive the worst case — the tolerance engineer's
habit of designing for the steepest part of the response.
Proving a DIScontinuity — the other half of the skill
To prove continuity you must beat every \varepsilon. To prove
discontinuity you need only exhibit one \varepsilon that
defeats every \delta — the roles in the game swap, and now the
adversary is you. Take the step function
H(x) = \begin{cases} 0 & x < 0, \\ 1 & x \ge 0, \end{cases}
which jumps by 1 at the origin. Claim: H is
not continuous at 0.
Proof. Take \varepsilon = \tfrac{1}{2} — half the jump.
Let \delta > 0 be arbitrary: whatever
\delta is offered, the point x = -\delta/2
satisfies |x - 0| = \delta/2 < \delta, yet
|H(x) - H(0)| = |0 - 1| = 1 \ge \tfrac{1}{2} = \varepsilon.
So no \delta honours the contract for this
\varepsilon: every input window around 0,
however narrow, contains points from the low side of the jump whose outputs miss the band.
Discontinuous at 0. \blacksquare
The logical shape is worth memorising, because it is the exact negation of the
definition:
\exists \varepsilon > 0 \;\; \forall \delta > 0 \;\; \exists x: \quad |x - c| < \delta \;\text{ and }\; |f(x) - f(c)| \ge \varepsilon.
Each quantifier flips (\forall \leftrightarrow \exists) and the final
implication becomes a counterexample pair. For a jump of height g, any
\varepsilon \le g does the job — \varepsilon = g/2
is the traditional choice because it leaves room to spare.
The sequential characterisation
There is a second, equivalent language for the same idea, and analysts switch between the two
constantly:
f \text{ is continuous at } c \iff \text{for every sequence } x_n \to c, \;\; f(x_n) \to f(c).
In words: continuous functions are exactly the ones that preserve limits of sequences — you
may push a limit through f, writing
\lim f(x_n) = f(\lim x_n). The forward direction is a pleasant ε–δ
exercise (given \varepsilon, get \delta from
continuity, then get N from x_n \to c). The
reverse direction is proved by contraposition and is where the real power lies:
to prove discontinuity, one bad sequence suffices. For the step function above,
take x_n = -1/n \to 0; then
H(x_n) = 0 \to 0 \ne 1 = H(0) — a one-line second proof of the
discontinuity, with no quantifier gymnastics at all.
Once continuity is an inequality rather than a pen-stroke, functions appear that no pen could ever
draw. Thomae's function is defined on (0, 1) by
T(x) = \begin{cases} 1/q & x = p/q \text{ in lowest terms}, \\ 0 & x \text{ irrational}. \end{cases}
It is discontinuous at every rational — near p/q lurk
irrationals where T = 0, a fixed gap of 1/q,
so \varepsilon = 1/(2q) defeats every \delta
(the step-function argument again!). Yet it is continuous at every irrational:
for any \varepsilon > 0, only finitely many fractions in
(0,1) have denominator q \le 1/\varepsilon,
so a small enough \delta-window around an irrational point dodges them
all, leaving only values below \varepsilon. Continuous on a dense set,
discontinuous on a dense set — intuition about "unbroken curves" simply has no purchase here; the
ε–δ contract is the only thing left standing. (The mirror-image feat, a function continuous
exactly at the rationals, is impossible — a lovely theorem of Baire category theory.)
Pointwise versus uniform
In the x^2 proof, \delta depended on
both \varepsilon and the point
a. That is ordinary (pointwise) continuity. A stronger
demand is that one \delta work for all points at
once — one input tolerance for the whole production line, not a separate one per part.
f is uniformly continuous on a set
S when, for every \varepsilon > 0, there is a
single \delta > 0 (depending on \varepsilon only)
with
|x - y| < \delta \;\;\Longrightarrow\;\; |f(x) - f(y)| < \varepsilon \qquad \text{for all } x, y \in S.
Why x^2 is NOT uniformly continuous on
\mathbb{R}. Take two points a fixed gap
h apart, x and x + h:
|(x + h)^2 - x^2| = |2hx + h^2| = h\,|2x + h|.
However small the gap h > 0, the output gap
h|2x + h| \to \infty as x \to \infty. So no single
\delta can keep the outputs within (say)
\varepsilon = 1 everywhere: out at large x the
parabola is too steep. Uniform continuity fails precisely because the \delta
from the proof above had to keep shrinking with |a|.
The rescue is to stay on a closed, bounded interval. There
x^2 can't run off to steep regions, and uniform continuity is automatic.
Let f be a real function. Then:
-
ε–δ continuity at c: for every
\varepsilon > 0 there is \delta > 0 with
|x - c| < \delta \Rightarrow |f(x) - f(c)| < \varepsilon. This is
equivalent to \lim_{x \to c} f(x) = f(c).
-
Sequential characterisation: f is continuous at
c if and only if f(x_n) \to f(c) for
every sequence x_n \to c.
-
Uniform continuity on S: for every
\varepsilon > 0 there is one
\delta > 0 with
|x - y| < \delta \Rightarrow |f(x) - f(y)| < \varepsilon for all
x, y \in S. Uniform continuity \Rightarrow
continuity, but not conversely (x^2 on
\mathbb{R} is a counterexample).
-
Heine–Cantor: if f is continuous on a closed bounded
interval [a, b], then it is uniformly continuous there.
Closed bounded intervals make continuity extraordinarily well-behaved. Two cornerstone theorems
hold there — and both fail without the hypotheses.
Extreme Value Theorem. If f is continuous on
[a, b], it attains a maximum and a minimum:
\exists\, c, d \in [a, b] : \quad f(c) \le f(x) \le f(d) \quad \text{for all } x \in [a, b].
The closed interval is essential. On the open interval (0, 1]
the continuous function 1/x has no maximum — it shoots to
+\infty near the missing endpoint 0. Drop
continuity instead and a single jump can step over every candidate maximum.
Intermediate Value Theorem. If f is continuous on
[a, b] and y lies between
f(a) and f(b), then
f(c) = y for some c \in [a, b] — a continuous
graph cannot get from one side of a level to the other without crossing it. This is what guarantees
a root of x^2 - 2 in [1, 2], hence the very
existence of \sqrt{2} as a real number. Remove continuity and the graph
can leap across y without ever equalling it.
For a century and a half after Newton and Leibniz, calculus ran on vibes. Quantities "flowed",
increments were "infinitely small", and in 1734 the philosopher George Berkeley pounced: what are
these vanishing increments — finite? zero? "May we not call them the ghosts of departed
quantities?" The mathematics worked spectacularly; nobody could say why.
The exorcism took sixty years and three generations. In 1817 Bernard Bolzano — a
Prague priest whose maths was decades ahead of his readership — gave essentially the modern
definition of continuity, in a pamphlet proving the Intermediate Value Theorem properly
(his title complains, in effect, that everyone else's proofs were pictures). In
1821 Cauchy's Cours d'analyse put inequalities at the centre of analysis
— the letter \varepsilon is his, reputedly for erreur. But
Cauchy still spoke of variables "approaching" values, and the ambiguity bit him: he famously
"proved" that a convergent series of continuous functions has a continuous sum, which is false
precisely because he had not separated pointwise from uniform. It was
Weierstrass, lecturing in Berlin in the 1860s, who froze the motion out entirely:
no flowing, no approaching — only the static quantified statement
\forall \varepsilon \, \exists \delta you have just learned, in which
nothing moves at all. His students (Cantor, Heine, and others) spread it, and analysis has stood
on it ever since. The definition on this page is not a pedantic rewrite of an obvious idea — it is
the hard-won answer to Berkeley's ghosts.