1. Continuity at a Point
Definition 1.1 (Pointwise continuity)
Let f: I → ℝ and x₀ ∈ I. We say that f is continuous at x₀ if:
Definition 1.2 (Global continuity)
f is continuous on I (written f ∈ C(I)) if it is continuous at every point x₀ ∈ I.
Observation 1.3
The crucial point, often underestimated, is that in this definition δ may depend both on ε and on the point x₀: δ = δ(ε, x₀). Changing the point, for the same ε, the δ that works can be completely different (and, as we will see, may be forced to become arbitrarily small). This is exactly what distinguishes pointwise continuity from uniform continuity, the subject of Section 2.
Proposition 1.1 (Sequential criterion for continuity)
Let f: I → ℝ and x₀ ∈ I. Then f is continuous at x₀ if and only if for every sequence (xₙ) ⊂ I with xₙ → x₀ we have f(xₙ) → f(x₀).
Proof. (⇒) Suppose f is continuous at x₀ and let (xₙ) ⊂ I with xₙ → x₀. Given ε > 0, let δ > 0 be such that |x−x₀| < δ ⇒ |f(x)−f(x₀)| < ε. Since xₙ → x₀, there exists N such that n > N ⇒ |xₙ−x₀| < δ, hence |f(xₙ)−f(x₀)| < ε for every n > N: this proves f(xₙ) → f(x₀).
(⇐) We prove the contrapositive: suppose f is not continuous at x₀ and construct a sequence xₙ → x₀ with f(xₙ) ↛ f(x₀). Negating the definition of continuity, there exists ε₀ > 0 such that for every δ > 0 there exists x ∈ I with |x−x₀| < δ but |f(x)−f(x₀)| ≥ ε₀. Applying this with δ = 1/n for every n ∈ ℕ, we obtain xₙ ∈ I with |xₙ−x₀| < 1/n (hence xₙ → x₀) and |f(xₙ)−f(x₀)| ≥ ε₀ for every n (hence f(xₙ) ↛ f(x₀)): the claim is proved.
∎
Example 1.1 (A continuous function)
f(x) = 1/x is continuous on (0,1). Fix x₀ ∈ (0,1) and ε > 0: we want to determine δ > 0 starting from the inequality we want to guarantee:
(the last step is obtained simply by multiplying both sides of the inequality by x·x₀ > 0). The problem is that x still appears on the right, and we do not know it until we have chosen δ: we must therefore eliminate it with a first restriction. We impose |x−x₀| < x₀/2: this guarantees x > x₀/2, hence:
It then suffices to impose, as a second requirement, |x−x₀| ≤ εx₀²/2: under the first restriction this implies |x−x₀| ≤ εx₀²/2 < εxx₀, which is what we wanted. Both requirements on |x−x₀| must hold, so we take the smaller of the two bounds:
With this choice, |x−x₀| < δ ⇒ |1/x−1/x₀| < ε, as required. Note that δ depends explicitly on x₀ (through x₀²): the closer x₀ is to 0, the smaller δ must become, for the same ε.

Counterexample 1.1 (A discontinuous function)
The step function:
is not continuous at x₀ = 0: taking ε = 1/2, for every δ > 0 there exists x = −δ/2 ∈ (−δ, δ) with |f(x)−f(0)| = 1 ≥ ε. No δ can work.

Delicate case 1.1 (The Dirichlet function: discontinuous everywhere)
Let:
By the density of ℚ and of ℝ∖ℚ in ℝ, every neighborhood (x₀−δ, x₀+δ) of any x₀ ∈ ℝ contains both rational and irrational points. Hence, no matter how δ > 0 is chosen, there exist x in that neighborhood with |D(x)−D(x₀)| = 1. Taking ε = 1/2 we conclude that D is not continuous at any point of ℝ: it is the canonical example of an everywhere-discontinuous function, often the first serious conceptual obstacle in the study of continuity.
Delicate case 1.2 (Thomae's function: continuous on the irrationals)
Let (the "popcorn" function):
Surprisingly, T is continuous at every irrational point and discontinuous at every rational point — the exact opposite of what intuition (shaped by the Dirichlet example) might suggest.
Continuity at irrational points. Fix x₀ ∉ ℚ and ε > 0, and show that there exists δ > 0 with |x−x₀| < δ ⇒ |T(x)−T(x₀)| = T(x) < ε (recalling T(x₀) = 0 because x₀ is irrational). Let N := ⌈1/ε⌉, so that q > N ⇒ 1/q < ε.
The key point is the following: fixed an integer q ≥ 1, the bounded interval [x₀−1, x₀+1] contains only finitely many rationals with (reduced) denominator equal to q. This is because numbers of the form p/q (as p ∈ ℤ varies) are equally spaced on the real line, with constant distance 1/q between one multiple and the next; an interval of fixed length (here, length 2) can therefore contain at most 2/(1/q)+1 = 2q+1 of them — a finite number, depending on q but not on where the interval is located. For example, for q = 2 the rationals p/2 in the interval [x₀−1, x₀+1] are at most 5 (generally 4 or 5 depending on x₀): if x₀ = √2 ≈ 1.414, the interval is [0.414, 2.414] and the multiples of 1/2 falling in it are 0.5, 1, 1.5, 2, i.e. 4 points, consistent with the estimate.
Summing over all denominators q = 1,2,…,N (a finite number of values of q, each with finitely many associated rationals in the interval), we obtain that the set of rationals p/q with q ≤ N contained in [x₀−1, x₀+1] is finite. Since x₀ is irrational, it does not coincide with any of these finitely many rationals, so it has positive distance from each of them; let d > 0 be the minimum of these (finite, all positive) distances. Let δ := min(d, 1). Then, if |x−x₀| < δ: the point x belongs to [x₀−1, x₀+1] and, by the choice of d, x cannot coincide with any of the rationals p/q with q ≤ N (otherwise we would have |x₀−p/q| = |x₀−x| < δ ≤ d, contradicting the minimality of d). Hence x is irrational (and then T(x) = 0 < ε) or rational with reduced denominator q > N (and then T(x) = 1/q < 1/N ≤ ε). In both cases T(x) < ε, as desired: T is continuous at x₀.
Discontinuity at rational points. Let x₀ = p/q ∈ ℚ (reduced form), so that T(x₀) = 1/q > 0. By the density of the irrationals, there exists a sequence (xₙ) of irrational numbers with xₙ → x₀; for it, T(xₙ) = 0 for every n, hence T(xₙ) → 0 ≠ 1/q = T(x₀). By the sequential criterion for continuity (Proposition 1.1), T is not continuous at x₀.
This example shows that "discontinuous everywhere except on a dense set" and "continuous everywhere except on a dense set" are both realizable situations, and that geometric intuition must always be paired with rigorous checking against the definitions.
![Graph of Thomae's function on (0,1]](/assets/fig-1-3-BJstcbWY.png)