Lebesgue Integral
A more powerful way to integrate than Riemann's — slice the range instead of the domain, making sense of integrals that the Riemann integral can't handle.
The Riemann integral (the one taught in calculus) works by slicing the domain (the x-axis) into thin strips and summing up rectangle areas. The Lebesgue integral takes the opposite approach: it slices the range (the y-axis) into thin horizontal layers, and for each layer, measures how much of the domain maps into it.
For most "nice" functions (continuous, or with only a few jumps), Riemann and Lebesgue integrals agree completely. The Lebesgue integral's power shows up for wild functions — ones too jagged or discontinuous for the Riemann approach to even make sense of.
Define if is rational, if is irrational, on . No matter how thin you slice the domain, every strip contains both rational and irrational points — the Riemann sums never settle down to a single value. The Riemann integral simply doesn't exist for this function.
The Lebesgue integral handles it easily: it asks "how much of (by length) is rational?" The rationals have measure zero (you can cover them with intervals of total length as small as you like), so the Lebesgue integral of is exactly .
Why does slicing the range rather than the domain make the rational-indicator function so much easier to integrate?
Solution
Slicing the range only ever produces two layers here: "" and "." The question becomes purely "how much of , by length, falls into each layer?" — a question about the size (measure) of the set of rationals versus irrationals, which has a clean answer (rationals have measure zero). Riemann's domain-slicing approach instead asks about behavior on tiny intervals, and every interval — no matter how small — contains both rationals and irrationals, so the approach never stabilizes.