The Need for Measure

The Riemann integral is a triumph — and a trap. It slices the domain into thin vertical strips and adds up f(x)\,\Delta x over each. That works beautifully for a continuous curve. But it carries a hidden assumption: that chopping the domain finely is enough to pin down the area. For functions that oscillate wildly, or for limits of perfectly nice functions, that assumption fails — and fails in ways no amount of cleverness with partitions can repair.

This page is the diagnosis before the cure. We meet the two diseases that Riemann's theory cannot treat — a bounded function with no integral, and a limit of integrable functions that escapes integrability entirely — and we uncover the deeper reason: to integrate we first need to answer a more primitive question. How big is a set? Not "how long is an interval", but how much "stuff" sits inside an arbitrary subset of the line. That single question — the theory of measure — is the foundation everything else in this module is built on.

Disease 1 — a bounded function with no area

Dirichlet's indicator of the rationals on [0, 1] is the cleanest villain in analysis:

\mathbf{1}_{\mathbb{Q}}(x) = \begin{cases} 1, & x \in \mathbb{Q}, \\ 0, & x \notin \mathbb{Q}. \end{cases}

Every subinterval — however thin — contains both a rational and an irrational, because both are dense. So on every piece of every partition the infimum is 0 and the supremum is 1. The lower Darboux sum is therefore 0 and the upper sum is 1, for all partitions — refining never helps:

\underline{\int_0^1} \mathbf{1}_{\mathbb{Q}} = 0 \;\neq\; 1 = \overline{\int_0^1} \mathbf{1}_{\mathbb{Q}}.

The upper and lower integrals disagree, so \mathbf{1}_{\mathbb{Q}} is not Riemann integrable. Yet morally the answer is obvious: the rationals are a vanishingly thin, countable scatter of points, so the function is 0 "almost everywhere", and its integral ought to be 0. Riemann has no language to say this. The theory we build will: the rationals have measure zero, and the Lebesgue integral of \mathbf{1}_{\mathbb{Q}} is exactly 0.

Disease 2 — a limit that escapes

Worse than one bad function is a whole sequence of good functions whose limit is bad. Enumerate the rationals in [0,1] as q_1, q_2, q_3, \dots and set

f_n = \mathbf{1}_{\{q_1, q_2, \dots, q_n\}}.

Each f_n is nonzero at only finitely many points, so it is Riemann integrable with \int_0^1 f_n = 0. But f_n \to \mathbf{1}_{\mathbb{Q}} pointwise — and the limit is not integrable at all. So under Riemann's theory,

\lim_{n\to\infty} \int_0^1 f_n = 0, \qquad \text{but} \qquad \int_0^1 \lim_{n\to\infty} f_n \;\text{ does not exist.}

The limit and the integral cannot be swapped. This is the real scandal — not that one exotic function fails, but that the class of Riemann-integrable functions is not closed under limits. Analysis lives on interchanging limits with integrals (differentiating under the integral sign, Fourier series, probability). A theory where that fails at the first hurdle is a theory built on sand. Lebesgue's integral fixes exactly this: its convergence theorems make limit-swapping the norm, not the exception.

The idea in one picture: slice the range, not the domain

Lebesgue described his own idea with a shopkeeper's image. To total the coins in your pocket, Riemann counts them left to right in the order they lie on the counter — strip by strip along the domain. Lebesgue first sorts by value — all the pennies, all the dimes — then counts each denomination and multiplies by its worth. "I have a certain sum in my pocket; I can count it either way."

Toggle the control below. In Riemann mode the plane is cut into vertical strips; each strip's height is f sampled somewhere in that strip. In Lebesgue mode the plane is cut into horizontal bands of height \Delta y; for each band at level y we ask which x have f(x) \ge y — the highlighted set on the axis — and weight y by the size of that set. That size is exactly what "measure" must supply. The Lebesgue integral is

\int f \,=\, \int_0^\infty \mu\bigl(\{x : f(x) \ge y\}\bigr)\,dy.

For a continuous f the two answers agree — that is the shopkeeper's point. The gain is that the horizontal question survives where the vertical one dies: for \mathbf{1}_{\mathbb{Q}} the set \{f \ge y\} is \mathbb{Q}\cap[0,1] (measure 0) for 0 < y \le 1, so the integral is 0 with no drama at all.

The primitive question: how big is a set?

Everything above reduces to a demand: assign to each subset A \subseteq \mathbb{R} a size \mu(A) \in [0, \infty] that behaves like length. We would want, at the very least, all four of these:

It reads like a modest wish list. It is impossible. No function can satisfy all four at once. Something has to give — and the thing that gives is the last bullet.

Using the axiom of choice, there is a set V \subseteq [0,1] — the Vitali set — to which no translation-invariant, countably additive length can assign any value:

The escape route is to give up the fourth wish. We will not insist that every subset has a measure — only a rich, well-behaved family of "measurable" sets, closed under the operations analysis needs. That family is a σ-algebra, and it is where the next page begins.

Three traps at the entrance to the subject:

Because for the functions physicists and engineers actually meet — piecewise continuous, finitely many jumps — Riemann's theory is correct, computable, and tied to antiderivatives by the Fundamental Theorem of Calculus. Lebesgue's own theorem says a bounded function is Riemann integrable iff its discontinuities have measure zero, so every "practical" function passes. The trouble only surfaces at the limits — Fourier series that converge badly, sequences of nice functions with nasty limits, the probability of an event as an integral. That is precisely the terrain of 20th-century analysis, and it is why Lebesgue (1902), building on Borel and Jordan, rebuilt the integral from measure up rather than patching Riemann. The old integral did not die; it became the special case you compute with.