ACE 328/Chapter 4

Continuity and Limits

The topological definition of continuity: preimages of open sets are open. Equivalent characterizations via sequences and epsilon-delta on metric spaces.

Continuity is the backbone of analysis. In this chapter we develop the notion of a continuous function first in the very general setting of topological spaces, then specialize to metric spaces where it coincides with the familiar epsilon-delta condition and with sequential continuity. We then discuss uniform continuity, Lipschitz continuity, homeomorphisms, and the limit of a function at a point. Much of this material is a more abstract recasting of ideas from MATH/MTHE 281.


Continuity in Topological Spaces

The topological definition of continuity refers only to open sets. It makes no reference to distances, sequences, or epsilons.

DefinitionTopological Continuity

Let (X,τ)(X, \tau) and (Y,σ)(Y, \sigma) be topological spaces and let f:XYf : X \to Y. We say that ff is continuous if, for every open set Ωσ\Omega \in \sigma, f1(Ω)={xX:f(x)Ω}τ.f^{-1}(\Omega) = \{x \in X : f(x) \in \Omega\} \in \tau. That is, the preimage of every open set is open.

Remark.

Intuition: Continuity means that information pulls back nicely: if you "zoom in" on a region of the target YY (an open set), the points of XX that land there form an open region too. There are no jumps — nearby points are sent to nearby points, where "nearby" is expressed through the open sets. This definition is powerful because it works in any topological space, not just metric spaces.

TheoremEquivalent Characterizations of Continuity

Let f:(X,τ)(Y,σ)f : (X, \tau) \to (Y, \sigma). The following are equivalent:

(i) ff is continuous.

(ii) For every closed set FYF \subseteq Y, the set f1(F)f^{-1}(F) is closed in XX.

(iii) For every AXA \subseteq X, f(A)f(A)f(\overline{A}) \subseteq \overline{f(A)}.

(iv) For every BYB \subseteq Y, f1(B)f1(B)\overline{f^{-1}(B)} \subseteq f^{-1}(\overline{B}).

Remark.

Intuition: Continuity has many equivalent faces. The open-set version is the cleanest, but sometimes it is more convenient to argue about closed sets, or to say that the image of the closure is contained in the closure of the image — which expresses "points accumulating in AA get sent to points accumulating in f(A)f(A)."

Local Continuity

Continuity is defined globally above, but there is also a pointwise version.

DefinitionContinuity at a Point

Let f:(X,τ)(Y,σ)f : (X, \tau) \to (Y, \sigma) and let x0Xx_0 \in X. We say that ff is continuous at x0x_0 if for every open neighbourhood VV of f(x0)f(x_0), there exists an open neighbourhood UU of x0x_0 such that f(U)Vf(U) \subseteq V.

Remark.

Intuition: Continuity at a point says that we can force ff to land in any prescribed neighbourhood of f(x0)f(x_0) by starting from a small enough neighbourhood of x0x_0. This is the topological generalization of "nearby inputs produce nearby outputs."

TheoremGlobal Continuity via Pointwise Continuity

f:(X,τ)(Y,σ)f : (X, \tau) \to (Y, \sigma) is continuous if and only if ff is continuous at every point x0Xx_0 \in X.


Continuity in Metric Spaces

We now specialize to metric spaces, where distances make several additional characterizations available.

DefinitionEpsilon-Delta Continuity

Let (X,dX)(X, d_X) and (Y,dY)(Y, d_Y) be metric spaces and let f:XYf : X \to Y. We say that ff is continuous at x0Xx_0 \in X if for every ε>0\varepsilon > 0 there exists δ>0\delta > 0 such that dX(x,x0)<δ    dY(f(x),f(x0))<ε.d_X(x, x_0) < \delta \implies d_Y(f(x), f(x_0)) < \varepsilon. We say ff is continuous if it is continuous at every x0Xx_0 \in X.

Remark.

Intuition: This is the familiar definition from calculus: given any desired output tolerance ε\varepsilon, we can find an input tolerance δ\delta that guarantees it. The quantifier order matters: ε\varepsilon is chosen first, then δ\delta depends on both ε\varepsilon and x0x_0.

DefinitionSequential Continuity

Let (X,dX)(X, d_X) and (Y,dY)(Y, d_Y) be metric spaces. We say that f:XYf : X \to Y is sequentially continuous at x0x_0 if for every sequence (xn)X(x_n) \subseteq X with xnx0x_n \to x_0, we have f(xn)f(x0)f(x_n) \to f(x_0).

Remark.

Intuition: Sequential continuity says: if inputs converge to x0x_0, then outputs converge to f(x0)f(x_0). This formulation is often the easiest to use in practice, since sequences are concrete objects.

TheoremEquivalence of Continuity Notions in Metric Spaces

Let (X,dX)(X, d_X) and (Y,dY)(Y, d_Y) be metric spaces, equipped with their metric topologies, and let f:XYf : X \to Y. The following are equivalent:

(i) ff is topologically continuous (preimage of open is open).

(ii) ff is ε\varepsilon-δ\delta continuous at every point.

(iii) ff is sequentially continuous at every point.

ExampleBasic Continuous Maps

(1) The identity map id:(X,τ)(X,τ)\mathrm{id} : (X, \tau) \to (X, \tau) is always continuous, since id1(Ω)=Ω\mathrm{id}^{-1}(\Omega) = \Omega.

(2) Any constant map fcf \equiv c is continuous: f1(Ω)f^{-1}(\Omega) is either XX or \emptyset, both open.

(3) The map f:RRf : \mathbb{R} \to \mathbb{R} defined by f(x)=x2f(x) = x^2 is continuous: given x0x_0 and ε>0\varepsilon > 0, take δ=min{1,ε/(2x0+1)}\delta = \min\{1, \varepsilon/(2|x_0| + 1)\}. Then xx0<δ|x - x_0| < \delta gives xx0+1|x| \leq |x_0| + 1 and x2x02=xx0x+x0δ(2x0+1)ε.|x^2 - x_0^2| = |x - x_0| \cdot |x + x_0| \leq \delta(2|x_0| + 1) \leq \varepsilon.

(4) The Dirichlet function χQ:RR\chi_{\mathbb{Q}} : \mathbb{R} \to \mathbb{R}, equal to 11 on rationals and 00 on irrationals, is nowhere continuous. Indeed for any x0Rx_0 \in \mathbb{R} we can find rationals rnx0r_n \to x_0 and irrationals inx0i_n \to x_0, so χQ(rn)1\chi_{\mathbb{Q}}(r_n) \to 1 and χQ(in)0\chi_{\mathbb{Q}}(i_n) \to 0; sequential continuity fails.


Composition, Algebraic Operations, Restrictions

TheoremComposition of Continuous Maps

Let (X,τ)(X, \tau), (Y,σ)(Y, \sigma), (Z,ρ)(Z, \rho) be topological spaces and let f:XYf : X \to Y, g:YZg : Y \to Z be continuous. Then gf:XZg \circ f : X \to Z is continuous.

Remark.

Intuition: Continuity composes. Reading the proof, this is essentially just a restatement of the identity (gf)1(W)=f1(g1(W))(g \circ f)^{-1}(W) = f^{-1}(g^{-1}(W)).

TheoremAlgebraic Operations on Real-Valued Continuous Functions

Let (X,d)(X, d) be a metric space and let f,g:XRf, g : X \to \mathbb{R} be continuous at x0Xx_0 \in X. Then f+gf + g, fgf - g, fgfg are continuous at x0x_0, and f/gf/g is continuous at x0x_0 whenever g(x0)0g(x_0) \neq 0.

TheoremContinuity and Restrictions

Let f:(X,τ)(Y,σ)f : (X, \tau) \to (Y, \sigma) be continuous and let AXA \subseteq X, equipped with the relative topology τA\tau_A. Then fA:(A,τA)(Y,σ)f|_A : (A, \tau_A) \to (Y, \sigma) is continuous.


Continuous Functions on R\mathbb{R} and Rn\mathbb{R}^n

In Rn\mathbb{R}^n with the Euclidean topology, continuity is equivalent to continuity of each component function.

TheoremComponentwise Continuity

Let (X,d)(X, d) be a metric space and let f:XRnf : X \to \mathbb{R}^n, f(x)=(f1(x),,fn(x))f(x) = (f_1(x), \dots, f_n(x)). Then ff is continuous at x0x_0 if and only if each fi:XRf_i : X \to \mathbb{R} is continuous at x0x_0.

ExamplePolynomials and Rational Functions

Every polynomial p:RnRp : \mathbb{R}^n \to \mathbb{R} is continuous on all of Rn\mathbb{R}^n, since polynomials are built from continuous coordinate projections via sums and products. Every rational function p/qp/q is continuous at every point where q0q \neq 0.


Uniform Continuity

Continuity is pointwise: the δ\delta depends on both ε\varepsilon and the base point x0x_0. Uniform continuity requires a single δ\delta that works for all points simultaneously.

DefinitionUniform Continuity

Let (X,dX)(X, d_X) and (Y,dY)(Y, d_Y) be metric spaces. A function f:XYf : X \to Y is uniformly continuous if for every ε>0\varepsilon > 0 there exists δ>0\delta > 0 such that for all x,xXx, x' \in X, dX(x,x)<δ    dY(f(x),f(x))<ε.d_X(x, x') < \delta \implies d_Y(f(x), f(x')) < \varepsilon.

Remark.

Intuition: Ordinary continuity allows δ\delta to shrink as we move to different parts of the domain; uniform continuity forbids this. A uniformly continuous function never becomes "arbitrarily steep" over its domain. Any uniformly continuous function is continuous; the converse fails in general.

ExampleContinuous but not Uniformly Continuous

f:RRf : \mathbb{R} \to \mathbb{R} with f(x)=x2f(x) = x^2 is continuous but not uniformly continuous. Given δ>0\delta > 0, take xn=nx_n = n and xn=n+δ/2x_n' = n + \delta/2; then xnxn=δ/2<δ|x_n - x_n'| = \delta/2 < \delta, yet f(xn)f(xn)=2nδ/2+(δ/2)2=nδ+δ2/4.|f(x_n) - f(x_n')| = |2n \cdot \delta/2 + (\delta/2)^2| = n\delta + \delta^2/4 \to \infty. So no single δ\delta works for ε=1\varepsilon = 1.

TheoremHeine-Cantor Theorem

Let (X,dX)(X, d_X) be a compact metric space and let (Y,dY)(Y, d_Y) be a metric space. Every continuous function f:XYf : X \to Y is uniformly continuous.

Remark.

Intuition: On a compact set, there is no "room at infinity" for continuity to deteriorate. Because the domain is totally controlled, the pointwise δ\delta's admit a uniform lower bound.


Lipschitz Continuity

A strong quantitative form of continuity that implies uniform continuity.

DefinitionLipschitz Continuous Function

A function f:(X,dX)(Y,dY)f : (X, d_X) \to (Y, d_Y) is Lipschitz continuous (with constant KK) if there exists K0K \geq 0 such that dY(f(x),f(x))KdX(x,x)for all x,xX.d_Y(f(x), f(x')) \leq K \, d_X(x, x') \quad \text{for all } x, x' \in X. The smallest such KK is the Lipschitz constant of ff, denoted Lip(f)\mathrm{Lip}(f). If K<1K < 1, ff is called a contraction.

Remark.

Intuition: Lipschitz continuity is a uniform "slope bound." The ratio of output change to input change can never exceed KK. Differentiable functions on R\mathbb{R} with bounded derivative are Lipschitz; the Lipschitz constant equals the sup of f|f'|.

TheoremLipschitz Implies Uniformly Continuous

Every Lipschitz continuous function is uniformly continuous.

ExampleLipschitz Examples and Non-Examples

(1) The absolute value function xxx \mapsto |x| on R\mathbb{R} is Lipschitz with constant 11 (by the reverse triangle inequality).

(2) For any fixed y(X,d)y \in (X, d), the distance function xd(x,y)x \mapsto d(x, y) is Lipschitz with constant 11: d(x,y)d(x,y)d(x,x)|d(x, y) - d(x', y)| \leq d(x, x') (reverse triangle inequality).

(3) f(x)=xf(x) = \sqrt{x} on [0,)[0, \infty) is uniformly continuous but not Lipschitz, because near 00 the slope blows up: x0/x0=1/x|\sqrt{x} - \sqrt{0}| / |x - 0| = 1/\sqrt{x} \to \infty as x0+x \to 0^+.


Holder Continuity

An intermediate notion between plain uniform continuity and Lipschitz continuity: a sub-linear power-law bound on the modulus of continuity.

DefinitionHolder Continuous Function

Let α(0,1]\alpha \in (0, 1]. A function f:(X,dX)(Y,dY)f : (X, d_X) \to (Y, d_Y) is Holder continuous of exponent α\alpha if there exists K0K \geq 0 such that dY(f(x),f(x))KdX(x,x)αfor all x,xX.d_Y(f(x), f(x')) \leq K \, d_X(x, x')^{\alpha} \quad \text{for all } x, x' \in X. The constant KK is a Holder constant of ff; the smallest such KK is the Holder seminorm. The case α=1\alpha = 1 recovers Lipschitz continuity.

Remark.

Intuition: Holder continuity with exponent α<1\alpha < 1 allows the modulus of continuity to blow up like hα1h^{\alpha - 1} near zero — steeper than Lipschitz but tamer than arbitrary uniform continuity. It is the natural setting for many fractal and regularity estimates in analysis. The canonical example is f(x)=xf(x) = \sqrt{x} on [0,1][0, 1]: Holder-1/21/2 but not Lipschitz.

TheoremHolder Implies Uniformly Continuous

Every Holder-continuous function is uniformly continuous.

ExampleSquare Root is Holder-1/2 but not Lipschitz

f(x)=xf(x) = \sqrt{x} on [0,1][0, 1] satisfies xyxy|\sqrt{x} - \sqrt{y}| \leq \sqrt{|x - y|} for all x,y[0,1]x, y \in [0, 1] (squaring both sides, xyxy(x+y)|x - y| \leq |\sqrt{x} - \sqrt{y}| \cdot (\sqrt{x} + \sqrt{y}), which is immediate). So ff is Holder-1/21/2 with constant K=1K = 1. It is not Lipschitz because x0/x0=1/x|\sqrt{x} - 0|/|x - 0| = 1/\sqrt{x} \to \infty as x0+x \to 0^+.

Remark.

Hierarchy: Lipschitz \Rightarrow Holder-α\alpha (for any α(0,1]\alpha \in (0, 1], on bounded domains) \Rightarrow uniformly continuous \Rightarrow continuous. All implications are strict. Holder continuity is most often used with α(0,1)\alpha \in (0, 1); the borderline α=1\alpha = 1 is Lipschitz, while "Holder with α>1\alpha > 1" on a connected domain would force ff to be constant (the difference quotient is bounded by Kxxα10K |x - x'|^{\alpha - 1} \to 0, so f0f' \equiv 0).


Homeomorphisms

DefinitionHomeomorphism

A map f:(X,τ)(Y,σ)f : (X, \tau) \to (Y, \sigma) is a homeomorphism if ff is a bijection, ff is continuous, and f1f^{-1} is continuous. Two spaces are homeomorphic if a homeomorphism between them exists.

Remark.

Intuition: A homeomorphism is an isomorphism of topological spaces: it matches up points AND open sets. Homeomorphic spaces have the same topological properties — connectedness, compactness, Hausdorffness, etc. A donut and a coffee cup are the classical example of homeomorphic spaces that differ geometrically but not topologically.

ExampleHomeomorphism Examples

(1) The open interval (1,1)(-1, 1) and R\mathbb{R} are homeomorphic via f(x)=tan(πx/2)f(x) = \tan(\pi x / 2), with inverse g(y)=(2/π)arctan(y)g(y) = (2/\pi) \arctan(y). Both are continuous.

(2) The closed square [0,1]2[0, 1]^2 and the closed disk B1(0)R2\overline{B_1(0)} \subseteq \mathbb{R}^2 are homeomorphic (radially stretch the square onto the disk).

(3) [0,1)[0, 1) and R\mathbb{R} are not homeomorphic. If they were, connectedness would be preserved, but removing any interior point of [0,1)[0, 1) disconnects it into two components or leaves it connected depending on the point; while removing any point of R\mathbb{R} produces two components. A careful argument using connectedness shows these spaces cannot be topologically equivalent.

TheoremContinuous Bijection on Compact Space is a Homeomorphism

Let f:(X,τ)(Y,σ)f : (X, \tau) \to (Y, \sigma) be a continuous bijection, where (X,τ)(X, \tau) is compact and (Y,σ)(Y, \sigma) is Hausdorff. Then ff is a homeomorphism.


Limits of Functions

We now define the limit of a function at a point, first in full topological generality (neighbourhood form), then specialize to metric spaces (epsilon-delta form), and finally record the sequential characterization. In a metric space all three notions coincide.

DefinitionLimit of a Function (Topological)

Let (X,τ)(X, \tau) and (Y,σ)(Y, \sigma) be topological spaces, AXA \subseteq X, f:AYf : A \to Y, and let aXa \in X be an accumulation point of AA (every open neighbourhood of aa meets A{a}A \setminus \{a\}). We say that LYL \in Y is a limit of ff at aa, and write limxaf(x)=L\lim_{x \to a} f(x) = L, if for every open neighbourhood VV of LL there exists an open neighbourhood UU of aa such that f(UA{a})V.f(U \cap A \setminus \{a\}) \subseteq V.

Remark.

Intuition: This is the most general form: "pull back every target neighbourhood to a source neighbourhood, ignoring the point aa itself." The formulation makes no reference to distances — only to open sets. In Hausdorff spaces this limit, when it exists, is unique by essentially the same argument as for sequences.

DefinitionLimit of a Function (Metric, Epsilon-Delta)

Let (X,dX)(X, d_X) and (Y,dY)(Y, d_Y) be metric spaces, AXA \subseteq X, f:AYf : A \to Y, and let aXa \in X be an accumulation point of AA (i.e. every punctured ball around aa meets AA). We write limxaf(x)=L\lim_{x \to a} f(x) = L if for every ε>0\varepsilon > 0 there exists δ>0\delta > 0 such that for all xAx \in A, 0<dX(x,a)<δ    dY(f(x),L)<ε.0 < d_X(x, a) < \delta \implies d_Y(f(x), L) < \varepsilon.

Remark.

Intuition: The limit of ff at aa is the value that f(x)f(x) approaches as xx approaches aa, but without touching aa itself. The requirement that aa be an accumulation point ensures we can actually approach aa through AA. The value of ff at aa (if defined) is irrelevant.

TheoremEquivalence of Topological, Metric, and Sequential Limits

Let (X,dX)(X, d_X) and (Y,dY)(Y, d_Y) be metric spaces with their metric topologies, AXA \subseteq X, f:AYf : A \to Y, and let aXa \in X be an accumulation point of AA. The following are equivalent:

(i) limxaf(x)=L\lim_{x \to a} f(x) = L in the topological sense (preimage of every open neighbourhood of LL contains a punctured open neighbourhood of aa, intersected with AA).

(ii) limxaf(x)=L\lim_{x \to a} f(x) = L in the ε\varepsilon-δ\delta sense.

(iii) For every sequence (xn)A{a}(x_n) \subseteq A \setminus \{a\} with xnax_n \to a, f(xn)Lf(x_n) \to L.

TheoremSequential Characterization of Limits

Under the assumptions of the definition, limxaf(x)=L\lim_{x \to a} f(x) = L if and only if for every sequence (xn)A{a}(x_n) \subseteq A \setminus \{a\} with xnax_n \to a, we have f(xn)Lf(x_n) \to L.

TheoremContinuity in Terms of Limits

Let f:(X,dX)(Y,dY)f : (X, d_X) \to (Y, d_Y) and x0Xx_0 \in X be an accumulation point of XX. Then ff is continuous at x0x_0 if and only if limxx0f(x)=f(x0)\lim_{x \to x_0} f(x) = f(x_0).

Algebraic Properties of Limits

TheoremAlgebra of Limits

Let f,g:ARf, g : A \to \mathbb{R} with AXA \subseteq X, and suppose limxaf(x)=L1\lim_{x \to a} f(x) = L_1, limxag(x)=L2\lim_{x \to a} g(x) = L_2. Then:

(i) limxa(f(x)+g(x))=L1+L2\lim_{x \to a} (f(x) + g(x)) = L_1 + L_2.

(ii) limxa(f(x)g(x))=L1L2\lim_{x \to a} (f(x) g(x)) = L_1 L_2.

(iii) If L20L_2 \neq 0, limxaf(x)/g(x)=L1/L2\lim_{x \to a} f(x)/g(x) = L_1/L_2.

TheoremLimit of a Composition

Let (X,dX)(X, d_X), (Y,dY)(Y, d_Y), (Z,dZ)(Z, d_Z) be metric spaces, let AXA \subseteq X, BYB \subseteq Y, g:ABg : A \to B and f:BZf : B \to Z. Suppose aa is an accumulation point of AA, bb is an accumulation point of BB, and limxag(x)=b,limybf(y)=L.\lim_{x \to a} g(x) = b, \qquad \lim_{y \to b} f(y) = L. If either (i) ff is continuous at bb (equivalently, f(b)=Lf(b) = L) or (ii) g(x)bg(x) \neq b for every xx in some punctured neighbourhood of aa intersected with AA, then limxa(fg)(x)=L.\lim_{x \to a} (f \circ g)(x) = L.

Remark.

Intuition: The naive "plug one limit into the other" is correct almost always, but fails in a subtle edge case: if g(x)g(x) happens to equal bb for xx near aa but bb is not in the domain of ff with value LL, the limit of fgf \circ g can see the "punctured-out" value of ff at bb. The two clauses rule out that pathology — either ff behaves at bb (it is continuous there) or gg never hits bb near aa.


One-Sided Limits, Limits at Infinity, Infinite Limits

For real-valued functions of a real variable, several variants of the limit notion appear in practice. We give them here in the concrete metric setting; in each case the idea is to modify the source (approach from one side, or x±x \to \pm\infty) or the target (allow the value ±\pm\infty) while keeping the logical structure of the definition intact.

DefinitionOne-Sided Limits

Let f:ARf : A \to \mathbb{R} with ARA \subseteq \mathbb{R}, and let aRa \in \mathbb{R} be an accumulation point of A(a,)A \cap (a, \infty) (respectively A(,a)A \cap (-\infty, a)).

  • The right limit of ff at aa is limxa+f(x)=L    ε>0δ>0 s.t. a<x<a+δ,xA    f(x)L<ε.\lim_{x \to a^+} f(x) = L \iff \forall \varepsilon > 0 \, \exists \delta > 0 \text{ s.t. } a < x < a + \delta, \, x \in A \implies |f(x) - L| < \varepsilon.
  • The left limit of ff at aa is limxaf(x)=L    ε>0δ>0 s.t. aδ<x<a,xA    f(x)L<ε.\lim_{x \to a^-} f(x) = L \iff \forall \varepsilon > 0 \, \exists \delta > 0 \text{ s.t. } a - \delta < x < a, \, x \in A \implies |f(x) - L| < \varepsilon.
Remark.

Intuition: One-sided limits only "approach from one side" of aa. They let us describe jump discontinuities (where f(a)f(a+)f(a^-) \neq f(a^+)) and are the natural concept at boundary points of intervals. The two-sided limit limxaf(x)\lim_{x \to a} f(x) exists iff both one-sided limits exist and agree.

TheoremTwo-Sided Limit via One-Sided Limits

Let f:ARf : A \to \mathbb{R} with ARA \subseteq \mathbb{R} and aa an accumulation point of both A(a,)A \cap (a, \infty) and A(,a)A \cap (-\infty, a). Then limxaf(x)=L\lim_{x \to a} f(x) = L if and only if limxa+f(x)=L\lim_{x \to a^+} f(x) = L and limxaf(x)=L\lim_{x \to a^-} f(x) = L.

DefinitionLimits at Infinity

Let f:ARf : A \to \mathbb{R} with ARA \subseteq \mathbb{R} unbounded above. Then limxf(x)=L    ε>0MR s.t. x>M,xA    f(x)L<ε.\lim_{x \to \infty} f(x) = L \iff \forall \varepsilon > 0 \, \exists M \in \mathbb{R} \text{ s.t. } x > M, \, x \in A \implies |f(x) - L| < \varepsilon. The definition of limxf(x)=L\lim_{x \to -\infty} f(x) = L is analogous (replace x>Mx > M with x<Mx < M, and require AA unbounded below).

Remark.

Intuition: "xx large enough" plays the role of "xx close enough to aa" — only the source has changed. Equivalently, limxf(x)=L\lim_{x \to \infty} f(x) = L iff for every sequence xnx_n \to \infty in AA, f(xn)Lf(x_n) \to L.

DefinitionInfinite Limits

Let f:ARf : A \to \mathbb{R} with ARA \subseteq \mathbb{R} and aa an accumulation point of AA. Then limxaf(x)=+    MRδ>0 s.t. 0<xa<δ,xA    f(x)>M.\lim_{x \to a} f(x) = +\infty \iff \forall M \in \mathbb{R} \, \exists \delta > 0 \text{ s.t. } 0 < |x - a| < \delta, \, x \in A \implies f(x) > M. The definition with -\infty is analogous (replace f(x)>Mf(x) > M with f(x)<Mf(x) < M). One can combine the variants: limxf(x)=+\lim_{x \to \infty} f(x) = +\infty, limxa+f(x)=\lim_{x \to a^+} f(x) = -\infty, and so on, each by modifying the appropriate clause.

Remark.

Intuition: "f(x)f(x) close to LL" has been replaced by "f(x)f(x) bigger than any threshold MM" — only the target has changed. These are not limits in the strict metric sense (since ±R\pm\infty \notin \mathbb{R}); they are limits in the extended real line [,+][-\infty, +\infty], which is a compact topological space whose neighbourhoods of ±\pm\infty are the sets (M,](M, \infty] and [,M)[-\infty, M).


Oscillation and Discontinuities

We classify how a function can fail to be continuous at a point, using the notion of oscillation.

DefinitionOscillation of a Function

Let f:(X,d)Rf : (X, d) \to \mathbb{R} be a bounded function and AXA \subseteq X nonempty. The oscillation of ff on AA is osc(f,A)=supxAf(x)infxAf(x).\mathrm{osc}(f, A) = \sup_{x \in A} f(x) - \inf_{x \in A} f(x). The oscillation of ff at x0Xx_0 \in X is ωf(x0)=limr0+osc(f,Br(x0))=infr>0osc(f,Br(x0)).\omega_f(x_0) = \lim_{r \to 0^+} \mathrm{osc}(f, B_r(x_0)) = \inf_{r > 0} \mathrm{osc}(f, B_r(x_0)). (The limit exists because rosc(f,Br(x0))r \mapsto \mathrm{osc}(f, B_r(x_0)) is nonnegative and nondecreasing.)

Remark.

Intuition: The oscillation ωf(x0)\omega_f(x_0) measures how much ff jumps near x0x_0. It is zero exactly when ff is continuous at x0x_0, so it serves as a quantitative failure-of-continuity.

TheoremOscillation Characterizes Continuity

Let f:(X,d)Rf : (X, d) \to \mathbb{R} be bounded. Then ff is continuous at x0x_0 if and only if ωf(x0)=0\omega_f(x_0) = 0.

Classification of Discontinuities on R\mathbb{R}

For a function f:RRf : \mathbb{R} \to \mathbb{R}, define the one-sided limits f(x0)=limxx0f(x)f(x_0^-) = \lim_{x \to x_0^-} f(x) and f(x0+)=limxx0+f(x)f(x_0^+) = \lim_{x \to x_0^+} f(x) when they exist.

  • Removable discontinuity: f(x0)=f(x0+)f(x0)f(x_0^-) = f(x_0^+) \neq f(x_0) (or f(x0)f(x_0) is undefined). Redefining ff at one point restores continuity.
  • Jump (first-kind) discontinuity: f(x0)f(x_0^-) and f(x0+)f(x_0^+) both exist and are finite, but differ. The oscillation is f(x0+)f(x0)|f(x_0^+) - f(x_0^-)|.
  • Essential (second-kind) discontinuity: at least one of f(x0)f(x_0^-), f(x0+)f(x_0^+) fails to exist (for instance because of oscillation, as in sin(1/x)\sin(1/x) at x=0x = 0).
ExampleSet of Discontinuities is an F-sigma Set

For any function f:RRf : \mathbb{R} \to \mathbb{R}, the set Df={x0R:f is discontinuous at x0}=n=1{x0:ωf(x0)1/n}D_f = \{x_0 \in \mathbb{R} : f \text{ is discontinuous at } x_0\} = \bigcup_{n=1}^{\infty} \{x_0 : \omega_f(x_0) \geq 1/n\} is a countable union of closed sets (an FσF_\sigma set). This is a key ingredient in showing, via the Baire Category Theorem, that there is no function f:RRf : \mathbb{R} \to \mathbb{R} whose set of continuity points is exactly Q\mathbb{Q}.

The Continuity Set is a G-Delta Set

We now prove a theorem that, combined with the fact that Q\mathbb{Q} is not a GδG_\delta set, rules out the existence of any function continuous exactly at the rationals.

DefinitionG-delta and F-sigma Sets

A set SRS \subseteq \mathbb{R} (or in any topological space) is a GδG_\delta set if it can be written as a countable intersection of open sets. ("G" stands for Gebiet, German for "area"; "δ\delta" for Durchschnitt, "intersection.")

A set SS is an FσF_\sigma set if it can be written as a countable union of closed sets. ("F" stands for fermé, French for "closed"; "σ\sigma" denotes countable unions.)

Remark: SS is GδG_\delta if and only if ScS^c is FσF_\sigma.

ExampleExamples of G-delta and F-sigma Sets

(1) Every open set is GδG_\delta; every closed set is FσF_\sigma.

(2) Singletons are both FσF_\sigma (they are closed) and GδG_\delta (since {x}=n1(x1/n,x+1/n)\{x\} = \bigcap_{n \geq 1}(x - 1/n, x + 1/n)).

(3) Every countable set is FσF_\sigma. In particular Q\mathbb{Q} is FσF_\sigma.

(4) RQ\mathbb{R} \setminus \mathbb{Q} is GδG_\delta, since its complement Q\mathbb{Q} is FσF_\sigma. Equivalently, RQ=rQ(R{r})\mathbb{R} \setminus \mathbb{Q} = \bigcap_{r \in \mathbb{Q}} (\mathbb{R} \setminus \{r\}).

(5) Countable intersections of GδG_\delta sets are GδG_\delta; countable unions of FσF_\sigma sets are FσF_\sigma.

TheoremThe Set of Continuity Points is a G-delta Set

Let f:RRf : \mathbb{R} \to \mathbb{R} and let CfC_f be the set of points at which ff is continuous. Then CfC_f is a GδG_\delta set.

Remark.

Intuition: Continuity is a "for every ε\varepsilon" condition; quantifying over countably many ε=1/n\varepsilon = 1/n expresses CfC_f as a countable intersection. Each individual condition cuts out an open set, so the intersection is GδG_\delta.

TheoremQ is Not a G-delta Set

The set of rationals Q\mathbb{Q} is not a GδG_\delta set in R\mathbb{R}.

CorollaryNo Function is Continuous Exactly on Q

There is no function f:RRf : \mathbb{R} \to \mathbb{R} whose set of continuity is Q\mathbb{Q}.

Remark.

The converse holds: for every GδG_\delta set SRS \subseteq \mathbb{R} there does exist a function f:RRf : \mathbb{R} \to \mathbb{R} with Cf=SC_f = S. Sketch: write E=Sc=nFnE = S^c = \bigcup_n F_n with each FnF_n closed and (WLOG) nested F1F2F_1 \subseteq F_2 \subseteq \cdots. Set An=FnQA_n = F_n \cap \mathbb{Q} and fn=1Fn1Anf_n = \mathbf{1}_{F_n} - \mathbf{1}_{A_n}. The series f=n=11n!fnf = \sum_{n=1}^\infty \frac{1}{n!} f_n converges uniformly on R\mathbb{R} to a bounded function whose continuity set is exactly SS.

The Thomae (Popcorn) Function

A spectacular concrete example of a function continuous on the irrationals and discontinuous on the rationals.

ExampleThe Thomae / Popcorn Function

Define f:RRf : \mathbb{R} \to \mathbb{R} by f(x)={0if xRQ,1/nif x=m/nQ in lowest terms with nN,mZ.f(x) = \begin{cases} 0 & \text{if } x \in \mathbb{R} \setminus \mathbb{Q}, \\ 1/n & \text{if } x = m/n \in \mathbb{Q} \text{ in lowest terms with } n \in \mathbb{N}, \, m \in \mathbb{Z}. \end{cases} By convention, 0=0/10 = 0/1 in lowest terms, so f(0)=1f(0) = 1. For example f(12/13)=1/13f(12/13) = 1/13, f(30)=1f(-30) = 1, f(1/2)=1/2f(-1/2) = 1/2, and f(2)=f(π)=f(e)=0f(\sqrt{2}) = f(\pi) = f(e) = 0.

This function is also called the popcorn function or stars over Babylon.

Claim: ff is continuous at every irrational and discontinuous at every rational.

Proof of discontinuity at rationals: Let qQq \in \mathbb{Q} with f(q)=1/n>0f(q) = 1/n > 0. Since irrationals are dense, pick irrationals xkqx_k \to q; then f(xk)=0↛1/nf(x_k) = 0 \not\to 1/n.

Proof of continuity at irrationals: Let x0RQx_0 \in \mathbb{R} \setminus \mathbb{Q} and fix ε>0\varepsilon > 0. Choose NN with 1/N<ε1/N < \varepsilon. The set {p/q:qN,pZ,p/qx01}\{p/q : q \leq N, \, p \in \mathbb{Z}, \, |p/q - x_0| \leq 1\} is finite (finitely many denominators, each contributing finitely many numerators in a bounded range). Hence there exists δ>0\delta > 0 such that no rational with denominator N\leq N lies in (x0δ,x0+δ)(x_0 - \delta, x_0 + \delta) (other than possibly x0x_0 itself, but x0x_0 is irrational). For xx0<δ|x - x_0| < \delta: if xx is irrational, f(x)f(x0)=0<ε|f(x) - f(x_0)| = 0 < \varepsilon; if x=m/nx = m/n in lowest terms, then n>Nn > N, so f(x)0=1/n<1/N<ε|f(x) - 0| = 1/n < 1/N < \varepsilon. \square


Continuity and Connectedness: The Intermediate Value Theorem

We close with a classical application: the topological version of the Intermediate Value Theorem, which is a direct consequence of Bolzano's theorem that continuous functions preserve connectedness.

TheoremBolzano's Theorem

Let f:(X,τ)(Y,σ)f : (X, \tau) \to (Y, \sigma) be continuous and surjective. If (X,τ)(X, \tau) is connected, then (Y,σ)(Y, \sigma) is connected. More generally, if AXA \subseteq X is connected, then f(A)f(A) is connected.

CorollaryIntermediate Value Theorem

Let f:[a,b]Rf : [a, b] \to \mathbb{R} be continuous. If yy lies between f(a)f(a) and f(b)f(b), there exists c[a,b]c \in [a, b] with f(c)=yf(c) = y.

CorollaryExtreme Value Theorem

Let XX be a nonempty compact topological space and f:XRf : X \to \mathbb{R} continuous. Then ff attains its maximum and minimum on XX.