The Lebesgue Integral

Three pages of setup, and this is the payoff. We have σ-algebras (the sets we're allowed to ask about), measurable functions, simple functions that approximate everything from below, and measures that hand every measurable set a size. Put them together and the integral almost writes itself.

Slicing the Range

On the σ-Algebras page, the function that is $1$ on the rationals and $0$ on the irrationals broke Riemann sums: every strip had an upper sum of $1$ and a lower sum of $0$, forever. The fix was to stop chopping up the $x$-axis and start measuring sets.

Here's the idea in one picture. Riemann cuts the domain into strips and asks, in each strip, how tall is $f$? Lebesgue cuts the range into levels and asks, at each level $y$, how big is the set where $f$ is above $y$? That second question never cares how wild $f$ is from point to point. It only needs the size of a set.

Riemann chops the $x$-axis like a butcher. Lebesgue sorts the cash register by bill size.

Watch the orange pieces on the right. Low down, $\{f > y\}$ is one long interval; above the saddle it splits in two. Lebesgue doesn't care. Two intervals, a Cantor-like dust, the rationals: whatever the level set is, if it's measurable, it has a size, and the band over it is (height of the band) × (size of the set).

To draw pictures like this one, we need a measure on $\mathbb{R}$ that gives intervals their length. That measure gets built later in the course, so for now we borrow it.

On Lebesgue Measure, we construct a measure $m$ on the Borel sets $\mathcal{B}(\mathbb{R})$ with $m([a, b]) = b - a$ for every interval. Until then, this page uses that one fact in its examples and pictures. Every theorem here is proved for an arbitrary measure space, so nothing depends on the loan.

One consequence comes for free: a single point is an interval $[q, q]$, so $m(\{q\}) = 0$, and countable additivity gives $m(\mathbb{Q}) = \sum_{q} m(\{q\}) = 0$. Keep that in your pocket.

Integrating Simple Functions

From here on, $(X, \mathcal{M}, \mu)$ is a measure space. Start where there's no choice to make. A simple function takes finitely many values, each on a measurable set, so its integral has to be value times size, added up.

Let $s\colon X \to [0, \infty)$ be a simple measurable function with canonical form $s = \sum_{i=1}^{n} \alpha_i \chi_{A_i}$, and let $E \in \mathcal{M}$. The integral of $s$ over $E$ is $$\int_E s \, d\mu = \sum_{i=1}^{n} \alpha_i \, \mu(A_i \cap E),$$ with the convention $0 \cdot \infty = 0$. When $E = X$ we write $\int s \, d\mu$.

Simple functions are finite-valued (that's how the Simple Functions page defined them), so every $\alpha_i$ is a real number; only $\mu(A_i \cap E)$ can be $\infty$. That will matter in the proof of the big theorem below. And the convention $0 \cdot \infty = 0$ is not a trick: the zero function on a set of infinite measure has no area, so its integral had better be $0$.

$0 \cdot \infty = 0$. Somewhere a calculus teacher just felt a disturbance.

Here's the convention earning its keep on a three-point space.

Let $X = \{1, 2, 3\}$ with $\mathcal{P}(X)$ and point masses $\mu(\{1\}) = 2$, $\mu(\{2\}) = \infty$, $\mu(\{3\}) = \frac{1}{2}$. Integrate $s = (3, 0, 4)$ (listed by its values) over $X$ and over $E = \{2, 3\}$.


The canonical form is $s = 3\chi_{\{1\}} + 0 \cdot \chi_{\{2\}} + 4\chi_{\{3\}}$. Value times mass, added up: $$\int s \, d\mu = 3 \cdot 2 + 0 \cdot \infty + 4 \cdot \tfrac{1}{2} = 6 + 0 + 2 = 8.$$ Over $E$, only the points $2$ and $3$ count: $\int_E s \, d\mu = 0 \cdot \infty + 4 \cdot \frac{1}{2} = 2$. The point of infinite mass contributes nothing, because $s$ is $0$ there.

The animation below shows why the definition is so forgiving. Each value's set can be scattered all over the line; the integral only needs its total size.

The definition uses the canonical form, with distinct values and disjoint sets. In practice you'll meet sums like $2\chi_{[0, 3]} + 5\chi_{[1, 4]}$, where the sets overlap. The next proposition says you can integrate those term by term anyway, and it hands us the two rules every integral should obey.

Let $s, t\colon X \to [0, \infty)$ be simple measurable functions and $E \in \mathcal{M}$.

(a) If $s = \sum_{j=1}^{m} \beta_j \chi_{B_j}$ with $\beta_j \ge 0$ and $B_1, \ldots, B_m \in \mathcal{M}$ pairwise disjoint (values not necessarily distinct), then $\int_E s \, d\mu = \sum_{j} \beta_j \, \mu(B_j \cap E)$.

(b) $\int_E (s + t) \, d\mu = \int_E s \, d\mu + \int_E t \, d\mu$, and $\int_E c s \, d\mu = c \int_E s \, d\mu$ for $c \in [0, \infty)$.

(c) If $s \le t$, then $\int_E s \, d\mu \le \int_E t \, d\mu$.

Show proof

Proof. (a) Let $s = \sum_i \alpha_i \chi_{A_i}$ be the canonical form. Off $B_1 \cup \cdots \cup B_m$ the function is $0$, and on $B_j$ it equals $\beta_j$. So for each $i$, the set $A_i \cap E$ is the disjoint union of the sets $B_j \cap E$ with $\beta_j = \alpha_i$ (plus, when $\alpha_i = 0$, the part of $E$ outside every $B_j$). By finite additivity, $$\alpha_i \, \mu(A_i \cap E) = \sum_{j \,:\, \beta_j = \alpha_i} \beta_j \, \mu(B_j \cap E),$$ where both sides are $0$ when $\alpha_i = 0$. Every $j$ with $B_j \ne \emptyset$ has $\beta_j$ equal to exactly one $\alpha_i$, and a $j$ with $B_j = \emptyset$ contributes $\beta_j \cdot 0 = 0$. Summing over $i$ gives $\int_E s \, d\mu = \sum_j \beta_j \, \mu(B_j \cap E)$.

(b) Write $s = \sum_i \alpha_i \chi_{A_i}$ and $t = \sum_j \beta_j \chi_{B_j}$ in canonical form, and let $E_{ij} = A_i \cap B_j$. These sets are pairwise disjoint, $A_i$ is the disjoint union of the $E_{ij}$ over $j$, and $B_j$ is the disjoint union of the $E_{ij}$ over $i$. On $E_{ij}$, $s + t = \alpha_i + \beta_j$. By (a) and finite additivity, $$\int_E (s + t) \, d\mu = \sum_{i,j} (\alpha_i + \beta_j) \, \mu(E_{ij} \cap E) = \sum_i \alpha_i \sum_j \mu(E_{ij} \cap E) + \sum_j \beta_j \sum_i \mu(E_{ij} \cap E) = \int_E s \, d\mu + \int_E t \, d\mu.$$ (Splitting $(\alpha_i + \beta_j)\mu = \alpha_i \mu + \beta_j \mu$ is fine in $[0, \infty]$, including when $\mu = \infty$ and one coefficient is $0$.) For $c s$: if $c = 0$ both sides are $0$; if $c > 0$, then $c s = \sum_i c\alpha_i \chi_{A_i}$ and (a) gives $\sum_i c \alpha_i \, \mu(A_i \cap E) = c \int_E s \, d\mu$.

(c) With $E_{ij}$ as in (b), $s = \sum_{i,j} \alpha_i \chi_{E_{ij}}$ and $t = \sum_{i,j} \beta_j \chi_{E_{ij}}$. Whenever $E_{ij} \ne \emptyset$, a point of it shows $\alpha_i = s \le t = \beta_j$. By (a), $$\int_E s \, d\mu = \sum_{i,j} \alpha_i \, \mu(E_{ij} \cap E) \le \sum_{i,j} \beta_j \, \mu(E_{ij} \cap E) = \int_E t \, d\mu. \qquad \blacksquare$$

So $2\chi_{[0, 3]} + 5\chi_{[1, 4]}$ integrates to $2 \cdot 3 + 5 \cdot 3 = 21$ under $m$, even though on the overlap $[1, 3]$ the function is $7$. The overlap gets counted twice, once in each term, and that's exactly right, because the function really is $2 + 5$ there. Now the example Riemann couldn't do.

Compute $\int_{[0, 1]} \chi_{\mathbb{Q}} \, dm$ and $\int_{[0, 1]} \chi_{\mathbb{R} \setminus \mathbb{Q}} \, dm$.


$\chi_{\mathbb{Q}}$ is simple: value $1$ on $\mathbb{Q}$ and $0$ off it. So $$\int_{[0, 1]} \chi_{\mathbb{Q}} \, dm = 1 \cdot m(\mathbb{Q} \cap [0, 1]) + 0 \cdot m([0, 1] \setminus \mathbb{Q}) = 1 \cdot 0 + 0 = 0,$$ since $\mathbb{Q} \cap [0, 1]$ is countable. Likewise $\int_{[0, 1]} \chi_{\mathbb{R} \setminus \mathbb{Q}} \, dm = m([0, 1] \setminus \mathbb{Q}) = m([0, 1]) - m(\mathbb{Q} \cap [0, 1]) = 1 - 0 = 1$ (subtracting is allowed because $m(\mathbb{Q} \cap [0, 1])$ is finite). The function that broke Riemann integrates to exactly what it "should": $0$.

Your turn. Some versions have an infinite mass hiding in them, and some have overlapping sets.

Loading practice engine...

The Integral of a Nonnegative Function

Now any measurable $f \ge 0$. We know how to integrate everything that fits under it, as long as it's simple. So squeeze simple functions underneath $f$ and take the best you can do.

Let $f\colon X \to [0, \infty]$ be measurable and $E \in \mathcal{M}$. The Lebesgue integral of $f$ over $E$ is $$\int_E f \, d\mu = \sup \left\{ \int_E s \, d\mu \;:\; s \text{ simple, measurable, } 0 \le s \le f \right\}.$$

Two quick checks. If $f$ is itself simple, the two definitions agree: $s = f$ is allowed in the sup, and by part (c) of the proposition no $s \le f$ does better. And the sup always exists in $[0, \infty]$, so every measurable $f \ge 0$ has an integral, possibly $\infty$. No "integrable or not" drama yet; that comes with functions of both signs.

The Simple Approximation theorem built staircases $s_n = \varphi_n \circ f$ that climb up to any measurable $f \ge 0$ from below. So the sup in the definition is never empty-handed: there are simple functions as close to $f$ as we like.

The picture is the one from the top of the page, with you in charge. Pick a function, and slide the number of levels. The sum below is exactly $\int s \, dm$ for the simple function made of those bands.

Lebesgue Sum

Equal levels are the lazy choice. The sup in the definition ranges over every simple function under $f$, so you're allowed to put the cuts wherever they help most. Try it.

Pick the Levels

A cut is worth (the gap below it) × (the size of the set above it), so cuts pay off where level sets are wide. A cut above the top of $f$ sits over an empty set and buys nothing. With the definition in hand, the basic rules follow straight from it.

Let $f, g\colon X \to [0, \infty]$ be measurable and $E \in \mathcal{M}$.

(a) If $f \le g$, then $\int_E f \, d\mu \le \int_E g \, d\mu$.

(b) If $A, B \in \mathcal{M}$ and $A \subseteq B$, then $\int_A f \, d\mu \le \int_B f \, d\mu$.

(c) $\int_E c f \, d\mu = c \int_E f \, d\mu$ for every $c \in [0, \infty)$.

(d) If $f = 0$ on $E$, or if $\mu(E) = 0$, then $\int_E f \, d\mu = 0$.

(e) $\int_E f \, d\mu = \int_X f \chi_E \, d\mu$.

Show proof

Proof. (a) Every simple $s$ with $0 \le s \le f$ also has $s \le g$, so the sup defining $\int_E g \, d\mu$ is over a bigger collection.

(b) is the exercise below.

(c) If $c = 0$, then $cf = 0$ and both sides are $0$ (using $0 \cdot \infty = 0$ when $\int_E f \, d\mu = \infty$). If $c > 0$, then $0 \le s \le f$ exactly when $0 \le cs \le cf$, and $\int_E cs \, d\mu = c \int_E s \, d\mu$ by the proposition. So the two sups are over the same collection, scaled by $c$.

(d) Let $0 \le s \le f$ be simple, $s = \sum \alpha_i \chi_{A_i}$. If $f = 0$ on $E$, then $s = 0$ on $E$, so every $i$ has $\alpha_i = 0$ or $A_i \cap E = \emptyset$, and every term $\alpha_i \, \mu(A_i \cap E)$ is $0$. If $\mu(E) = 0$, then $\mu(A_i \cap E) = 0$ for every $i$. Either way $\int_E s \, d\mu = 0$, so the sup is $0$.

(e) If $0 \le s \le f$ is simple, then $s \chi_E = \sum \alpha_i \chi_{A_i \cap E}$ is simple, $s\chi_E \le f \chi_E$, and by part (a) of the proposition $\int_X s\chi_E \, d\mu = \sum \alpha_i \, \mu(A_i \cap E) = \int_E s \, d\mu$. Taking the sup over $s$ gives $\int_E f \, d\mu \le \int_X f \chi_E \, d\mu$. Conversely, let $0 \le t \le f\chi_E$ be simple, $t = \sum \beta_j \chi_{B_j}$. Then $t = 0$ off $E$, so every $B_j$ with $\beta_j > 0$ lies inside $E$, and $\int_X t \, d\mu = \sum \beta_j \, \mu(B_j \cap E) = \int_E t \, d\mu \le \int_E f \, d\mu$, since $t \le f$. Taking the sup over $t$ gives the other inequality. $\blacksquare$

Part (e) is the workhorse: integrating over $E$ is the same as integrating over everything after switching $f$ off outside $E$. It turns every statement about $\int_X$ into one about $\int_E$ for free. Part (b) is quick once you see it.

Prove part (b): if $f\colon X \to [0, \infty]$ is measurable and $A \subseteq B$ in $\mathcal{M}$, then $\int_A f \, d\mu \le \int_B f \, d\mu$.

Show proof

Proof. Since $A \subseteq B$, we have $\chi_A \le \chi_B$, so $f \chi_A \le f \chi_B$ everywhere (both are measurable, as products of $f$ with indicators). By (e) and then (a), $$\int_A f \, d\mu = \int_X f \chi_A \, d\mu \le \int_X f \chi_B \, d\mu = \int_B f \, d\mu. \qquad \blacksquare$$

The integral of a function that isn't simple, from scratch, takes a sup over infinitely many simple functions. Sometimes the sup is easy to see. Point masses are the cleanest case.

Let $\delta_{x_0}$ be the Dirac measure at $x_0$ on $(X, \mathcal{M})$, and let $f\colon X \to [0, \infty]$ be measurable. Show that $\int f \, d\delta_{x_0} = f(x_0)$.


For a simple $s = \sum \alpha_i \chi_{A_i}$, exactly one $A_i$ contains $x_0$, so $\int s \, d\delta_{x_0} = \sum \alpha_i \, \delta_{x_0}(A_i) = s(x_0)$. If $0 \le s \le f$, that's at most $f(x_0)$, so $\int f \, d\delta_{x_0} \le f(x_0)$.

For the other direction, the staircases $s_n = \varphi_n \circ f$ are simple, sit under $f$, and $s_n(x_0) \to f(x_0)$. So the sup is at least $\sup_n s_n(x_0) = f(x_0)$. Integrating against a point mass just evaluates.

One more fact before the big theorem. For a fixed simple function, the integral over $E$ is itself a measure in $E$. That's the engine inside the next proof.

Let $s\colon X \to [0, \infty)$ be simple and measurable. Then $\nu(E) = \int_E s \, d\mu$ defines a positive measure $\nu$ on $\mathcal{M}$.

Show proof

Proof. Write $s = \sum_{i=1}^{n} \alpha_i \chi_{A_i}$. First, $\nu(\emptyset) = \sum \alpha_i \, \mu(\emptyset) = 0 < \infty$. Let $E$ be the disjoint union of $E_1, E_2, \ldots \in \mathcal{M}$. For each $i$, the sets $A_i \cap E_k$ are disjoint with union $A_i \cap E$, so by countable additivity of $\mu$, $$\nu(E) = \sum_{i=1}^{n} \alpha_i \sum_{k=1}^{\infty} \mu(A_i \cap E_k) = \sum_{k=1}^{\infty} \sum_{i=1}^{n} \alpha_i \, \mu(A_i \cap E_k) = \sum_{k=1}^{\infty} \nu(E_k).$$ Moving the constant $\alpha_i$ inside the series and swapping a finite sum with a series are both fine for terms in $[0, \infty]$. $\blacksquare$

A measure is continuous from below. So if sets $E_n$ grow to $X$, then $\int_{E_n} s \, d\mu$ climbs to $\int_X s \, d\mu$. Remember that sentence; it's half of the next proof.

Monotone Convergence

Here's the theorem the whole construction was built for. Riemann's integral is notoriously touchy about limits: you need uniform convergence, or a lot of care, before $\lim \int f_n = \int \lim f_n$. Lebesgue's integral needs one thing, that the functions climb.

Continuity from below said: if $A_1 \subseteq A_2 \subseteq \cdots$, then $\mu\left(\bigcup A_n\right) = \lim \mu(A_n)$, with no finiteness condition at all. Monotone Convergence is that statement, upgraded from sets to functions.

Let $f_n\colon X \to [0, \infty]$ be measurable with $0 \le f_1 \le f_2 \le \cdots$, and let $f_n(x) \to f(x)$ for every $x \in X$. Then $f$ is measurable and $$\lim_{n \to \infty} \int_X f_n \, d\mu = \int_X f \, d\mu.$$

Show proof

Proof. $f = \sup_n f_n$ is measurable, since sups of measurable functions are. By part (a) of the properties, $\int f_n \, d\mu \le \int f_{n+1} \, d\mu$, so $L = \lim \int f_n \, d\mu$ exists in $[0, \infty]$. Since $f_n \le f$, also $\int f_n \, d\mu \le \int f \, d\mu$, so $L \le \int f \, d\mu$.

For the other inequality, fix a simple $s = \sum_i \alpha_i \chi_{A_i}$ with $0 \le s \le f$ and a number $c \in (0, 1)$. Let $$E_n = \{x : f_n(x) \ge c \, s(x)\} = \bigcup_i \big(A_i \cap \{f_n \ge c\alpha_i\}\big),$$ which is measurable. Since the $f_n$ increase, $E_1 \subseteq E_2 \subseteq \cdots$. Every point is in some $E_n$: if $s(x) = 0$, then $x \in E_1$. If $s(x) > 0$, then $c\,s(x) < s(x) \le f(x)$, because $s(x)$ is a finite positive number and $c < 1$; since $f_n(x) \to f(x)$, eventually $f_n(x) > c \, s(x)$. So $\bigcup E_n = X$.

Now $f_n \chi_{E_n} \ge c \, s \chi_{E_n}$ everywhere, so by the properties (b), (e), (a), (c), $$\int_X f_n \, d\mu \ge \int_{E_n} f_n \, d\mu \ge c \int_{E_n} s \, d\mu.$$ By the lemma, $E \mapsto \int_E s \, d\mu$ is a measure, so continuity from below gives $\int_{E_n} s \, d\mu \to \int_X s \, d\mu$. Letting $n \to \infty$: $L \ge c \int_X s \, d\mu$. This holds for every simple $s \le f$, so $L \ge c \int_X f \, d\mu$, and then for every $c < 1$, so $L \ge \int_X f \, d\mu$. $\blacksquare$

Monotone Convergence: the one time you swap a limit and an integral and nobody yells at you.

The heart of the proof is the sets $E_n$. Here they are, growing.

Why shrink $s$ to $c \, s$ at all? Because $s$ is allowed to touch $f$, and $f_n$ might stay strictly below $f$ forever. At such a point $f_n \ge s$ never happens. Shrinking by $c$ leaves a gap that $f_n$ is guaranteed to cross. This is also where simple functions being finite-valued matters: if $s(x) = \infty = f(x)$ while every $f_n(x)$ is finite, then $c \cdot s(x) = \infty$ and the gap is gone. See the trouble for yourself.

Why c < 1

Every $c < 1$ works eventually, it just takes a larger $n$ as $c$ creeps toward $1$. At $c = 1$ the flat stretch where $s$ touches $f$ never gets in. That's the whole reason for the $c$. The theorem has one hypothesis besides measurability, and it is not decoration.

Monotone Convergence needs the sequence to increase. Decreasing is not enough: $f_n = \chi_{[n, \infty)}$ decreases to $0$ everywhere, but $\int f_n \, dm = \infty$ for every $n$, so $\lim \int f_n \, dm = \infty \ne 0 = \int 0 \, dm$. The fix for decreasing sequences (start from a finite integral) is on the Integrable Functions page.

Now we can finally compute an integral of something that isn't simple, straight from the definition.

Let $f(x) = x$ on $[0, 1]$ and $f = 0$ elsewhere. Compute $\int f \, dm$.


Use the staircases $s_n = \varphi_n \circ f$, which increase to $f$. For $n \ge 1$ and $x \in [0, 1)$, $s_n(x) = \lfloor 2^n x \rfloor / 2^n$, which equals $k/2^n$ on $[k/2^n, (k+1)/2^n)$ for $k = 0, 1, \ldots, 2^n - 1$. (The single point $x = 1$ has measure $0$, and $s_n = 0$ off $[0, 1]$.) With $N = 2^n$, $$\int s_n \, dm = \sum_{k=0}^{N-1} \frac{k}{N} \cdot \frac{1}{N} = \frac{1}{N^2} \cdot \frac{(N - 1)N}{2} = \frac{N - 1}{2N}.$$ As $n \to \infty$, $N \to \infty$ and this tends to $\frac{1}{2}$. By Monotone Convergence, $\int f \, dm = \frac{1}{2}$, the area of the triangle, as it should be.

That's the pattern for every computation from here on: find simple functions that climb to $f$, integrate them, take the limit. Practice it.

Loading practice engine...

Additivity and Series

Notice what we haven't proved: that $\int (f + g) = \int f + \int g$. For simple functions it took a common refinement. For general $f$ and $g$, the sup in the definition makes it awkward to attack head on. Monotone Convergence makes it a two-liner.

Let $f, g\colon X \to [0, \infty]$ be measurable and $E \in \mathcal{M}$. Then $$\int_E (f + g) \, d\mu = \int_E f \, d\mu + \int_E g \, d\mu.$$

Show proof

Proof. By (e), it's enough to take $E = X$ (replace $f, g$ by $f\chi_E, g\chi_E$). By Simple Approximation, choose simple $s_n \uparrow f$ and $t_n \uparrow g$. Then $s_n + t_n$ is simple and $s_n + t_n \uparrow f + g$. Monotone Convergence (three times) and additivity for simple functions give $$\int (f + g) \, d\mu = \lim \int (s_n + t_n) \, d\mu = \lim \int s_n \, d\mu + \lim \int t_n \, d\mu = \int f \, d\mu + \int g \, d\mu. \qquad \blacksquare$$

Add one function at a time and take a limit, and additivity becomes countable.

Let $f_n\colon X \to [0, \infty]$ be measurable for each $n \in \mathbb{N}$, and $E \in \mathcal{M}$. Then $$\int_E \sum_{n=1}^{\infty} f_n \, d\mu = \sum_{n=1}^{\infty} \int_E f_n \, d\mu.$$

Show proof

Proof. Again take $E = X$ by (e). Let $g_N = f_1 + \cdots + f_N$. By the corollary and induction, $\int g_N \, d\mu = \sum_{n=1}^{N} \int f_n \, d\mu$. Since $f_n \ge 0$, we have $0 \le g_1 \le g_2 \le \cdots$ and $g_N \to \sum_n f_n$ at every point (the series of nonnegative terms always converges in $[0, \infty]$). Monotone Convergence gives $\int \sum_n f_n \, d\mu = \lim_N \int g_N \, d\mu = \sum_n \int f_n \, d\mu$. $\blacksquare$

No convergence hypothesis anywhere: for nonnegative terms, a sum and an integral always commute, and both sides may be $\infty$. Here's the most useful special case, which turns every series into an integral.

Let $\mu$ be counting measure on $\mathcal{P}(\mathbb{N})$ and $f\colon \mathbb{N} \to [0, \infty]$. Show that $\int f \, d\mu = \sum_{n=1}^{\infty} f(n)$. Then use it to show that for $a_{mn} \ge 0$, $\sum_m \sum_n a_{mn} = \sum_n \sum_m a_{mn}$.


At each point exactly one term of $\sum_n f(n) \chi_{\{n\}}$ is nonzero, so $f = \sum_n f(n)\chi_{\{n\}}$. Each term integrates to $f(n) \cdot \mu(\{n\}) = f(n)$ (if $f(n) = \infty$, the simple functions $k\chi_{\{n\}}$ under it integrate to $k \to \infty$). By the series corollary, $\int f \, d\mu = \sum_n f(n)$.

For the double sum, let $f_m(n) = a_{mn}$. Then $\int \sum_m f_m \, d\mu = \sum_n \sum_m a_{mn}$, while $\sum_m \int f_m \, d\mu = \sum_m \sum_n a_{mn}$. The series corollary says these are equal.

Here's what that looks like on an actual grid of numbers, where the row sums and column sums have nothing in common except their total.

Counting measure makes series a special case of integrals, so everything we prove about integrals is secretly a theorem about series too. Try a few.

Loading practice engine...

Additivity also settles a promise from the Measures page: the integral can't see null sets. Change a function on a set of measure zero and nothing happens to any of its integrals.

Let $f, g\colon X \to [0, \infty]$ be measurable with $f = g$ $\mu$-almost everywhere. Then $\int_E f \, d\mu = \int_E g \, d\mu$ for every $E \in \mathcal{M}$.

Show proof

Proof. Let $N$ be a null set with $f = g$ on $X \setminus N$. Then $f\chi_E = f\chi_{E \setminus N} + f\chi_{E \cap N}$, so by additivity and (e), $$\int_E f \, d\mu = \int_{E \setminus N} f \, d\mu + \int_{E \cap N} f \, d\mu = \int_{E \setminus N} f \, d\mu,$$ because $\mu(E \cap N) = 0$ and (d). The same computation works for $g$, and $f = g$ on $E \setminus N$, so $\int_{E \setminus N} f \, d\mu = \int_{E \setminus N} g \, d\mu$. $\blacksquare$

The converse direction is a nice exercise, and it comes out of one inequality that will follow you through the rest of the course.

Let $f\colon X \to [0, \infty]$ be measurable.

(a) Markov's inequality: for every $t \in (0, \infty)$, $\mu(\{f \ge t\}) \le \frac{1}{t} \int_X f \, d\mu$.

(b) If $\int_X f \, d\mu = 0$, then $f = 0$ $\mu$-a.e.

(c) If $\int_X f \, d\mu < \infty$, then $f < \infty$ $\mu$-a.e.

Show proof

Proof. (a) Let $A = \{f \ge t\}$, which is measurable. Then $t\chi_A \le f$ everywhere, so $t \, \mu(A) = \int t \chi_A \, d\mu \le \int f \, d\mu$. Divide by $t$.

(b) $\{f > 0\} = \bigcup_{k=1}^{\infty} \{f \ge 1/k\}$, and by (a) each of these has measure at most $k \cdot 0 = 0$. By countable subadditivity, $\mu(\{f > 0\}) = 0$.

(c) For every $t > 0$, $\{f = \infty\} \subseteq \{f \ge t\}$, so $\mu(\{f = \infty\}) \le \frac{1}{t} \int f \, d\mu$. The right side tends to $0$ as $t \to \infty$, because $\int f \, d\mu$ is finite. So $\mu(\{f = \infty\}) = 0$. $\blacksquare$

Fatou's Lemma

Monotone Convergence is great when the sequence climbs. Most sequences don't. What survives if we drop "increasing" and only keep $f_n \ge 0$? Watch a block of area $1$ slide away.

The integrals stay at $1$, and the limit function has integral $0$. So equality is hopeless. But notice which way it failed: the limit lost mass, it never gained any. That's the theorem.

Let $f_n\colon X \to [0, \infty]$ be measurable for each $n \in \mathbb{N}$. Then $$\int_X \Big(\liminf_{n \to \infty} f_n\Big) \, d\mu \le \liminf_{n \to \infty} \int_X f_n \, d\mu.$$

Show proof

Proof. Let $g_k = \inf\{f_n : n \ge k\}$. Each $g_k$ is measurable, $g_1 \le g_2 \le \cdots$ (an inf over fewer terms is larger), and $g_k \to \liminf_n f_n$ by the definition of the lower limit. For every $n \ge k$ we have $g_k \le f_n$, so $\int g_k \, d\mu \le \int f_n \, d\mu$, and therefore $$\int g_k \, d\mu \le \inf_{n \ge k} \int f_n \, d\mu.$$ By Monotone Convergence applied to the $g_k$, $$\int \liminf_n f_n \, d\mu = \lim_{k \to \infty} \int g_k \, d\mu \le \lim_{k \to \infty} \inf_{n \ge k} \int f_n \, d\mu = \liminf_{n \to \infty} \int f_n \, d\mu. \qquad \blacksquare$$

Fatou's Lemma: the integral can lose mass in the limit but never find any. Like socks in a dryer.

Notice the theorem uses $\liminf$ on both sides, so it applies to every sequence, convergent or not. The sliding block isn't the only way to lose mass. Here are four, driven by one slider.

Fatou's Gap

The block runs to infinity, the spike piles onto a single point, the spread flattens out, and the flip never settles down. The last one is worth working through on paper, in any measure space.

Let $E \in \mathcal{M}$, and put $f_n = \chi_E$ for odd $n$ and $f_n = 1 - \chi_E$ for even $n$. What is the relevance of this example to Fatou's Lemma?

Show answer

At a point $x \in E$ the values are $1, 0, 1, 0, \ldots$, and at $x \notin E$ they are $0, 1, 0, 1, \ldots$. Either way $\liminf_n f_n(x) = 0$, so the left side of Fatou is $\int 0 \, d\mu = 0$.

The integrals alternate between $\int \chi_E \, d\mu = \mu(E)$ and $\int (1 - \chi_E) \, d\mu = \mu(X \setminus E)$, so $$\liminf_n \int f_n \, d\mu = \min\{\mu(E), \mu(X \setminus E)\}.$$ So Fatou's inequality is strict whenever both $E$ and its complement have positive measure (for example $E = [0, 1]$ inside $X = [0, 2]$ with $m$: $0 < 1$), even though every $f_n$ is a bounded function on a finite measure space. Nothing escapes to infinity here; the mass just never settles. The example also shows the $\liminf$ on the right can't be replaced by $\limsup$ (that would be $\max\{\mu(E), \mu(X \setminus E)\}$), and that $\lim \int f_n$ need not exist at all.

Fatou was proved from Monotone Convergence. It's worth seeing that the road runs the other way too: Fatou plus one line gives Monotone Convergence back.

Use Fatou's Lemma to prove the Monotone Convergence Theorem.

Show proof

Proof. Let $0 \le f_1 \le f_2 \le \cdots$ be measurable with $f_n \to f$ pointwise; $f$ is measurable as a limit of measurable functions. Since the sequence converges, $\liminf_n f_n = f$, and Fatou gives $$\int f \, d\mu \le \liminf_n \int f_n \, d\mu.$$ On the other hand $f_n \le f$ for every $n$ (the $f_n$ increase to $f$), so $\int f_n \, d\mu \le \int f \, d\mu$ and $\limsup_n \int f_n \, d\mu \le \int f \, d\mu$. Together, $\limsup \int f_n \le \int f \le \liminf \int f_n$, so the limit exists and equals $\int f \, d\mu$. $\blacksquare$

(As a first proof of Monotone Convergence this would be circular, since our proof of Fatou used it. What it shows is that the two theorems are the same fact seen from two sides; a book that proves Fatou another way gets Monotone Convergence in one line.)

Before you compute, sort. For each sequence, decide whether the two sides of Fatou agree, differ, or whether Fatou has nothing to say.

Equality or Gap?

The negative cards matter: $f_n = -\chi_{[n, n+1]}$ has $\int f_n = -1$ and $\liminf f_n = 0$, and $0 \le -1$ is false. The hypothesis $f_n \ge 0$ is doing real work. Now put numbers on both sides.

Loading practice engine...

On the Integrable Functions page, Fatou does the heavy lifting in the Dominated Convergence Theorem: if $|f_n| \le g$ with $\int g \, d\mu < \infty$ and $f_n \to f$, then $\int f_n \, d\mu \to \int f \, d\mu$. A dominating $g$ is exactly what stops mass from escaping.

Measures From Densities

The lemma about simple functions said $E \mapsto \int_E s \, d\mu$ is a measure. Now that we have Monotone Convergence, the same is true for every measurable $f \ge 0$, and integrating against the new measure is just multiplying by $f$.

Let $f\colon X \to [0, \infty]$ be measurable, and define $\nu(E) = \int_E f \, d\mu$ for $E \in \mathcal{M}$. Then $\nu$ is a positive measure on $\mathcal{M}$, and for every measurable $g\colon X \to [0, \infty]$, $$\int_X g \, d\nu = \int_X g f \, d\mu.$$

Show proof

Proof. By (d), $\nu(\emptyset) = 0 < \infty$. Let $E$ be the disjoint union of $E_1, E_2, \ldots \in \mathcal{M}$. At each point at most one $\chi_{E_k}$ is $1$, so $f\chi_E = \sum_k f\chi_{E_k}$, and by (e) and the series corollary, $$\nu(E) = \int f\chi_E \, d\mu = \sum_k \int f\chi_{E_k} \, d\mu = \sum_k \nu(E_k).$$

For the formula, start with $g = \chi_E$: $\int \chi_E \, d\nu = \nu(E) = \int \chi_E f \, d\mu$. For a simple $g = \sum \alpha_i \chi_{A_i}$, linearity on both sides (the proposition for $\nu$; (c) and additivity for $\mu$) gives $$\int g \, d\nu = \sum \alpha_i \, \nu(A_i) = \sum \alpha_i \int \chi_{A_i} f \, d\mu = \int \Big(\sum \alpha_i \chi_{A_i}\Big) f \, d\mu = \int g f \, d\mu.$$ For general $g$, take simple $s_n \uparrow g$. Then $s_n f \uparrow g f$ (with $0 \cdot \infty = 0$: where $g(x) > 0$, eventually $s_n(x) > 0$). Each $s_n f$ is measurable, since $s_n f = \sum_i \alpha_i \chi_{A_i} f$, and $gf$ is measurable as their limit. Monotone Convergence on both sides: $$\int g \, d\nu = \lim \int s_n \, d\nu = \lim \int s_n f \, d\mu = \int g f \, d\mu. \qquad \blacksquare$$

This happens often enough to get its own notation.

Let $f\colon X \to [0, \infty]$ be measurable. If $\nu(E) = \int_E f \, d\mu$ for every $E \in \mathcal{M}$, then $f$ is a density of $\nu$ with respect to $\mu$, and we write $d\nu = f \, d\mu$.

The notation is built so the theorem reads like algebra: $\int g \, d\nu = \int g f \, d\mu$ is "substitute $d\nu = f \, d\mu$." You've already met a measure with a density without knowing it.

Let $\mu$ be counting measure on $\mathcal{P}(\mathbb{N})$ and $f(n) = 2^{-n}$. Describe $\nu$ with $d\nu = f \, d\mu$, and compute $\int g \, d\nu$ for $g(n) = n$.


By the counting-measure example, $\nu(E) = \int_E f \, d\mu = \sum_{n \in E} 2^{-n}$. That's the point-mass measure $\nu(\{n\}) = 2^{-n}$ from the Measures page, and $\nu(\mathbb{N}) = \sum 2^{-n} = 1$, so it's a probability measure. By the theorem, $$\int g \, d\nu = \int g f \, d\mu = \sum_{n=1}^{\infty} \frac{n}{2^n} = 2.$$ (The last sum: $\sum_{n \ge 1} n x^n = \frac{x}{(1 - x)^2}$ for $|x| < 1$, at $x = \frac{1}{2}$.)

On a finite space you can see the whole thing: the base measure sets the width of each column, the density sets its height, and the new measure is the area. Reweight it yourself.

Reweight a Measure

The second mission shows a one-way street: a density can erase a set $\mu$ thinks is heavy, but if $\mu(E) = 0$ then $\nu(E) = \int_E f \, d\mu = 0$ by (d), whatever $f$ is. That one-way street becomes the Radon–Nikodym theorem later in the course. Compute a few.

Loading practice engine...

Mixed Practice

Every question so far came right after its idea, which is a hint. Down here the hint is gone. First, true or false: a claim about anything on this page, some of them the kind that sounds right and isn't. Decide, then read why.

Loading practice engine...

Next, a proof from this page with one step missing.

Loading practice engine...

Next, the mixed set. Every question type on this page except true or false goes into one hat, and each click draws a new one at random. Flip the switch to type your answer; a few types need their answer choices, and they'll say so.

Loading practice engine...

Last, the Spicy Bonus. The page opened with Lebesgue's picture: slice the range into levels and add up (height of a band) × (size of the set above it). With thinner and thinner bands, that sum becomes an integral over the levels themselves, and it's exactly $\int f \, d\mu$.

🌶️ SPICY BONUS 🌶️

Let $(X, \mathcal{M}, \mu)$ be a measure space and $f\colon X \to [0, \infty]$ measurable. Prove the layer-cake formula: the function $\varphi(t) = \mu(\{f > t\})$ is Borel measurable on $[0, \infty)$, and $$\int_X f \, d\mu = \int_{[0, \infty)} \mu(\{f > t\}) \, dm(t).$$

Show proof

Proof. Measurability. If $t < t'$, then $\{f > t'\} \subseteq \{f > t\}$, so $\varphi$ is nonincreasing. Hence for every $a$, the set $\{t : \varphi(t) > a\}$ has the property that with any $t$ it contains every smaller $t' \ge 0$: it is $\emptyset$, $[0, \infty)$, or an interval $[0, b)$ or $[0, b]$. All of these are Borel, so $\varphi$ is measurable. The same holds for $\varphi_s(t) = \mu(\{s > t\})$ for any measurable $s \ge 0$.

Simple functions. Let $s = \sum_{i=1}^{k} \alpha_i \chi_{A_i}$ in canonical form with $0 \le \alpha_1 < \alpha_2 < \cdots < \alpha_k$, and set $\alpha_0 = 0$. For $t \in [\alpha_{j-1}, \alpha_j)$ we have $\{s > t\} = A_j \cup \cdots \cup A_k$, and for $t \ge \alpha_k$ the set is empty. So $$\varphi_s = \sum_{j=1}^{k} \mu(A_j \cup \cdots \cup A_k) \, \chi_{[\alpha_{j-1}, \alpha_j)},$$ a sum of constants (possibly $\infty$) times indicators of intervals. By additivity and $\int c\chi_I \, dm = c \, m(I)$ (also for $c = \infty$, by Monotone Convergence on $n\chi_I$, with $0 \cdot \infty = 0$), $$\int \varphi_s \, dm = \sum_{j=1}^{k} (\alpha_j - \alpha_{j-1}) \sum_{i=j}^{k} \mu(A_i) = \sum_{i=1}^{k} \mu(A_i) \sum_{j=1}^{i} (\alpha_j - \alpha_{j-1}) = \sum_{i=1}^{k} \alpha_i \, \mu(A_i) = \int s \, d\mu.$$ (Swapping the two finite sums is fine in $[0, \infty]$; if $\alpha_1 = 0$, the $j = 1$ term is $0 \cdot \mu(\ldots) = 0$ on the left and $\alpha_1 \mu(A_1) = 0$ on the right.)

The limit. Let $s_n = \varphi_n \circ f$ be the staircases, so $s_n \uparrow f$. Fix $t \ge 0$. The sets $\{s_n > t\}$ increase with $n$, and their union is $\{f > t\}$: $s_n \le f$ gives one inclusion, and if $f(x) > t$, then $s_n(x) \to f(x)$ puts $s_n(x) > t$ for large $n$. By continuity from below, $\varphi_{s_n}(t) \uparrow \varphi(t)$ for every $t$. Monotone Convergence for $m$ gives $\int \varphi_{s_n} \, dm \to \int \varphi \, dm$, and Monotone Convergence for $\mu$ gives $\int s_n \, d\mu \to \int f \, d\mu$. The two sequences are equal term by term, so their limits are equal. $\blacksquare$