Measure Theory

What this note builds
  1. 01The uniform dartwhy naive length and Riemann integration break on simple probability questions
  2. 02The wishlist for sizeformalizing countable additivity and translation invariance
  3. 03The Vitali impossibilitywhy we cannot assign a valid size to every subset of ℝ
  4. 04σ-algebras & Borel setsrestricting our domain to sets buildable from intervals
  5. 05Measures & Carathéodoryconstructing Lebesgue measure via infinite shrink-wrapping
  6. 06Measurable functionsturning outcomes into numbers without breaking events
  7. 07The Lebesgue integralaveraging functions by slicing the y-axis instead of the x-axis
  8. 08Convergence theoremsthe exact rules for swapping limits and integrals
    • L^p spacesturning integrability into a complete geometric distance
· 48 min read · 9,443 words

Why naive length breaks as a probability definition

Setup: Throw a perfectly random dart at the interval [0,1][0,1], and call the landing point XX. Because no region is favored over any other, the probability of landing in an interval [a,b][a,b] is simply its length:

P(X∈[a,b])=b−a(0≤a≤b≤1)P(X \in [a,b]) = b - a \qquad (0 \le a \le b \le 1)

If we add the rule that probabilities of non-overlapping pieces add up, we can measure any event made of finitely many intervals:

P(X∈[0,0.1]∪[0.5,0.7])=0.1+0.2=0.3P\big(X \in [0, 0.1] \cup [0.5, 0.7]\big) = 0.1 + 0.2 = 0.3

This can handle most of the basic questions we might have about the dart. But, the machinery breaks the moment we ask a seemingly simple question about a set that isn’t a finite collection of intervals:

What is P(X is a rational number)?\text{What is } P(X \text{ is a rational number})?

Countable vs. uncountable infinity

At first glance, it feels like P(X∈Q)P(X \in \mathbb{Q}) should be greater than 00. The fractions p/qp/q are dense in [0,1][0,1], meaning mathematically that for any real numbers a,ba, b with a<ba < b, there exists some q∈Qq \in \mathbb{Q} such that a<q<ba < q < b, and nearly every number we write down in daily life is rational.

However, density is a statement about arrangement, not about quantity. We are talking about two different sizes of infinity here:

  1. The rationals Q\mathbb{Q} are countable (listable): Even though there are infinitely many fractions in [0,1][0,1], we can line them up in a single sequence q1,q2,q3,…q_1, q_2, q_3, \dots without missing any. Simply order them by their denominator, and then by their numerator (skipping duplicates like 2/42/4): 01,11,12,13,23,14,34,15,25,35,45,…\frac{0}{1}, \frac{1}{1}, \frac{1}{2}, \frac{1}{3}, \frac{2}{3}, \frac{1}{4}, \frac{3}{4}, \frac{1}{5}, \frac{2}{5}, \frac{3}{5}, \frac{4}{5}, \dots Every rational number has a specific index nn where it eventually appears in this list.

    import math
    def get_nth_rational(n: int) -> str:
    """Returns the n-th rational in 0/1, 1/1, 1/2, 1/3, 2/3, 1/4, 3/4, ..."""
    if n <= 0:
    raise ValueError("n must be a positive integer (1-indexed).")
    if n == 1:
    return "0/1"
    if n == 2:
    return "1/1"
    remaining = n - 2 # the first two terms (d = 1) are handled above
    d = 2
    while True:
    # at denominator d, the valid numerators are the k < d coprime to d
    # this is because for coprimes we can't cancel a common factor in both numerator and denominator
    coprimes = [k for k in range(1, d) if math.gcd(k, d) == 1]
    if remaining <= len(coprimes):
    return f"{coprimes[remaining - 1]}/{d}"
    remaining -= len(coprimes) # skip this denominator's block, keep counting
    d += 1
  2. The full interval [0,1][0,1] is uncountable (unlistable): By Cantor’s diagonal argument, no sequential list can ever hold all real numbers in [0,1][0,1].

ProofCantor’s Diagonal Argument: why [0,1][0,1] cannot be listed

Suppose someone claims to have a complete list r1,r2,r3,…r_1, r_2, r_3, \dots of every real number in [0,1][0,1], written as infinite decimals:

  • r1=0.51492…r_1 = 0.\mathbf{5}1492\dots
  • r2=0.38017…r_2 = 0.3\mathbf{8}017\dots
  • r3=0.92561…r_3 = 0.92\mathbf{5}61\dots

We can build a brand-new number x∈[0,1]x \in [0,1] by walking down the diagonal (the nn-th digit of the nn-th number) and picking a different digit at each step, say, pick 44 unless the diagonal digit is 44, in which case pick 55.

  • For the list above, xx starts 0.444…0.\mathbf{444}\dots

By construction, xx differs from r1r_1 in the 1st decimal place, from r2r_2 in the 2nd decimal place, and from rnr_n in the nn-th decimal place. Thus xx is not on the list, contradicting the claim that the list was complete.

∎

Because the entire interval [0,1][0,1] cannot be listed, while the rationals can, the irrationals (like π/4\pi/4 or 2/2\sqrt{2}/2) must make up almost the entirety of the line. The rationals are merely a countable dusting of points inside an uncountable continuum, so P(X∈Q)P(X \in \mathbb{Q}) ought to be 00.

Two failed attempts using finite intervals

When we try to prove P(X∈Q)=0P(X \in \mathbb{Q}) = 0 using only finite intervals, we hit a wall from both directions:

ApproachHow it worksWhy it fails
1. Point-by-point (from inside)A single point {q}\{q\} is the degenerate interval [q,q][q,q] of length q−q=0q - q = 0. Since Q∩[0,1]\mathbb{Q} \cap [0,1] is the list {q1,q2,… }\{q_1, q_2, \dots\}, we add up the lengths: 0+0+0+⋯=00 + 0 + 0 + \cdots = 0.Our rules only allow adding finitely many pieces. Adding across an infinite sequence requires a new axiom (countable additivity), which we haven’t justified yet.
2. Trapping in boxes (from outside)Cover all rationals in [0,1][0,1] using a finite collection of intervals, and sum their lengths to get an upper bound.Because rationals sit inside every gap of positive width, any finite set of intervals that covers every rational in [0,1][0,1] must cover the entire segment [0,1][0,1] (except at most finitely many single points). This only proves P(X∈Q)≤1P(X \in \mathbb{Q}) \le 1, which is useless.

Converting probability to integration: why Riemann also fails

Since trying to trap the rationals in finite external boxes failed to give an answer, we need a more powerful tool which we usually use to “measure” complex sets. We can do this by turning a set into a shape and calculating its area via integration.

To build an intuition for how we measure complex, non-interval sets, consider a famous fractal: the Cantor set.

  • Imagine starting with the interval [0,1][0,1] and repeatedly removing the open middle third of every remaining piece infinitely. What is left behind is a “dust” of points, infinitely many of them, and we want to find their total length (probability of the dart landing inside the cantor set). If you try to use a finite collection of external boxes to cover all the remaining pieces as we tried above, any collection of finite boxes spanning from the first piece to the last will inevitably bridge the gaps, leaving you with a useless upper bound of 11.
  • The Formal Problem: Let C0=[0,1]C_0 = [0,1]. At each step nn, CnC_n is formed by removing the open middle third of each interval in Cn−1C_{n-1}. The Cantor set is the intersection of all these stages: C=⋂n=0∞CnC = \bigcap_{n=0}^{\infty} C_n. We want to compute its total length (measure) m(C)m(C).
ProofMeasuring the Cantor set via shrinking approximations

At step nn, the set CnC_n consists of 2n2^n disjoint closed intervals, each of length (13)n\left(\frac{1}{3}\right)^n.

The total length (measure) of CnC_n is the sum of the lengths of these intervals: m(Cn)=2n⋅(13)n=(23)nm(C_n) = 2^n \cdot \left(\frac{1}{3}\right)^n = \left(\frac{2}{3}\right)^n

Because the Cantor set CC is contained inside every approximation CnC_n for all nn, its measure must be less than or equal to m(Cn)m(C_n). By taking the limit as n→∞n \to \infty: m(C)=lim⁡n→∞(23)n=0m(C) = \lim_{n \to \infty} \left(\frac{2}{3}\right)^n = 0

Even though the Cantor set contains an uncountable infinity of points (just as many as the entire real line), its total measure is strictly 00 because we can trap it inside a sequence of outer approximations whose lengths shrink to zero.

∎

How this helps us solve the rationals problem: This exact strategy, approximating a complex set from the outside using an infinite sequence of shrinking pieces rather than a single finite collection, looks like it can be used to measure the rationals. Because the rationals are countable, we can place a tiny box of length ε2n\frac{\varepsilon}{2^n} around each rational qnq_n in our list. By summing these lengths across all infinitely many boxes, we get a total outer measure that can be made arbitrarily small, proving that P(X∈Q)=0P(X \in \mathbb{Q}) = 0.

To measure the probability of landing in a set AA, we can define an indicator function 1A(x)\mathbf{1}_A(x) that outputs 11 if x∈Ax \in A and 00 otherwise. For our question about the rationals, this creates the Dirichlet function: D(x)=1Q(x)={1if x is rational0if x is irrationalD(x) = \mathbf{1}_{\mathbb{Q}}(x) = \begin{cases} 1 & \text{if } x \text{ is rational} \\ 0 & \text{if } x \text{ is irrational} \end{cases}

The total area under this function from 00 to 11 represents the expected value, which is our exact probability: E[D(X)]=1⋅P(X∈Q)+0⋅P(X∉Q)=P(X∈Q)=∫01D(x) dx\mathbb{E}[D(X)] = 1 \cdot P(X \in \mathbb{Q}) + 0 \cdot P(X \notin \mathbb{Q}) = P(X \in \mathbb{Q}) = \int_0^1 D(x)\,dx

If standard calculus can evaluate ∫01D(x) dx\int_0^1 D(x)\,dx, our probability problem is solved. Let’s try using the standard Riemann integral:

  1. Chop [0,1][0,1] into finitely many narrow vertical strips.
  2. On each strip, find the upper sum (tallest height ×\times width) and lower sum (lowest height ×\times width).
  3. Squeeze the strip widths to zero to see if they converge to the same area.

For D(x)D(x), this completely breaks down: every subinterval, no matter how microscopic, contains both a rational (D=1D=1) and an irrational (D=0D=0).

  • Every upper sum evaluates to 1×(total width)=11 \times (\text{total width}) = 1.
  • Every lower sum evaluates to 0×(total width)=00 \times (\text{total width}) = 0.

Because the Riemann integral relies on finitely many intervals at each step, it suffers from the exact same flaw as our earlier box-trapping approach: it cannot isolate a countable set of points from the continuum.

Why taking limits breaks the Riemann integral

You might try to bypass this wall by building the Dirichlet function through a sequence of approximations. Let fn(x)=1{q1,…,qn}(x)f_n(x) = \mathbf{1}_{\{q_1, \dots, q_n\}}(x) be a function that equals 11 on just the first nn rationals in our countable list, and 00 everywhere else.

This introduces a critical conflict when we try to pass limits through our integral:

  1. Limit Outside (lim⁡n→∞∫01fn(x) dx=0\lim_{n \to \infty} \int_0^1 f_n(x)\,dx = 0): Here, we integrate each finite approximation first. Because any finite set of nn rational points has total length zero, ∫01fn(x) dx=0\int_0^1 f_n(x)\,dx = 0 for every fixed nn. Taking the limit as n→∞n \to \infty gives 00.

  2. Limit Inside (∫01(lim⁡n→∞fn(x)) dx\int_0^1 \big(\lim_{n \to \infty} f_n(x)\big)\,dx): Here, we take the limit of the functions first. As n→∞n \to \infty, fn(x)f_n(x) pointwise converges to the Dirichlet function D(x)D(x). But when we then try to compute ∫01D(x) dx\int_0^1 D(x)\,dx, the integral does not exist because the Riemann upper and lower sums never meet.

Why this failure is fatal for probability

Probability theory is built entirely on limits, such as the Law of Large Numbers, infinite coin tosses, and Markov chain convergence, where we constantly need to swap limits and expectations (integrals).

To see how explicitly this breaks down, consider one of the foundational theorems of probability: Continuity of Probability (or Monotone Convergence for Events).

Suppose we have an expanding sequence of nested events E1⊂E2⊂E3⊂…E_1 \subset E_2 \subset E_3 \subset \dots, and we want to find the probability of their infinite union E=⋃n=1∞EnE = \bigcup_{n=1}^\infty E_n. By definition, we compute this via a limit of finite probabilities: P(⋃n=1∞En)=lim⁡n→∞P(En)P\left(\bigcup_{n=1}^\infty E_n\right) = \lim_{n \to \infty} P(E_n)

Expressed as an integral of indicator functions fn(x)=1En(x)f_n(x) = \mathbf{1}_{E_n}(x), this theorem relies entirely on the ability to safely swap the limit and the integral: lim⁡n→∞∫01fn(x) dx=∫01(lim⁡n→∞fn(x))dx\lim_{n \to \infty} \int_0^1 f_n(x)\,dx = \int_0^1 \left( \lim_{n \to \infty} f_n(x) \right) dx

  • Where Riemann fails: As we saw with our sequence of rational approximations fn→Df_n \to D, the left side evaluated to 00, while the right side (integrating the limit function D(x)D(x)) completely failed to exist under Riemann rules.
  • Why this is a problem: If an integration theory forbids this swap, you cannot even define the probability of infinite events. You would be unable to prove that the probability of an infinite union equals the limit of its finite parts, leaving basic axioms of probability (like countable additivity) unprovable and making it impossible to analyze infinite stochastic processes or limits of random variables.

Where this goes next: All three failures, measuring Q\mathbb{Q} with points, integrating D(x)D(x) with Riemann strips, and swapping limits, stem from being restricted to finitely many pieces. To fix probability, we need a modern measure theory that can handle countably many pieces natively.


The wishlist for “size”

We want a size function λ\lambda (Greek lambda, for length) that assigns a length to subsets of the real line R\mathbb{R}.

ComponentDetail
Signatureλ:Subsets of R→[0,∞]\lambda : \text{Subsets of } \mathbb{R} \rightarrow [0, \infty]
DomainIdeally, any subset A⊆RA \subseteq \mathbb{R}.
CodomainNon-negative real numbers plus ∞\infty (since sets like [0,∞)[0, \infty) are infinitely long, with a+∞=∞a + \infty = \infty).

To solve our dart problems, λ\lambda must obey four foundational rules:

  1. (W1) Intervals get their length: λ([a,b])=b−a\lambda([a,b]) = b - a. Why: Size must agree with basic geometry on simple intervals.
  2. (W2) Countable additivity: If A1,A2,…A_1, A_2, \dots are pairwise disjoint (non-overlapping, so Ai∩Aj=∅A_i \cap A_j = \varnothing for i≠ji \neq j), then: λ(⋃n=1∞An)=∑n=1∞λ(An)\lambda\left(\bigcup_{n=1}^\infty A_n\right) = \sum_{n=1}^\infty \lambda(A_n) Why countable: This is the exact upgrade that gives λ(Q)=0+0+⋯=0\lambda(\mathbb{Q}) = 0 + 0 + \cdots = 0 and allows limits to work. Why not uncountable: [0,1][0,1] is the disjoint union of its uncountably many individual points {x}\{x\}. If we allowed uncountable sums, we would get 1=λ([0,1])=∑x∈[0,1]λ({x})=∑0=01 = \lambda([0,1]) = \sum_{x \in [0,1]} \lambda(\{x\}) = \sum 0 = 0, a contradiction. Countable additivity is the sharpest rule possible without running into contradictions like this.
  3. (W3) Translation invariance: λ(A+t)=λ(A)\lambda(A + t) = \lambda(A), where A+t={a+t:a∈A}A + t = \{a + t : a \in A\} shifts every point in AA by tt. Why: A uniform dart has no favorite region, sliding a set sideways cannot alter its length.
  4. (W4) Universal domain: λ(A)\lambda(A) is defined for every subset A⊆RA \subseteq \mathbb{R}. Why: Ideally, we never want to check if an event is “valid” before asking for its probability.

The Vitali impossibility: why W1–W4 cannot coexist

TheoremVitali’s Theorem (1905)

No function λ\lambda can satisfy W1–W4 simultaneously. Specifically, if λ\lambda obeys interval length (W1), countable additivity (W2), and shift invariance (W3), there exists a subset V⊆[0,1)V \subseteq [0,1), a Vitali set, that cannot be assigned any length at all.

Proof Strategy: We are trying to cut the 1-unit interval [0,1)[0,1) into a countably infinite number of identical, non-overlapping clones that can perfectly reassemble the original interval.

Think of every number in [0,1)[0,1) as a person. We assign everyone to a “club” based on one rule: two people are in the same club if the exact distance between them is a fraction (a rational number).

  • Person 0.10.1 and Person 0.60.6 are in the same club (distance is 0.50.5, which is 1/21/2).
  • Person π−3\pi - 3 and Person 0.10.1 are in different clubs.

Because there are “more” irrational numbers than rational ones, the interval splits into an uncountable number of different clubs. Inside each club, the members are perfectly spaced apart by exact fractions.

We then create a “VIP guest list”, the Vitali set VV, by picking exactly one person from every single club.

If we take everyone on this list VV and shift them by every possible fraction rn∈[0,1)r_n \in [0,1) (wrapping around if they pass 1), we get a countable list of shifted copies: V⊕r1,V⊕r2,…V \oplus r_1, V \oplus r_2, \dots

Because everyone in a club is separated by fractions, shifting our VIP list by fractions just systematically swaps in different members of the same clubs. The lists never overlap, and together they perfectly tile the entire interval:

[0,1)=(V⊕r1)∪(V⊕r2)∪(V⊕r3)∪⋯[0,1) = (V \oplus r_1) \cup (V \oplus r_2) \cup (V \oplus r_3) \cup \cdots

By shift invariance (W3), every clone has the exact same length λ(V)\lambda(V). By countable additivity (W2), the total length of [0,1)[0,1) (which is 11) must equal λ(V)\lambda(V) added to itself infinitely many times:

1=λ(V)+λ(V)+λ(V)+…1 = \lambda(V) + \lambda(V) + \lambda(V) + \dots

  • If λ(V)=0\lambda(V) = 0, the infinite sum is 0≠10 \neq 1.
  • If λ(V)>0\lambda(V) > 0, the infinite sum is ∞≠1\infty \neq 1.

Either way, λ(V)\lambda(V) cannot equal any number in [0,∞][0, \infty], breaking W4. Here is the formal 3-step construction of VV:

ProofStep-by-step construction of the Vitali set VV

Step 1: Define “wrap-around shifting” (⊕\oplus) so shifted sets stay inside [0,1)[0,1) If we shift a subset of [0,1)[0,1) to the right by tt, part of it spills past 11. To keep everything inside [0,1)[0,1), any part that goes past 11 simply wraps around to 00 (addition modulo 11, like a clock): x⊕t={x+tif x+t<1x+t−1if x+t≥1x \oplus t = \begin{cases} x + t & \text{if } x + t < 1 \\ x + t - 1 & \text{if } x + t \ge 1 \end{cases} Does ⊕\oplus preserve length? Yes. Shifting a set A⊆[0,1)A \subseteq [0,1) with wrap-around just cuts AA into two disjoint pieces, the left piece Aleft=A∩[0,1−t)A_{\text{left}} = A \cap [0, 1-t) that shifts normally by +t+t, and the right piece Aright=A∩[1−t,1)A_{\text{right}} = A \cap [1-t, 1) that shifts by t−1t-1. By W3 and W2: λ(A⊕t)=λ(Aleft+t)+λ(Aright+t−1)=λ(Aleft)+λ(Aright)=λ(A)\lambda(A \oplus t) = \lambda(A_{\text{left}} + t) + \lambda(A_{\text{right}} + t - 1) = \lambda(A_{\text{left}}) + \lambda(A_{\text{right}}) = \lambda(A)

Step 2: Partition [0,1)[0,1) into “rational-difference buckets” and pick one representative from each Put two numbers x,y∈[0,1)x, y \in [0,1) into the same bucket (equivalence class) if the distance between them, x−yx - y, is a rational number.

  • Every bucket is countable (it consists of one starting number xx plus all rational wrap-around shifts x⊕rx \oplus r for r∈Q∩[0,1)r \in \mathbb{Q} \cap [0,1)).
  • Because [0,1)[0,1) is uncountable and each bucket is only countable, there are uncountably many disjoint buckets that together fill [0,1)[0,1).

Now form the Vitali set VV by reaching into each bucket and picking exactly one number from it. (Because there is no formula to pick a “first” number from each uncountable collection of buckets, this step invokes the Axiom of Choice, so VV exists mathematically, though no one can draw it.)

Step 3: Shift VV by every rational r1,r2,…r_1, r_2, \dots in [0,1)[0,1) to tile [0,1)[0,1) List all rationals in [0,1)[0,1) as r1,r2,r3,…r_1, r_2, r_3, \dots and form the shifted copies Vn=V⊕rnV_n = V \oplus r_n. We verify two facts:

  1. The copies VnV_n cover every point in [0,1)[0,1): Pick any number x∈[0,1)x \in [0,1). It belongs to some bucket, and VV contains that bucket’s unique representative vv. Because xx and vv are in the same bucket, their wrap-around difference is some rational rnr_n, meaning x=v⊕rn∈Vnx = v \oplus r_n \in V_n.
  2. The copies VnV_n never overlap (pairwise disjoint): Suppose ViV_i and VjV_j shared a point. Then v1⊕ri=v2⊕rjv_1 \oplus r_i = v_2 \oplus r_j for some v1,v2∈Vv_1, v_2 \in V. Rearranging shows v1−v2v_1 - v_2 is rational, meaning v1v_1 and v2v_2 live in the same bucket. Since VV only picked one number per bucket, v1v_1 and v2v_2 must be the exact same number, which forces ri=rjr_i = r_j (so ViV_i and VjV_j were the same copy all along).

Conclusion: [0,1)=⋃n=1∞(V⊕rn)[0,1) = \bigcup_{n=1}^\infty (V \oplus r_n) is a countable disjoint union. Applying W2 and Step 1 gives: 1=λ([0,1))=∑n=1∞λ(V⊕rn)=∑n=1∞λ(V)∈{0,∞}1 = \lambda([0,1)) = \sum_{n=1}^\infty \lambda(V \oplus r_n) = \sum_{n=1}^\infty \lambda(V) \in \{0, \infty\} A contradiction (1≠01 \neq 0 and 1≠∞1 \neq \infty). Thus VV cannot have a length. ■\blacksquare

∎

Which rule do we sacrifice?

We cannot keep all four wishes.

  • Dropping W1 (interval length) or W3 (shift invariance) destroys basic geometry.
  • Dropping W2 (countable additivity) leaves us stuck with the Riemann/rational failures of Section 1.
  • Dropping W4 (every set has a size) costs us almost nothing in practice: the only sets that break λ\lambda, like the Vitali set VV, require the non-constructive Axiom of Choice to scatter points so pathologically that no formula can ever define them. Here is what this sentence means:
    • What is the Axiom of Choice? Normally, to define a set, you use a rule or a formula (like ”xx is a number between 00 and 11”). But the Axiom of Choice is a rule that says: “Even if you have an infinite number of groups and no formula or rule can tell you how to pick an item from each group, you are legally allowed to just imagine that you reached into all of them simultaneously and grabbed one item anyway.”
    • What does the Vitali set look like? Because it was built using that “no-formula” rule, the Vitali set is not a normal geometric shape you can draw, graph, or measure in a physics lab. It is a completely chaotic, infinitely scattered dust cloud where every point is isolated from any recognizable pattern.
    • Why it doesn’t hurt us: In real-world math, physics, engineering, and statistics, you never encounter these bizarre, unformulaic dust clouds. Every set you can actually write down, describe, or use to model a real problem is “well-behaved” and gets a valid length just fine. Dropping W4 just bans these ghost-like mathematical anomalies from having a length, leaving all normal math completely untouched.

Our resolution: Keep W1–W3, drop W4, and restrict λ\lambda to a domain of “well-behaved” subsets called measurable sets.

NoteAside: Why dropping W2 wouldn’t even save you in 3D (Banach–Tarski)

On the 1D line R\mathbb{R} (and in 2D), if you weaken W2 to finite additivity (only adding finitely many pieces), you actually can assign a shift-invariant size to every subset.

In 3D (R3\mathbb{R}^3), even finite additivity explodes. In 1924, Stefan Banach and Alfred Tarski used the exact same “Axiom of Choice bucket” trick—replacing rational shifts with 3D rotations—to prove the Banach–Tarski Paradox:

You can take a solid 3D ball of radius 11, slice it into just 5 disjoint point-cloud pieces, and by doing nothing more than rotating and sliding those 5 rigid pieces through space, reassemble them into two solid balls, each of radius 11!

The Intuition: The “Dictionary” Paradox The engine of Banach-Tarski isn’t really about geometry; it is an algebraic trick involving rotations. Imagine a dictionary of all possible “words” made of four letters: A,A−1,B,B−1A, A^{-1}, B, B^{-1} (where a letter and its inverse cancel out, so you never write AA−1A A^{-1}).

You can split this dictionary into four sections based on the starting letter of the word: WA,WA−1,WB,WB−1W_A, W_{A^{-1}}, W_B, W_{B^{-1}}. Now, look at WAW_A (all words starting with AA). If you append A−1A^{-1} to the front of every word in WAW_A, the A−1A^{-1} and the AA cancel out. What are you left with? You get every possible word in the entire dictionary, except words that start with A−1A^{-1} (because an original word couldn’t start with A−1…A^{-1} \dots, or it wouldn’t have been in WAW_A).

In math terms: A−1(WA)=Everything∖WA−1A^{-1}(W_A) = \text{Everything} \setminus W_{A^{-1}}. Add WA−1W_{A^{-1}} back in, and you have the whole dictionary! So just two pieces, WAW_A and WA−1W_{A^{-1}}, can recreate the entire dictionary. Similarly, the other two pieces, WBW_B and WB−1W_{B^{-1}}, can recreate a second complete dictionary. You just turned 1 dictionary into 2.

If we pick two specific 3D rotations for AA and BB, this “dictionary” maps perfectly onto the surface of a sphere. Just like the Vitali set, we group points on the sphere into “clubs” based on whether they can be rotated into each other. We use the Axiom of Choice to pick one VIP from each club, and then we apply our dictionary paradox. Because the rotations double the dictionary, they double the sphere.

ProofFormal Proof of the Banach-Tarski Paradox

Step 1: Construct the Free Group F2F_2 of Rotations We find two 3D rotations, aa and bb (e.g., rotations by arccos⁡(1/3)\arccos(1/3) around the x and z axes), that generate a free group. This means no combination of these rotations ever brings you back to the exact starting position (except the empty sequence, the identity ee). Every sequence of these rotations and their inverses (a−1,b−1a^{-1}, b^{-1}) represents a unique rotation in 3D space. Let this group of rotations be F2F_2.

Step 2: The Paradoxical Decomposition of F2F_2 Let S(a)S(a) be the set of all rotation sequences in F2F_2 that start with aa. Define S(a−1),S(b),S(b−1)S(a^{-1}), S(b), S(b^{-1}) similarly. The entire group is the disjoint union: F2={e}∪S(a)∪S(a−1)∪S(b)∪S(b−1)F_2 = \{e\} \cup S(a) \cup S(a^{-1}) \cup S(b) \cup S(b^{-1}) If we multiply the set S(a−1)S(a^{-1}) by aa on the left, the aa and a−1a^{-1} cancel, yielding every word in F2F_2 except those starting with a−1a^{-1}. Thus: aS(a−1)=F2∖S(a)  ⟹  F2=S(a)∪aS(a−1)a S(a^{-1}) = F_2 \setminus S(a) \implies F_2 = S(a) \cup a S(a^{-1}) bS(b−1)=F2∖S(b)  ⟹  F2=S(b)∪bS(b−1)b S(b^{-1}) = F_2 \setminus S(b) \implies F_2 = S(b) \cup b S(b^{-1}) We have decomposed F2F_2 into pieces that, when rotated, form two complete copies of F2F_2.

Step 3: Action on the Sphere and the Axiom of Choice Apply F2F_2 to the surface of a sphere S2S^2. First, remove the “poles” (the countable set of points DD that remain fixed under any of the rotations in F2F_2). For the remaining points S2∖DS^2 \setminus D, partition them into “orbits” (two points are in the same orbit if a rotation in F2F_2 maps one to the other). By the Axiom of Choice, construct a set MM containing exactly one representative from every orbit. Every point in S2∖DS^2 \setminus D can now be uniquely written as a rotation from F2F_2 applied to a point in MM.

Step 4: Doubling the Sphere We partition S2∖DS^2 \setminus D into 4 pieces based on our free group decomposition: A1=S(a)MA_1 = S(a)M, A2=S(a−1)MA_2 = S(a^{-1})M, B1=S(b)MB_1 = S(b)M, B2=S(b−1)MB_2 = S(b^{-1})M. Applying the paradoxical algebra from Step 2:

  • A1∪aA2=S2∖DA_1 \cup a A_2 = S^2 \setminus D (Copy 1)
  • B1∪bB2=S2∖DB_1 \cup b B_2 = S^2 \setminus D (Copy 2) We have successfully doubled the punctured sphere using just 4 pieces and rigid rotations.

Step 5: Fixing the Poles and the Origin To plug the missing poles DD, we use a “Hilbert’s Hotel” trick: find a rotation axis that doesn’t hit DD, and rotate by an irrational angle. This maps the missing poles to a sequence of points, allowing us to shift them down the line and “absorb” the holes with one extra piece. Finally, to double the solid ball (not just the sphere surface), we simply draw a line segment from the center origin (0,0,0)(0,0,0) to every point on our spherical pieces. The center point is handled with a final trivial shift, completing the 5-piece decomposition. ■\blacksquare

∎


σ-algebras: deciding which sets get a size

Motivation: Having dropped W4, we cannot let our event space be the power set P(Ω)\mathcal{P}(\Omega) (all subsets of Ω\Omega). Instead, on any sample space Ω\Omega of outcomes, we must select a restricted club of “measurable” subsets F⊆P(Ω)\mathcal{F} \subseteq \mathcal{P}(\Omega) that are allowed to have a size. What closure rules must this club obey so we never accidentally manufacture an unmeasurable set like VV while doing probability?

RuleMathematical StatementProbabilistic Meaning & Why We Need It
(S1) Contains the whole spaceΩ∈F\Omega \in \mathcal{F}”Something happens” must be a valid event (so we can set P(Ω)=1P(\Omega) = 1).
(S2) Closed under complementsA∈F  ⟹  Ac=Ω∖A∈FA \in \mathcal{F} \implies A^c = \Omega \setminus A \in \mathcal{F}If we can find the probability that AA happens, we must be able to find the probability that AA does not happen (1−P(A)1 - P(A)).
(S3) Closed under countable unionsA1,A2,⋯∈F  ⟹  ⋃n=1∞An∈FA_1, A_2, \dots \in \mathcal{F} \implies \bigcup_{n=1}^\infty A_n \in \mathcal{F}Required by W2: countable additivity μ(⋃An)=∑μ(An)\mu(\bigcup A_n) = \sum \mu(A_n) only makes sense if the countable union ⋃An\bigcup A_n is itself inside the allowed domain F\mathcal{F}!

Definitionσ-algebra and Measurable Space

A collection F\mathcal{F} of subsets of Ω\Omega satisfying S1, S2, and S3 is called a σ\sigma-algebra (the Greek σ\sigma stands for countable Summe / union). The pair (Ω,F)(\Omega, \mathcal{F}) is called a measurable space.

What comes for free from S1–S3:

  • The empty set ∅=Ωc∈F\varnothing = \Omega^c \in \mathcal{F}.
  • Countable intersections via De Morgan’s Law: ⋂n=1∞An=(⋃n=1∞Anc)c∈F\bigcap_{n=1}^\infty A_n = \left(\bigcup_{n=1}^\infty A_n^c\right)^c \in \mathcal{F}.
  • Set differences: B∖A=B∩Ac∈FB \setminus A = B \cap A^c \in \mathcal{F}.

WarningWhy countable unions, not arbitrary unions?

As we will see below, every single point {x}\{x\} is a valid measurable set. If F\mathcal{F} allowed uncountable unions, then every subset of R\mathbb{R}, including the Vitali set VV, would be in F\mathcal{F} (since any set is the union of its points), landing us right back in the Section 3 contradiction! Restricting to countable operations is what keeps pathological sets locked out.

Intuitionσ\sigma-algebras as “Available Information”

Beyond avoiding Vitali sets, a σ\sigma-algebra represents what an observer knows. Suppose a die is rolled (Ω={1,2,3,4,5,6}\Omega = \{1,2,3,4,5,6\}), and someone only tells you whether the roll was Even or Odd. The events whose truth value you can now answer are: Fparity={∅, {2,4,6}, {1,3,5}, Ω}\mathcal{F}_{\text{parity}} = \big\{\varnothing,\ \{2,4,6\},\ \{1,3,5\},\ \Omega\big\} Notice Fparity\mathcal{F}_{\text{parity}} is a valid σ\sigma-algebra! A coarser (smaller) σ\sigma-algebra means less information; a finer (larger) σ\sigma-algebra means more information.

The Borel σ\sigma-algebra: solving the dart board

Now return to the real line Ω=R\Omega = \mathbb{R}. Which specific σ\sigma-algebra should we use?

  • We must include all open intervals (a,b)(a,b) so we can measure basic lengths (W1).
  • We must not include unnecessary garbage like the Vitali set VV.

Therefore, we want the smallest possible σ\sigma-algebra that contains all open intervals.

DefinitionGenerated σ\sigma-algebra and the Borel σ\sigma-algebra B(R)\mathcal{B}(\mathbb{R})

Given any starter collection of sets C\mathcal{C}, the generated σ\sigma-algebra σ(C)\sigma(\mathcal{C}) is the smallest σ\sigma-algebra containing C\mathcal{C} (defined formally by taking the intersection of all σ\sigma-algebras that contain C\mathcal{C}).

On R\mathbb{R}, starting with the open intervals gives the Borel σ\sigma-algebra: B(R)=σ({(a,b):a<b})\mathcal{B}(\mathbb{R}) = \sigma\big(\{(a,b) : a < b\}\big) Any set in B(R)\mathcal{B}(\mathbb{R}) is called a Borel set.

Because B(R)\mathcal{B}(\mathbb{R}) is closed under complements, countable unions, and countable intersections, starting with just open intervals (a,b)(a,b) automatically generates every concrete set we needed in Section 1:

  • Single points {x}\{x\}: Squeeze open intervals down onto xx: {x}=⋂n=1∞(x−1n, x+1n)∈B(R)\{x\} = \bigcap_{n=1}^\infty \left(x - \frac{1}{n},\, x + \frac{1}{n}\right) \in \mathcal{B}(\mathbb{R}).
  • Closed intervals [a,b][a,b] and half-open intervals (a,b](a,b]: [a,b]=(a,b)∪{a}∪{b}∈B(R)[a,b] = (a,b) \cup \{a\} \cup \{b\} \in \mathcal{B}(\mathbb{R}).
  • The rationals Q\mathbb{Q}: A countable union of single points: Q=⋃n=1∞{qn}∈B(R)\mathbb{Q} = \bigcup_{n=1}^\infty \{q_n\} \in \mathcal{B}(\mathbb{R}).
  • The irrationals R∖Q\mathbb{R} \setminus \mathbb{Q}: The complement of a Borel set: Qc∈B(R)\mathbb{Q}^c \in \mathcal{B}(\mathbb{R}).

Every set you can ever write down explicitly with formulas and limits is a Borel set. The Vitali set VV is not.


Measures: the size function, formalized

With the domain restricted from all subsets to a σ\sigma-algebra F\mathcal{F}, we can formalize our size function.

ComponentDetail
Signatureμ:F→[0,∞]\mu : \mathcal{F} \rightarrow [0, \infty]
DomainOnly the measurable sets A∈FA \in \mathcal{F} (where W4 was dropped).
CodomainNon-negative reals plus ∞\infty. If μ(Ω)=1\mu(\Omega) = 1, μ\mu is a probability measure PP.

DefinitionMeasure and Measure Space

A function μ:F→[0,∞]\mu : \mathcal{F} \rightarrow [0, \infty] on a measurable space (Ω,F)(\Omega, \mathcal{F}) is a measure if it satisfies:

  1. (M1) Empty set has zero size: μ(∅)=0\mu(\varnothing) = 0. (Prevents the degenerate case where every set has size ∞\infty.)
  2. (M2) Countable additivity: For any sequence of pairwise disjoint sets A1,A2,⋯∈FA_1, A_2, \dots \in \mathcal{F}, μ(⋃n=1∞An)=∑n=1∞μ(An)\mu\left(\bigcup_{n=1}^\infty A_n\right) = \sum_{n=1}^\infty \mu(A_n)

The triple (Ω,F,μ)(\Omega, \mathcal{F}, \mu) is called a measure space (or a probability space (Ω,F,P)(\Omega, \mathcal{F}, P) when P(Ω)=1P(\Omega) = 1).

Core properties that come for free from M1 & M2

Every measure automatically satisfies four foundational behaviors:

  1. Monotonicity (A⊆B  ⟹  μ(A)≤μ(B)A \subseteq B \implies \mu(A) \le \mu(B)): Since B=A∪(B∖A)B = A \cup (B \setminus A) is disjoint, μ(B)=μ(A)+μ(B∖A)≥μ(A)\mu(B) = \mu(A) + \mu(B \setminus A) \ge \mu(A).
  2. Countable subadditivity (even for overlapping sets): μ(⋃n=1∞An)≤∑n=1∞μ(An)\mu\left(\bigcup_{n=1}^\infty A_n\right) \le \sum_{n=1}^\infty \mu(A_n). (Shave off overlaps by defining disjoint pieces Bn=An∖(A1∪⋯∪An−1)⊆AnB_n = A_n \setminus (A_1 \cup \cdots \cup A_{n-1}) \subseteq A_n and apply M2).
  3. Continuity from below (growing sets): If A1⊆A2⊆⋯A_1 \subseteq A_2 \subseteq \cdots grows to A=⋃n=1∞AnA = \bigcup_{n=1}^\infty A_n, then μ(An)→μ(A)\mu(A_n) \to \mu(A).
  4. Continuity from above (shrinking sets): If A1⊇A2⊇⋯A_1 \supseteq A_2 \supseteq \cdots shrinks to A=⋂n=1∞AnA = \bigcap_{n=1}^\infty A_n and μ(A1)<∞\mu(A_1) < \infty, then μ(An)→μ(A)\mu(A_n) \to \mu(A).
flowchart LR
  subgraph "Continuity from Below: A₁ ⊆ A₂ ⊆ A₃ ..."
    direction LR
    B1["B₁ = A₁"] --> B2["+ ring B₂ = A₂ \ A₁"] --> B3["+ ring B₃ = A₃ \ A₂"] --> Sum["Disjoint sum = lim μ(Aₙ)"]
  end
ProofWhy Countable Additivity forces Continuity of Measure

To prove continuity from below, turn the nested sequence A1⊆A2⊆⋯A_1 \subseteq A_2 \subseteq \cdots into disjoint “onion rings”: B1=A1,B2=A2∖A1,…,Bn=An∖An−1B_1 = A_1, \qquad B_2 = A_2 \setminus A_1, \qquad \dots, \qquad B_n = A_n \setminus A_{n-1} The rings BkB_k are pairwise disjoint, the first nn rings form An=⋃k=1nBkA_n = \bigcup_{k=1}^n B_k, and all rings together form A=⋃k=1∞BkA = \bigcup_{k=1}^\infty B_k. By countable additivity (M2) and the definition of an infinite series: μ(A)=μ(⋃k=1∞Bk)=∑k=1∞μ(Bk)=lim⁡n→∞∑k=1nμ(Bk)=lim⁡n→∞μ(An)\mu(A) = \mu\left(\bigcup_{k=1}^\infty B_k\right) = \sum_{k=1}^\infty \mu(B_k) = \lim_{n \to \infty} \sum_{k=1}^n \mu(B_k) = \lim_{n \to \infty} \mu(A_n) (For continuity from above, apply this to A1∖An↑A1∖AA_1 \setminus A_n \uparrow A_1 \setminus A. We require μ(A1)<∞\mu(A_1) < \infty so we never subtract ∞−∞\infty - \infty; for example, An=[n,∞)A_n = [n, \infty) has λ(An)=∞\lambda(A_n) = \infty for all nn, yet ⋂An=∅\bigcap A_n = \varnothing has measure 00.)

∎

Immediate payoff: P(X∈Q)=0P(X \in \mathbb{Q}) = 0 and “Almost Everywhere”

Suppose we have a measure λ\lambda on B(R)\mathcal{B}(\mathbb{R}) that assigns intervals their length (λ([a,b])=b−a\lambda([a,b]) = b-a).

  • Every single point {x}\{x\} has length λ({x})=λ([x,x])=0\lambda(\{x\}) = \lambda([x,x]) = 0.
  • By countable additivity (M2), the rationals have length: λ(Q)=λ(⋃n=1∞{qn})=∑n=1∞λ({qn})=0+0+0+⋯=0\lambda(\mathbb{Q}) = \lambda\left(\bigcup_{n=1}^\infty \{q_n\}\right) = \sum_{n=1}^\infty \lambda(\{q_n\}) = 0 + 0 + 0 + \cdots = 0

DefinitionNull Sets and “Almost Everywhere” (a.e. / a.s.)

  • A measurable set N∈FN \in \mathcal{F} with μ(N)=0\mu(N) = 0 is called a null set (even if it is non-empty or infinite, like Q\mathbb{Q}).
  • A statement holds almost everywhere (a.e., or almost surely / a.s. in probability) if the set of points where it fails has measure 00.
  • Example: The Dirichlet function D=1QD = \mathbf{1}_{\mathbb{Q}} equals 00 almost everywhere because {x:D(x)≠0}=Q\{x : D(x) \neq 0\} = \mathbb{Q} has measure 00.

Constructing Lebesgue measure: Carathéodory’s extension

The Problem: Section 5 assumed a length measure λ\lambda on B(R)\mathcal{B}(\mathbb{R}) exists. How do we prove it actually exists? We know the length of a half-open interval is ℓ((a,b])=b−a\ell((a,b]) = b-a, and we can add lengths of finitely many disjoint intervals. But B(R)\mathcal{B}(\mathbb{R}) contains unimaginably complex sets built by infinite intersections and unions of intervals. You cannot write an explicit formula for every Borel set directly.

In 1914, Constantin Carathéodory solved this with a brilliant 3-step pipeline that builds Lebesgue measure from the outside in:

flowchart LR
  S1["Step 1: Elementary length ℓ\non finite unions of (a,b]"] --> S2["Step 2: Outer measure λ*\nInfinite shrink-wrap on ALL sets"] --> S3["Step 3: Carathéodory cut test\nKeep only sets that split cleanly"]

Step 1: Length on elementary intervals (the Premeasure)

Start with the simple collection A\mathcal{A} of finite disjoint unions of half-open intervals (a,b](a,b]. (We use half-open intervals because they tile cleanly without overlap: (a,b]∪(b,c]=(a,c](a,b] \cup (b,c] = (a,c]). On A\mathcal{A}, define naive length:

ℓ(⋃i=1k(ai,bi])=∑i=1k(bi−ai)\ell\left(\bigcup_{i=1}^k (a_i, b_i]\right) = \sum_{i=1}^k (b_i - a_i)

Using the compactness of closed intervals on the real line (the Heine–Borel theorem), one can verify that if an interval (a,b](a,b] is sliced into a countable disjoint union of smaller intervals ⋃n=1∞(an,bn]\bigcup_{n=1}^\infty (a_n, b_n], its length still equals ∑n=1∞(bn−an)\sum_{n=1}^\infty (b_n - a_n). A size function on a simple collection A\mathcal{A} that obeys countable additivity whenever the union happens to land back inside A\mathcal{A} is called a premeasure.

Step 2: Outer measure λ∗\lambda^* (“infinite shrink-wrapping”)

Next, we define an approximate size, called outer measure λ∗(A)\lambda^*(A), for every subset A⊆RA \subseteq \mathbb{R}.

How do you measure an arbitrary, jagged set AA using only simple intervals? You cover AA with a countable sequence of intervals (a1,b1],(a2,b2],…(a_1, b_1], (a_2, b_2], \dots such that A⊆⋃n=1∞(an,bn]A \subseteq \bigcup_{n=1}^\infty (a_n, b_n], add up the lengths of those intervals, and take the tightest possible fit (the infimum / greatest lower bound over all valid covers):

FormulaLebesgue Outer Measure

λ∗(A)=inf⁡{∑n=1∞(bn−an)  :  A⊆⋃n=1∞(an,bn]}\lambda^*(A) = \inf \left\{ \sum_{n=1}^\infty (b_n - a_n) \;:\; A \subseteq \bigcup_{n=1}^\infty (a_n, b_n] \right\}

IntuitionHow countable shrink-wrapping fixes the Q\mathbb{Q} box trap from Section 1

In Section 1, trapping Q∩[0,1]\mathbb{Q} \cap [0,1] inside finitely many intervals forced the intervals to span the entire width 11. Watch what happens when λ∗\lambda^* allows countably many intervals:

Pick any tiny error budget ε>0\varepsilon > 0. Wrap the 1st rational q1q_1 in an interval of width ε/2\varepsilon/2, the 2nd rational q2q_2 in an interval of width ε/4\varepsilon/4, and the nn-th rational qnq_n in an interval of width ε/2n\varepsilon/2^n.

  • Together, these countably many intervals completely cover Q\mathbb{Q}.
  • Their total length is the geometric series: ∑n=1∞ε2n=ε(12+14+18+⋯ )=ε\sum_{n=1}^\infty \frac{\varepsilon}{2^n} = \varepsilon \left(\frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \cdots\right) = \varepsilon Since λ∗(Q)≤ε\lambda^*(\mathbb{Q}) \le \varepsilon for every ε>0\varepsilon > 0, the tightest fit is λ∗(Q)=0\lambda^*(\mathbb{Q}) = 0!

Step 3: The Carathéodory cut condition

Outer measure λ∗(A)\lambda^*(A) is defined on every subset of R\mathbb{R}, matches b−ab-a on intervals, and is shift-invariant. Therefore, by Vitali’s theorem (§3), λ∗\lambda^* cannot be countably additive on all sets.

Specifically, when two disjoint sets (like two shifted Vitali sets V1V_1 and V2V_2) are pathologically intertwined like Velcro, any interval cover around V1V_1 inevitably overlaps V2V_2, causing the sum of their individual shrink-wraps to exceed the shrink-wrap of their union: λ∗(V1∪V2)<λ∗(V1)+λ∗(V2)\lambda^*(V_1 \cup V_2) < \lambda^*(V_1) + \lambda^*(V_2).

To turn λ∗\lambda^* into a true countably additive measure, Carathéodory simply filtered out the Velcro sets: keep only the sets AA that slice every other set EE cleanly without any overlap penalty.

DefinitionCarathéodory Measurability & Extension Theorem

A set A⊆RA \subseteq \mathbb{R} is Carathéodory-measurable (written A∈MA \in \mathcal{M}) if for every test set E⊆RE \subseteq \mathbb{R}: λ∗(E)=λ∗(E∩A)+λ∗(E∩Ac)\lambda^*(E) = \lambda^*(E \cap A) + \lambda^*(E \cap A^c)

Carathéodory’s Extension Theorem:

  1. The collection M\mathcal{M} of sets passing this test forms a σ\sigma-algebra containing all intervals (and therefore contains the entire Borel σ\sigma-algebra B(R)\mathcal{B}(\mathbb{R})).
  2. When restricted to M\mathcal{M}, the outer measure λ∗\lambda^* becomes a true countably additive measure λ\lambda, called Lebesgue measure.
  3. Uniqueness: Because R=⋃n=1∞(−n,n]\mathbb{R} = \bigcup_{n=1}^\infty (-n, n] can be covered by countably many pieces of finite size (σ\sigma-finite), λ\lambda is the unique measure on B(R)\mathcal{B}(\mathbb{R}) that assigns every interval (a,b](a,b] its length b−ab-a.

NotePayoff for Probability: How CDFs build probability distributions

What if you want a non-uniform dart on R\mathbb{R}, described by a Cumulative Distribution Function F(x)=P(X≤x)F(x) = P(X \le x) (such as the Gaussian bell curve)?

Simply replace interval length b−ab - a in Step 1 with F(b)−F(a)F(b) - F(a)! As long as FF is non-decreasing, right-continuous, and goes from 00 (at −∞-\infty) to 11 (at +∞+\infty), Carathéodory’s machine runs identically and outputs a unique probability measure μF\mu_F on B(R)\mathcal{B}(\mathbb{R}) satisfying: μF((a,b])=F(b)−F(a)\mu_F((a,b]) = F(b) - F(a) This proves why specifying a CDF F(x)F(x) on intervals is sufficient to uniquely define the probability of every Borel set on R\mathbb{R}.


Measurable functions and random variables

Motivation: In probability, outcomes ω∈Ω\omega \in \Omega are physical occurrences (coin flips, weather states, dart positions), and we use a function X:Ω→RX : \Omega \rightarrow \mathbb{R} (a random variable) to turn those outcomes into numerical payoffs. Next, we will want to compute the average of XX, which requires asking: “What is the probability that the output X(ω)X(\omega) falls inside some target range B⊆RB \subseteq \mathbb{R}?”

For that probability P({ω∈Ω:X(ω)∈B})P(\{\omega \in \Omega : X(\omega) \in B\}) to exist, the set of inputs ω\omega that land inside BB must belong to our measurable σ\sigma-algebra F\mathcal{F}.

ComponentDetail
Signaturef:(Ω,F)→(R,B(R))f : (\Omega, \mathcal{F}) \rightarrow (\mathbb{R}, \mathcal{B}(\mathbb{R}))
Preimage f−1(B)f^{-1}(B){ω∈Ω:f(ω)∈B}\{\omega \in \Omega : f(\omega) \in B\}, the set of inputs in Ω\Omega that map into the target set B⊆RB \subseteq \mathbb{R}.
RequirementEvery Borel target set B∈B(R)B \in \mathcal{B}(\mathbb{R}) must pull back to a measurable event f−1(B)∈Ff^{-1}(B) \in \mathcal{F}.
flowchart RL
  B["Target Borel set B ∈ ℬ(ℝ)\ne.g. (-∞, a]"] -- "Preimage f⁻¹(B)\npulls back cleanly" --> A["Event {ω : f(ω) ∈ B}\nMUST lie in ℱ"]

DefinitionMeasurable Function / Random Variable

A function f:Ω→Rf : \Omega \rightarrow \mathbb{R} is measurable (and called a random variable when (Ω,F,P)(\Omega, \mathcal{F}, P) is a probability space) if for every Borel set B∈B(R)B \in \mathcal{B}(\mathbb{R}): f−1(B)={ω∈Ω:f(ω)∈B}∈Ff^{-1}(B) = \{\omega \in \Omega : f(\omega) \in B\} \in \mathcal{F}

Shortcut (Checking Generators): Because preimages commute with complements and countable unions (f−1(⋃Bn)=⋃f−1(Bn)f^{-1}(\bigcup B_n) = \bigcup f^{-1}(B_n)), you don’t need to check every Borel set BB. Since rays (−∞,a](-\infty, a] generate B(R)\mathcal{B}(\mathbb{R}), ff is measurable if and only if: {ω∈Ω:f(ω)≤a}∈Ffor every a∈R\{\omega \in \Omega : f(\omega) \le a\} \in \mathcal{F} \quad \text{for every } a \in \mathbb{R}

Why this class of functions is bulletproof

Unlike Riemann-integrable functions, the family of measurable functions is closed under virtually every operation in analysis:

  • Indicators: 1A\mathbf{1}_A is measurable   ⟺  A∈F\iff A \in \mathcal{F}. (Thus the Dirichlet function D=1QD = \mathbf{1}_{\mathbb{Q}} is Borel-measurable!)
  • Algebra & Calculus: Continuous functions, sums f+gf+g, products f⋅gf \cdot g, and compositions of measurable functions are all measurable.
  • Pointwise Limits: If f1,f2,…f_1, f_2, \dots are measurable, then sup⁡nfn\sup_n f_n, inf⁡nfn\inf_n f_n, lim sup⁡nfn\limsup_n f_n, lim inf⁡nfn\liminf_n f_n, and lim⁡n→∞fn\lim_{n \to \infty} f_n are always measurable (because {sup⁡nfn≤a}=⋂n=1∞{fn≤a}\{\sup_n f_n \le a\} = \bigcap_{n=1}^\infty \{f_n \le a\}, which is a countable intersection of measurable sets).

The Lebesgue integral: slicing the y-axis

Motivation: Why did the Riemann integral choke on the Dirichlet function D=1QD = \mathbf{1}_{\mathbb{Q}} in Section 1? Because Riemann slices the input axis (xx-axis) into narrow intervals [xi−1,xi][x_{i-1}, x_i] and expects f(x)f(x) to stay roughly flat inside each interval. When a function jumps wildly between 00 and 11 inside every interval, xx-axis slicing fails.

Henri Lebesgue reversed the geometry: slice the output axis (yy-axis) into horizontal height levels, collect all inputs ω\omega where f(ω)f(\omega) hits a given height aia_i, and multiply that height by the measure μ\mu of that input set.

IntuitionLebesgue’s Coin-Counting Analogy

Imagine counting a pile of coins scattered across a table:

  • The Riemann way (xx-axis slicing): Walk across the table from left to right, picking up coins in the exact spatial order you encounter them: 5¢+25¢+1¢+10¢+…5\text{¢} + 25\text{¢} + 1\text{¢} + 10\text{¢} + \dots If the denominations are mixed fractally, you get lost.
  • The Lebesgue way (yy-axis slicing): Group the coins by value (output height) first: count how many pennies you have in total, how many nickels, how many quarters, and compute: 1¢×μ(pennies)+5¢×μ(nickels)+25¢×μ(quarters)1\text{¢} \times \mu(\text{pennies}) + 5\text{¢} \times \mu(\text{nickels}) + 25\text{¢} \times \mu(\text{quarters}) Because our measure μ\mu can measure scattered sets (like Q\mathbb{Q}), grouping by output height doesn’t care how wildly the inputs are mixed!

We build the Lebesgue integral ∫Ωf dμ\int_\Omega f\,d\mu in three progressive stages:

Stage 1: Simple functions (finitely many output heights)

A simple function φ:Ω→[0,∞)\varphi : \Omega \rightarrow [0, \infty) is a measurable function that takes only finitely many non-negative values a1,…,aka_1, \dots, a_k:

φ(ω)=∑i=1kai 1Ai(ω)where Ai={ω:φ(ω)=ai}∈F\varphi(\omega) = \sum_{i=1}^k a_i\,\mathbf{1}_{A_i}(\omega) \qquad \text{where } A_i = \{\omega : \varphi(\omega) = a_i\} \in \mathcal{F}

Its Lebesgue integral is simply height ×\times measure of the level set:

FormulaIntegral of a Simple Function

∫Ωφ dμ=∑i=1kai μ(Ai)\int_\Omega \varphi\,d\mu = \sum_{i=1}^k a_i\,\mu(A_i) (Convention: 0⋅∞=00 \cdot \infty = 0, so a height of 00 over an infinitely wide domain contributes 00 area.)

Immediate Payoff (Solving Problem 2 from §1): The Dirichlet function D=1⋅1Q+0⋅1QcD = 1 \cdot \mathbf{1}_{\mathbb{Q}} + 0 \cdot \mathbf{1}_{\mathbb{Q}^c} is already a simple function! On [0,1][0,1], its Lebesgue integral is:

∫[0,1]D dλ=1⋅λ(Q∩[0,1])+0⋅λ(Qc∩[0,1])=1⋅0+0⋅1=0\int_{[0,1]} D\,d\lambda = 1 \cdot \lambda(\mathbb{Q} \cap [0,1]) + 0 \cdot \lambda(\mathbb{Q}^c \cap [0,1]) = 1 \cdot 0 + 0 \cdot 1 = 0

Stage 2: Non-negative measurable functions (f≥0f \ge 0)

For any measurable function f:Ω→[0,∞]f : \Omega \rightarrow [0, \infty], we approximate it from below using simple “staircase” functions φ\varphi that sit underneath ff (0≤φ≤f0 \le \varphi \le f), and take the supremum:

FormulaIntegral of a Non-negative Measurable Function

∫Ωf dμ=sup⁡{∫Ωφ dμ  :  φ is simple and 0≤φ≤f}\int_\Omega f\,d\mu = \sup \left\{ \int_\Omega \varphi\,d\mu \;:\; \varphi \text{ is simple and } 0 \le \varphi \le f \right\}

y (Output sliced into 2⁻ⁿ steps)
n ┼─────────────────────────────────── <- Cap at height n
│ ╭───╮
k/2ⁿ┼..........╭───╯...╰───╮............ <- Slice height aₖ = k·2⁻ⁿ
│ │███████│ │
┼──────────┴───────┴───┴────────────> ω (Input space Ω)
└───┬───┘
Measurable set Aₖ = { k·2⁻ⁿ ≤ f < (k+1)·2⁻ⁿ } ∈ ℱ

Specifically, we can always construct an explicit sequence of simple functions φn↑f\varphi_n \uparrow f by slicing the yy-axis into a grid of spacing 1/2n1/2^n (up to height nn) and rounding f(ω)f(\omega) down to the nearest grid line. Because ff is measurable, each horizontal slice Ak={ω:k2−n≤f(ω)<(k+1)2−n}A_k = \{\omega : k 2^{-n} \le f(\omega) < (k+1) 2^{-n}\} is guaranteed to be a measurable set in F\mathcal{F}!

Stage 3: General signed functions (f:Ω→Rf : \Omega \rightarrow \mathbb{R})

To handle functions that dip below the axis, split ff into its positive part f+(ω)=max⁡(f(ω),0)≥0f^+(\omega) = \max(f(\omega), 0) \ge 0 and negative part f−(ω)=max⁡(−f(ω),0)≥0f^-(\omega) = \max(-f(\omega), 0) \ge 0, so that f=f+−f−f = f^+ - f^- and ∣f∣=f++f−|f| = f^+ + f^-.

FormulaGeneral Lebesgue Integral & Integrability (L1L^1)

∫Ωf dμ=∫Ωf+ dμ−∫Ωf− dμ\int_\Omega f\,d\mu = \int_\Omega f^+\,d\mu - \int_\Omega f^-\,d\mu We say ff is Lebesgue integrable (written f∈L1(μ)f \in L^1(\mu)) if the total absolute area is finite: ∫Ω∣f∣ dμ=∫Ωf+ dμ+∫Ωf− dμ<∞\int_\Omega |f|\,d\mu = \int_\Omega f^+\,d\mu + \int_\Omega f^-\,d\mu < \infty (Requiring both ∫f+\int f^+ and ∫f−\int f^- to be finite avoids the undefined cancellation ∞−∞\infty - \infty.)

Key properties of the Lebesgue integral

  • Extends Riemann: Every bounded Riemann-integrable function on [a,b][a,b] is Lebesgue integrable and gives the exact same number.
  • Blind to Null Sets: Changing f(ω)f(\omega) on a set of measure 00 does not change ∫Ωf dμ\int_\Omega f\,d\mu at all (because a simple function step over a set of measure 00 adds ai⋅0=0a_i \cdot 0 = 0). Furthermore, if f≥0f \ge 0 and ∫Ωf dμ=0\int_\Omega f\,d\mu = 0, then f=0f = 0 almost everywhere.
  • Probability Expectation: When (Ω,F,P)(\Omega, \mathcal{F}, P) is a probability space, the Lebesgue integral of a random variable XX is its expected value: E[X]=∫ΩX dP\mathbb{E}[X] = \int_\Omega X\,dP.

Convergence theorems: when can we swap lim⁡\lim and ∫\int?

Motivation: We now return to Problem 3 from Section 1: given a sequence of measurable functions fn(ω)→f(ω)f_n(\omega) \to f(\omega) pointwise, when can we guarantee that the limit of the integrals equals the integral of the limit?

lim⁡n→∞∫Ωfn dμ=?∫Ω(lim⁡n→∞fn)dμ\lim_{n \to \infty} \int_\Omega f_n\,d\mu \stackrel{?}{=} \int_\Omega \left(\lim_{n \to \infty} f_n\right) d\mu

Even with the Lebesgue integral, you cannot always swap lim⁡\lim and ∫\int, because “area (mass) can escape to infinity” before the limit finishes! There are two classic ways area escapes while fn(x)→0f_n(x) \to 0 at every point xx:

Failure ModeFormula (fn→0f_n \to 0 pointwise)Visual BehaviorWhy Swap Fails
1. Escape Horizontally (Moving Bump)fn(x)=1[n, n+1](x)f_n(x) = \mathbf{1}_{[n,\, n+1]}(x) on R\mathbb{R}A box of height 11 and width 11 slides off to +∞+\infty. At any fixed xx, the box eventually passes by, so fn(x)→0f_n(x) \to 0.∫fn=1\int f_n = 1 for all nn, so lim⁡∫fn=1≠∫0=0\lim \int f_n = 1 \neq \int 0 = 0.
2. Escape Vertically (Witch’s Hat Spike)fn(x)=n 1(0, 1/n)(x)f_n(x) = n\,\mathbf{1}_{(0,\, 1/n)}(x) on [0,1][0,1]A rectangle of height nn and width 1/n1/n squeezes against 00. At x=0x=0, fn(0)=0f_n(0)=0; for any x>0x > 0, 1/n<x1/n < x eventually, so fn(x)→0f_n(x) \to 0.∫fn=n⋅1n=1\int f_n = n \cdot \frac{1}{n} = 1 for all nn, so lim⁡∫fn=1≠∫0=0\lim \int f_n = 1 \neq \int 0 = 0.

Measure theory provides three master theorems that tell us exactly what happens to the area under a limit:

1. Monotone Convergence Theorem (MCT): upward growth never loses mass

If the functions only ever grow upward (0≤f1≤f2≤⋯0 \le f_1 \le f_2 \le \cdots), mass cannot slide away or disappear, new area is only ever stacked on top of old area.

TheoremMonotone Convergence Theorem (MCT)

If 0≤f1≤f2≤⋯0 \le f_1 \le f_2 \le \cdots are measurable and fn(ω)↑f(ω)f_n(\omega) \uparrow f(\omega) pointwise (or a.e.), then: lim⁡n→∞∫Ωfn dμ=∫Ωf dμ(even if both sides are +∞)\lim_{n \to \infty} \int_\Omega f_n\,d\mu = \int_\Omega f\,d\mu \quad (\text{even if both sides are } +\infty)

Payoffs:

  1. Solves Problem 3 from §1: For fn=1{q1,…,qn}↑D=1Qf_n = \mathbf{1}_{\{q_1, \dots, q_n\}} \uparrow D = \mathbf{1}_{\mathbb{Q}}, MCT guarantees ∫D dλ=lim⁡n→∞∫fn dλ=lim⁡0=0\int D\,d\lambda = \lim_{n \to \infty} \int f_n\,d\lambda = \lim 0 = 0.
  2. Infinite Series Swap: Because partial sums of non-negative functions gk≥0g_k \ge 0 always increase monotonically, you can always swap an integral and an infinite sum of non-negative terms: ∫Ω(∑k=1∞gk)dμ=∑k=1∞∫Ωgk dμ\int_\Omega \left(\sum_{k=1}^\infty g_k\right) d\mu = \sum_{k=1}^\infty \int_\Omega g_k\,d\mu

2. Fatou’s Lemma: mass can escape in the limit, but can never be created out of nothing

What if fn≥0f_n \ge 0 does not increase monotonically (like the Moving Bump or Witch’s Hat)? Then mass might escape on the way to the limit, making the integral of the limit smaller than the limit of the integrals. Can mass ever spontaneously appear in the limit? No.

(Recall lim inf⁡n→∞an=lim⁡n→∞(inf⁡k≥nak)\liminf_{n\to\infty} a_n = \lim_{n\to\infty} (\inf_{k \ge n} a_k) is the “eventual floor” of a sequence, which always exists even if ana_n oscillates.)

TheoremFatou’s Lemma

For any sequence of non-negative measurable functions fn≥0f_n \ge 0: ∫Ω(lim inf⁡n→∞fn)dμ  ≤  lim inf⁡n→∞∫Ωfn dμ\int_\Omega \left(\liminf_{n \to \infty} f_n\right) d\mu \;\le\; \liminf_{n \to \infty} \int_\Omega f_n\,d\mu (In both the Moving Bump and Witch’s Hat examples, the left side is 00 and the right side is 11, showing why the inequality ≤\le can be strict when mass escapes.)

Proof3-line proof of Fatou’s Lemma from MCT

Define the running floor gn(ω)=inf⁡k≥nfk(ω)g_n(\omega) = \inf_{k \ge n} f_k(\omega). As nn grows, we drop terms from the infimum, so 0≤g1≤g2≤⋯0 \le g_1 \le g_2 \le \cdots increases monotonically to lim inf⁡nfn\liminf_n f_n.

  1. For every k≥nk \ge n, we have gn≤fkg_n \le f_k, so ∫gn≤∫fk\int g_n \le \int f_k. Taking the infimum over k≥nk \ge n gives ∫gn≤inf⁡k≥n∫fk\int g_n \le \inf_{k \ge n} \int f_k.
  2. Take lim⁡n→∞\lim_{n \to \infty} on both sides and apply MCT to the left side (∫gn↑∫lim inf⁡fn\int g_n \uparrow \int \liminf f_n) to get ∫(lim inf⁡fn)≤lim inf⁡∫fn\int (\liminf f_n) \le \liminf \int f_n. ■\blacksquare

∎

3. Dominated Convergence Theorem (DCT): trapping functions under a finite roof

How do we prevent both horizontal escape and vertical spikes when fnf_n can oscillate up and down? Trap the entire sequence ∣fn∣|f_n| underneath a single integrable roof function gg with finite total area (∫Ωg dμ<∞\int_\Omega g\,d\mu < \infty).

  • Because ∫g<∞\int g < \infty, the roof must taper down to zero at ±∞\pm\infty (blocking horizontal escape).
  • Because ∫g<∞\int g < \infty, the roof cannot enclose an infinite-area vertical spike (blocking vertical escape; for the Witch’s Hat n1(0,1/n)n\mathbf{1}_{(0,1/n)}, the lowest roof covering all spikes is g(x)=1/xg(x) = 1/x, which has ∫011x dx=∞\int_0^1 \frac{1}{x}\,dx = \infty, so DCT rightly refuses to apply!).

TheoremDominated Convergence Theorem (DCT)

If fn(ω)→f(ω)f_n(\omega) \to f(\omega) pointwise (or a.e.) and there exists an integrable roof g∈L1(μ)g \in L^1(\mu) (∫Ωg dμ<∞\int_\Omega g\,d\mu < \infty) such that ∣fn(ω)∣≤g(ω)|f_n(\omega)| \le g(\omega) for all nn, then: lim⁡n→∞∫Ωfn dμ=∫Ωf dμandlim⁡n→∞∫Ω∣fn−f∣ dμ=0\lim_{n \to \infty} \int_\Omega f_n\,d\mu = \int_\Omega f\,d\mu \qquad \text{and} \qquad \lim_{n \to \infty} \int_\Omega |f_n - f|\,d\mu = 0

Probability Corollary (Bounded Convergence): On a probability space (μ(Ω)=1\mu(\Omega) = 1), any constant roof g(ω)=Cg(\omega) = C has finite integral ∫ΩC dP=C<∞\int_\Omega C\,dP = C < \infty. Thus, if ∣Xn∣≤C|X_n| \le C and Xn→XX_n \to X a.s., then E[Xn]→E[X]\mathbb{E}[X_n] \to \mathbb{E}[X] automatically!


LpL^p spaces: geometry and completeness of functions

Motivation: In probability and statistics, we constantly measure the “distance” between two random variables XX and YY, for instance, measuring the mean-squared error E[∣Xn−X∣2]\mathbb{E}[|X_n - X|^2] of an estimator XnX_n. The Lebesgue integral lets us organize functions into geometric spaces based on their pp-th power average size.

ComponentDetail
pp-norm (1≤p<∞1 \le p < \infty)$|f|p = \left(\int\Omega
∞\infty-norm (p=∞p = \infty)$|f|_\infty = \inf{M \ge 0 :
Space Lp(μ)L^p(\mu)The space of all measurable functions with ∥f∥p<∞\|f\|_p < \infty, where two functions equal a.e. (f=gf = g a.e.) are treated as the exact same point.

WarningWhy we must glue together functions that are equal a.e.

A genuine geometric distance requires that dist(f,g)=∥f−g∥p=0  ⟺  f and g are the same object\text{dist}(f, g) = \|f - g\|_p = 0 \iff f \text{ and } g \text{ are the same object}. Because the Lebesgue integral is blind to null sets, the Dirichlet function D=1QD = \mathbf{1}_{\mathbb{Q}} and the zero function 00 have distance ∥D−0∥p=0\|D - 0\|_p = 0. By defining elements of LpL^p to be equivalence classes of functions that agree almost everywhere, ∥f−g∥p=0\|f - g\|_p = 0 genuinely means f=gf = g in LpL^p.

Two foundational inequalities and completeness

  1. Hölder’s Inequality (1p+1q=1\frac{1}{p} + \frac{1}{q} = 1): ∫Ω∣fg∣ dμ≤∥f∥p ∥g∥q\int_\Omega |f g|\,d\mu \le \|f\|_p\,\|g\|_q.
    • For p=q=2p = q = 2, this is the Cauchy–Schwarz Inequality E[∣XY∣]≤E[X2] E[Y2]\mathbb{E}[|XY|] \le \sqrt{\mathbb{E}[X^2]\,\mathbb{E}[Y^2]}, which guarantees that correlation always lies in [−1,1][-1, 1] and turns L2(P)L^2(P) into a Hilbert space with dot product ⟨X,Y⟩=E[XY]\langle X, Y \rangle = \mathbb{E}[XY] (where conditional expectation E[X∣G]\mathbb{E}[X \mid \mathcal{G}] is simply an orthogonal projection!).
    • On a probability space (P(Ω)=1P(\Omega) = 1), applying Hölder with g=1g = 1 proves that higher norms dominate lower norms: ∥X∥p≤∥X∥q\|X\|_p \le \|X\|_q for p≤qp \le q, meaning Lq(P)⊆Lp(P)L^q(P) \subseteq L^p(P) (e.g., finite variance X∈L2(P)X \in L^2(P) automatically implies finite mean X∈L1(P)X \in L^1(P)).
  2. Minkowski’s Inequality (p≥1p \ge 1): ∥f+g∥p≤∥f∥p+∥g∥p\|f + g\|_p \le \|f\|_p + \|g\|_p (the Triangle Inequality, proving ∥f−g∥p\|f - g\|_p is a valid metric distance).
  3. Completeness (The Riesz–Fischer Theorem): Every Cauchy sequence in Lp(μ)L^p(\mu) converges to a limit function inside Lp(μ)L^p(\mu).

IntuitionCompleteness: Riemann is to LpL^p as the Rationals Q\mathbb{Q} are to R\mathbb{R}

The rational numbers Q\mathbb{Q} are full of “pinholes”: the sequence 1,1.4,1.41,1.414,…1, 1.4, 1.41, 1.414, \dots gets closer and closer together (a Cauchy sequence), but its limit 2\sqrt{2} falls into a hole outside Q\mathbb{Q}. Completing Q\mathbb{Q} by filling in every limit hole gives the real numbers R\mathbb{R}.

In the exact same way, the space of Riemann-integrable functions is full of holes under the ∥f−g∥p\|f - g\|_p distance, sequences of smooth functions can converge in norm to a limit with a vertical asymptote or fractal discontinuities that Riemann cannot integrate. The Riesz–Fischer theorem says Lp(μ)L^p(\mu) has zero holes: every sequence of functions in LpL^p that gets progressively closer together in ∥⋅∥p\|\cdot\|_p distance is guaranteed to converge to a valid measurable function inside LpL^p.


Translation Dictionary & Summary

Measure Theory ConceptProbability MeaningRole in the Architecture
Sample space Ω\OmegaSet of all physical outcomes ω\omegaThe underlying universe before numbers are assigned.
σ\sigma-algebra F\mathcal{F}Allowed events / observer’s informationExcludes Vitali sets so countable additivity never contradicts geometry.
Borel σ\sigma-algebra B(R)\mathcal{B}(\mathbb{R})σ({(a,b)})\sigma(\{(a,b)\}) on the real lineContains intervals, points, Q\mathbb{Q}, and all limits, while locking out VV.
Measure μ\mu (with μ(Ω)=1\mu(\Omega)=1)Probability measure PPCountably additive size function; gives P(An)→P(A)P(A_n) \to P(A) on nested events.
Null set (μ(N)=0\mu(N)=0) & a.e.Probability-00 event & almost surely (a.s.)Allows sets like Q\mathbb{Q} to be non-empty yet carry zero weight.
Carathéodory extensionA CDF F(x)F(x) uniquely defines a distributionExtends interval lengths F(b)−F(a)F(b)-F(a) via outer shrink-wrapping λ∗\lambda^*.
Measurable map X:Ω→RX:\Omega\to\mathbb{R}Random variable XXGuarantees {X∈B}∈F\{X \in B\} \in \mathcal{F} for every Borel set B∈B(R)B \in \mathcal{B}(\mathbb{R}).
Lebesgue integral ∫ΩX dP\int_\Omega X\,dPExpected value E[X]\mathbb{E}[X]Slices the yy-axis into simple staircases so jagged functions integrate cleanly.
MCT / Fatou / DCTRules for lim⁡E[Xn]=E[lim⁡Xn]\lim \mathbb{E}[X_n] = \mathbb{E}[\lim X_n]Prevents probability mass from escaping to ∞\infty during a limit.
L1(P)L^1(P) and L2(P)L^2(P)Finite mean (E[∣X∣]<∞\mathbb{E}[\lvert X\rvert]<\infty) & finite varianceComplete geometric spaces where L2L^2 dot products represent covariance.

← All notes