Integrable Functions

So far the integral only knows how to eat nonnegative functions. Feed it $f \ge 0$ and it hands back a number in $[0, \infty]$, maybe $\infty$, and that's fine. But most functions you actually care about go negative, or go complex, and then "$\infty - \infty$" is waiting around every corner. This page fixes that with one rule: only integrate $f$ when $\int |f|$ is finite. Then we get the payoff the whole theory was built for: the Dominated Convergence Theorem, the cleanest answer anyone has to "when can a limit move inside an integral?"

The Lebesgue Integral builds $\int_E f \, d\mu$ for measurable $f\colon X \to [0, \infty]$ as the sup of $\int_E s \, d\mu$ over simple $0 \le s \le f$. This page borrows five facts from it: the integral is monotone ($f \le g$ gives $\int f \le \int g$); it adds ($\int (f + g) = \int f + \int g$, and $\int cf = c \int f$ for $c \ge 0$); the Monotone Convergence Theorem; its series form, $\int \sum f_n = \sum \int f_n$ for $f_n \ge 0$; and Fatou's lemma, $\int \liminf f_n \le \liminf \int f_n$ for $f_n \ge 0$.

Two quick translations, so the examples make sense. Under counting measure on $\mathbb{N}$, a function is a sequence and the integral of $f \ge 0$ is the series $\sum f(n)$. With point masses $\mu = \sum w_k \delta_k$, it's the weighted sum $\sum w_k f(k)$. Lebesgue measure isn't built yet either, but some examples use length $m$ on an interval anyway: for continuous $f \ge 0$ the length integral is the (improper) Riemann integral you already know.

Lebesgue Measure builds $m$ out of the Riemann integral, so $\int f \, dm$ is the Riemann integral for every continuous $f$ with compact support; monotone convergence then extends that to the improper Riemann integral of a continuous $f \ge 0$ on an interval. Until then, treat "length" as a promise.

$L^1$ and the Complex Integral

Here's the club. To get in, $|f|$ has to have a finite integral. That one condition is what keeps every subtraction below honest.

Let $(X, \mathcal{M}, \mu)$ be a measure space. $L^1(\mu)$ is the set of all measurable $f\colon X \to \mathbb{C}$ with $$\int_X |f| \, d\mu < \infty.$$ Its members are called Lebesgue integrable functions.

The definition makes sense because $|f|$ is measurable whenever $f$ is (it's a continuous function of $f$), so $\int |f| \, d\mu$ is an integral of a nonnegative function, which we already have. Notice that $f$ is complex-valued, so its values are finite at every point. Under counting measure the test is one you've seen before.

Let $\mu$ be the counting measure on $\mathbb{N}$. When is a sequence $f$ in $L^1(\mu)$? Decide for $f(n) = \frac{(-1)^n}{n^2}$ and $g(n) = \frac{i^n}{2^n}$.


Every function on $\mathcal{P}(\mathbb{N})$ is measurable, and $\int |f| \, d\mu = \sum_{n=1}^{\infty} |f(n)|$. So $f \in L^1(\mu)$ exactly when the series of absolute values converges: the absolutely summable sequences.

$\sum \left|\frac{(-1)^n}{n^2}\right| = \sum \frac{1}{n^2} < \infty$, so $f \in L^1(\mu)$. And $|i^n| = 1$, so $\sum \left|\frac{i^n}{2^n}\right| = \sum 2^{-n} = 1$, and $g \in L^1(\mu)$ too.

Notice what the test ignored: the signs, and the direction in the complex plane. Only $|f|$ counts. That has a consequence people trip on.

A convergent series is not the same as an integrable sequence. $\sum \frac{(-1)^n}{n}$ converges (to $-\log 2$), but $f(n) = \frac{(-1)^n}{n}$ is not in $L^1$ of counting measure, because $\sum \left|\frac{(-1)^n}{n}\right| = \sum \frac{1}{n} = \infty$. The Lebesgue integral only handles absolute convergence. Other books say "absolutely integrable" or "L¹-integrable" for the same thing.

The alternating harmonic series converges to $-\log 2$, and Lebesgue looks at it and says "not integrable." Rude, but fair.

Slide the exponent and flip the signs on and off. Watch which running sum decides membership.

Summable?

The orange curve can settle down while the purple one climbs forever, and the purple one is the only one $L^1$ listens to. Now try it with a lineup. Some choices use length on an interval, where the $p$-test you know from calculus does the work.

Loading practice engine...

Now to integrate one. Split $f$ into its real and imaginary parts, split each of those into positive and negative parts, and integrate the four nonnegative pieces we already know how to handle.

Let $f \in L^1(\mu)$ with $f = u + iv$, and let $E \in \mathcal{M}$. The integral of $f$ over $E$ is $$\int_E f \, d\mu = \left(\int_E u^+ \, d\mu - \int_E u^- \, d\mu\right) + i\left(\int_E v^+ \, d\mu - \int_E v^- \, d\mu\right),$$ and for measurable $f\colon X \to [-\infty, \infty]$ with $\int_X |f| \, d\mu < \infty$, it is $\int_E f \, d\mu = \int_E f^+ \, d\mu - \int_E f^- \, d\mu$.

Each of the four integrals is finite, because $u^+, u^- \le |u| \le |f|$ and $v^+, v^- \le |v| \le |f|$. That's the whole point of the $L^1$ condition: no $\infty - \infty$ can sneak in. On a finite set, the four pieces just reassemble into a weighted sum.

On $X = \{1, 2, 3\}$ with $\mathcal{P}(X)$, let $\mu = \delta_1 + 2\delta_2 + 3\delta_3$ and $f = (2 - i, \, -1 + 3i, \, -2i)$, listed by value. Find $\int_X f \, d\mu$ from the definition.


The real part is $u = (2, -1, 0)$, so $u^+ = (2, 0, 0)$ and $u^- = (0, 1, 0)$. The imaginary part is $v = (-1, 3, -2)$, so $v^+ = (0, 3, 0)$ and $v^- = (1, 0, 2)$.

Integrating against the masses $1, 2, 3$: $\int u^+ = 1 \cdot 2 = 2$, $\int u^- = 2 \cdot 1 = 2$, $\int v^+ = 2 \cdot 3 = 6$, and $\int v^- = 1 \cdot 1 + 3 \cdot 2 = 7$.

So $\int_X f \, d\mu = (2 - 2) + i(6 - 7) = -i$. Check it the short way: $1(2 - i) + 2(-1 + 3i) + 3(-2i) = 2 - i - 2 + 6i - 6i = -i$.

The short way worked because the integral is linear. That's the first theorem: $L^1(\mu)$ is a complex vector space, and the integral is a linear map on it.

If $f, g \in L^1(\mu)$ and $\alpha, \beta \in \mathbb{C}$, then $\alpha f + \beta g \in L^1(\mu)$ and $$\int_X (\alpha f + \beta g) \, d\mu = \alpha \int_X f \, d\mu + \beta \int_X g \, d\mu.$$

Show proof

Proof. Membership. $\alpha f + \beta g$ is measurable, and $|\alpha f + \beta g| \le |\alpha| |f| + |\beta| |g|$ at every point, so by monotonicity and additivity for nonnegative functions, $$\int |\alpha f + \beta g| \, d\mu \le |\alpha| \int |f| \, d\mu + |\beta| \int |g| \, d\mu < \infty.$$

Sums. First let $f$ and $g$ be real, and put $h = f + g$. Then $h^+ - h^- = f^+ - f^- + g^+ - g^-$, and every value here is finite, so $$h^+ + f^- + g^- = h^- + f^+ + g^+.$$ Both sides are sums of nonnegative functions, so integrating and using additivity gives $\int h^+ + \int f^- + \int g^- = \int h^- + \int f^+ + \int g^+$. All six integrals are finite, so we can rearrange: $\int h = \int f + \int g$. For complex $f$ and $g$, apply this to the real parts and to the imaginary parts separately.

Real scalars. For real $f$ and $c \ge 0$, $(cf)^+ = cf^+$ and $(cf)^- = cf^-$, so $\int cf = c \int f$. For $c = -1$, $(-f)^+ = f^-$ and $(-f)^- = f^+$, so $\int (-f) = -\int f$. Together these handle every real $c$, and for complex $f$ apply them to $u$ and $v$.

The scalar $i$. If $f = u + iv$, then $if = -v + iu$, so $$\int if \, d\mu = -\int v \, d\mu + i \int u \, d\mu = i\left(\int u \, d\mu + i \int v \, d\mu\right) = i \int f \, d\mu.$$

Any $\alpha = a + bi$. $\alpha f = af + b(if)$, so by the cases above, $\int \alpha f = a \int f + b \, i \int f = \alpha \int f$. Combined with sums, this gives the formula. $\blacksquare$

From now on we can push constants and sums through integrals of $L^1$ functions without thinking about it. Two more rules fall straight out of the definition.

Let $f \in L^1(\mu)$ with $f = u + iv$, and $E \in \mathcal{M}$. Show that $\operatorname{Re} \int_E f \, d\mu = \int_E u \, d\mu$ and $\int_E \overline{f} \, d\mu = \overline{\int_E f \, d\mu}$.

Show proof

Proof. By definition, $\int_E f = \left(\int_E u^+ - \int_E u^-\right) + i\left(\int_E v^+ - \int_E v^-\right)$, and both brackets are real numbers. So the real part is $\int_E u^+ - \int_E u^- = \int_E u$.

For the conjugate, $\overline{f} = u + i(-v)$, and $(-v)^+ = v^-$, $(-v)^- = v^+$. So $$\int_E \overline{f} \, d\mu = \int_E u \, d\mu + i\left(\int_E v^- \, d\mu - \int_E v^+ \, d\mu\right) = \int_E u \, d\mu - i \int_E v \, d\mu = \overline{\int_E f \, d\mu}. \ \blacksquare$$

Now compute a few. The masses and values change every time, and the answer is a complex number $a + bi$.

Loading practice engine...

The Triangle Inequality for Integrals

An integral is a souped-up sum, and sums obey the triangle inequality: $|z_1 + z_2 + z_3| \le |z_1| + |z_2| + |z_3|$. The integral version is the next theorem. For real $f$ it's one line, but complex $f$ needs a trick: rotate the whole picture so the integral lands on the positive real axis.

If $f \in L^1(\mu)$, then $$\left|\int_X f \, d\mu\right| \le \int_X |f| \, d\mu.$$

Show proof

Proof. Let $z = \int_X f \, d\mu$. If $z = 0$ there is nothing to prove. Otherwise let $\alpha = \frac{|z|}{z}$, so $|\alpha| = 1$ and $\alpha z = |z|$. By linearity, $$|z| = \alpha \int_X f \, d\mu = \int_X \alpha f \, d\mu.$$ The left side is real, so the right side equals its own real part, which by the exercise above is $\int_X \operatorname{Re}(\alpha f) \, d\mu$.

Now $\operatorname{Re}(\alpha f) \le |\alpha f| = |f|$ at every point. For real functions $g \le h$ in $L^1$, we have $g^+ \le h^+$ and $g^- \ge h^-$, so $\int g \le \int h$. Therefore $$|z| = \int_X \operatorname{Re}(\alpha f) \, d\mu \le \int_X |f| \, d\mu. \ \blacksquare$$

Here is that proof as a picture, with $f$ on three points under counting measure. The integral is the three values laid head to tail. The rotation by $\alpha$ changes no lengths, and once the chain is straightened along the real axis you can see the inequality.

$|z|$ is the straight-line distance to the end of the chain, and $\int |f|$ is the length of the chain itself. Every time two values point different ways, some length is lost. So when does nothing get lost? Drag the values and find out.

Line Them Up

Equality needs every value pointing the same way. In symbols, there's one $\alpha$ with $|\alpha| = 1$ and $\alpha f = |f|$. On a general measure space that only has to hold almost everywhere; we'll prove it once we have the tools for "almost everywhere" two sections from now.

Dominated Convergence

Here's the question this whole course keeps circling: if $f_n \to f$ at every point, does $\int f_n \to \int f$? The Monotone Convergence Theorem says yes when $0 \le f_1 \le f_2 \le \cdots$. Without that, the answer can be no, and it's worth seeing the first counterexample up close.

Let $\mu$ be the counting measure on $\mathbb{N}$ and $f_n = \chi_{\{n\}}$. Find $\lim_n \int f_n \, d\mu$ and $\int \lim_n f_n \, d\mu$.


Each $f_n$ is $1$ at the single point $n$, so $\int f_n \, d\mu = 1$ for every $n$, and the limit of the integrals is $1$.

At a fixed point $k$, $f_n(k) = 0$ as soon as $n > k$, so $f_n \to 0$ pointwise, and $\int \lim f_n \, d\mu = 0$. The two answers disagree: the unit of mass marches off to infinity, and the pointwise limit never sees it leave.

Mass can also escape by piling up at a single point. Here are the spikes $f_n = n \, \chi_{(0, 1/n)}$, each with area $1$, getting taller and thinner.

The purple staircase is the smallest function sitting above every spike so far, and its area grows like $1 + \frac{1}{2} + \cdots + \frac{1}{n}$, which never stops. That's the diagnosis: in both examples, nothing integrable fits on top of the whole sequence. The cure is to demand one.

Dominated Convergence: because every sequence needs a responsible adult.

Let $f_n\colon X \to \mathbb{C}$ be measurable for $n = 1, 2, \ldots$, and suppose $f(x) = \lim_{n \to \infty} f_n(x)$ exists for every $x \in X$. If there is $g \in L^1(\mu)$ with $|f_n(x)| \le g(x)$ for every $n$ and every $x$, then $f \in L^1(\mu)$, $$\lim_{n \to \infty} \int_X |f_n - f| \, d\mu = 0, \quad \text{and} \quad \lim_{n \to \infty} \int_X f_n \, d\mu = \int_X f \, d\mu.$$

Show proof

Proof. $f$ is measurable, as a pointwise limit of measurable functions. Letting $n \to \infty$ in $|f_n(x)| \le g(x)$ gives $|f| \le g$, so $f \in L^1(\mu)$. Then $|f_n - f| \le |f_n| + |f| \le 2g$.

So the functions $2g - |f_n - f|$ are nonnegative, and since $f_n \to f$ they converge to $2g$. Fatou's lemma gives $$\int_X 2g \, d\mu \le \liminf_{n \to \infty} \int_X \big(2g - |f_n - f|\big) \, d\mu = \int_X 2g \, d\mu - \limsup_{n \to \infty} \int_X |f_n - f| \, d\mu,$$ where the equality uses linearity (everything is in $L^1$) and $\liminf (-a_n) = -\limsup a_n$.

Since $\int 2g \, d\mu$ is finite, subtract it: $\limsup_n \int |f_n - f| \, d\mu \le 0$. The integrals are $\ge 0$, so they tend to $0$. Finally, by linearity and the triangle inequality for integrals, $$\left|\int_X f_n \, d\mu - \int_X f \, d\mu\right| = \left|\int_X (f_n - f) \, d\mu\right| \le \int_X |f_n - f| \, d\mu \to 0. \ \blacksquare$$

Read the hypotheses as a checklist: pointwise convergence, plus one integrable $g$ above every $|f_n|$ at once. Here it is doing its job on a sequence that isn't monotone in any helpful way.

Let $\mu$ be the counting measure on $\mathbb{N}$ and $f_n(k) = 2^{-k}\left(1 - \frac{1}{n}\right)^k$. Use dominated convergence to find $\lim_n \int f_n \, d\mu$, then check it by computing $\int f_n \, d\mu$ exactly.


Since $0 \le 1 - \frac{1}{n} < 1$, we have $0 \le f_n(k) \le 2^{-k}$, and $g(k) = 2^{-k}$ is in $L^1(\mu)$ because $\sum 2^{-k} = 1$. Also $f_n(k) \to 2^{-k}$ for each $k$. Dominated convergence gives $$\lim_{n \to \infty} \int f_n \, d\mu = \sum_{k=1}^{\infty} 2^{-k} = 1.$$

To check, put $r = \frac{1}{2}\left(1 - \frac{1}{n}\right) = \frac{n - 1}{2n}$. Then $\int f_n \, d\mu = \sum_{k \ge 1} r^k = \frac{r}{1 - r} = \frac{n - 1}{n + 1}$, which does tend to $1$.

The hard part in practice is finding $g$. The best candidate is always the envelope $\sup_n |f_n|$: if that's integrable you're done, and if it isn't, nothing smaller works either. Shape a candidate and test it against three sequences.

Find a Dominator

Family C is the spike from the animation, and the widget can't beat it because nothing can: anything above all the spikes is at least about $\frac{1}{x}$. When dominated convergence fails, the mass escapes in one of three ways. Sort these sequences by how it gets away.

Where Does the Mass Go?

Escaping to infinity, piling up at a point, spreading out flat: an integrable $g$ blocks all three, because it can't be big far away, or tall on a tiny set, or spread out over everything. Now pick out a dominating function yourself.

Loading practice engine...

Next, the full question: find the limit of the integrals. First decide whether a dominating function exists. If it does, move the limit inside. If it doesn't, compute $\int f_n$ directly and take its limit.

Loading practice engine...

One special case comes up so often it has its own name. On a space of finite measure, constants are integrable, so any bound will do.

Suppose $\mu(X) < \infty$, each $f_n\colon X \to \mathbb{C}$ is measurable with $|f_n| \le M$ for a constant $M$, and $f_n \to f$ pointwise. Show that $\int f_n \, d\mu \to \int f \, d\mu$. (This is the bounded convergence theorem.)


Take $g = M$, the constant function. It is measurable, and $\int_X M \, d\mu = M \mu(X) < \infty$, so $g \in L^1(\mu)$, and $|f_n| \le g$ for every $n$. Dominated convergence applies, so $\int f_n \, d\mu \to \int f \, d\mu$.

The finite measure matters: under counting measure on $\mathbb{N}$, $f_n = \chi_{\{n\}}$ is bounded by $1$, and we saw the integrals stay at $1$ while $f_n \to 0$.

The Monotone Convergence Theorem handles increasing sequences. What about decreasing ones? Dominated convergence gives the answer, with one condition that can't be dropped.

Suppose $f_n\colon X \to [0, \infty]$ is measurable for each $n$, $f_1 \ge f_2 \ge \cdots \ge 0$, $f_n \to f$ pointwise, and $f_1 \in L^1(\mu)$. Prove that $\lim_n \int_X f_n \, d\mu = \int_X f \, d\mu$. Then show that the conclusion can fail if "$f_1 \in L^1(\mu)$" is dropped.

Show proof

Proof. Since $f_1 \in L^1(\mu)$, $f_1$ is complex-valued, so $0 \le f_n \le f_1 < \infty$ at every point and every $f_n$ is real-valued. So $|f_n| \le f_1$ for every $n$, with $f_1 \in L^1(\mu)$, and $f_n \to f$ pointwise. By dominated convergence with $g = f_1$, $\int f_n \, d\mu \to \int f \, d\mu$.

Without the hypothesis: let $\mu$ be the counting measure on $\mathbb{N}$ and $f_n = \chi_{\{n, n+1, \ldots\}}$. Then $f_1 \ge f_2 \ge \cdots \ge 0$ and $f_n \to 0$ pointwise (each $k$ drops out once $n > k$), so $\int f \, d\mu = 0$. But every $f_n$ is $1$ on infinitely many points, so $\int f_n \, d\mu = \infty$ for every $n$, and the limit is $\infty \neq 0$. $\blacksquare$

Equal Almost Everywhere

The Lebesgue Integral already showed that the integral of a nonnegative function can't see null sets: $\int_N f \, d\mu = 0$ when $\mu(N) = 0$, and $f = g$ a.e. gives $\int_E f = \int_E g$. Its exercise on Markov's inequality also showed that $\int f = 0$ forces $f = 0$ a.e. This section carries all of that over to $L^1$.

The first fact goes over to $L^1$ in one line: integrating over a null set gives $0$.

If $N \in \mathcal{M}$ and $\mu(N) = 0$, then $\int_N f \, d\mu = 0$ for every $f \in L^1(\mu)$.

Show proof

Proof. Write $f = u + iv$. The four nonnegative functions $u^\pm$ and $v^\pm$ each integrate to $0$ over the null set $N$ (the nonnegative case from The Lebesgue Integral), so $\int_N f \, d\mu = (0 - 0) + i(0 - 0) = 0$. $\blacksquare$

So whatever happens on a null set doesn't count, and a function can be wildly nonzero and still integrate to nothing. Here's the quickest way to feel that.

Let $\mu = \delta_0$ on $\mathcal{P}(\mathbb{R})$, and $f = \chi_{\mathbb{R} \setminus \{0\}}$. Find $\int_{\mathbb{R}} f \, d\mu$.


$f$ is the simple function $1 \cdot \chi_{\mathbb{R} \setminus \{0\}}$, so $\int f \, d\delta_0 = 1 \cdot \delta_0(\mathbb{R} \setminus \{0\}) = 0$. The function equals $1$ at every point but one, and its integral is $0$, because the one point it misses is the only point $\delta_0$ cares about. In other words, $f = 0$ $\delta_0$-almost everywhere.

That's the pattern in general, and it gives the two facts the Measures page promised, now for complex functions: a function that's $0$ almost everywhere has integral $0$, and so changing a function on a null set doesn't change any of its integrals.

If $f\colon X \to \mathbb{C}$ (or $f\colon X \to [0, \infty]$) is measurable and $f = 0$ $\mu$-a.e., then $\int_E f \, d\mu = 0$ for every $E \in \mathcal{M}$. In the complex case, $f \in L^1(\mu)$ automatically.

Show proof

Proof. Let $Z = \{x : f(x) \neq 0\}$. It is measurable (the preimage of an open set) and it sits inside a null set, so $\mu(Z) = 0$. Split $|f| \chi_E = |f| \chi_{E \cap Z} + |f| \chi_{E \setminus Z}$. The first term integrates to $0$ because $Z$ is null (the nonnegative case), and the second is the zero function. So $\int_E |f| \, d\mu = 0$.

With $E = X$ this shows $f \in L^1(\mu)$ in the complex case. Then the triangle inequality gives $\left|\int_E f \, d\mu\right| = \left|\int_X f \chi_E \, d\mu\right| \le \int_E |f| \, d\mu = 0$. For $f \ge 0$, $\int_E f \, d\mu = \int_E |f| \, d\mu = 0$ directly. $\blacksquare$

Apply it to a difference, and the Sneak Peek's promise comes true.

If $f, g \in L^1(\mu)$ and $f = g$ $\mu$-a.e., then $\int_E f \, d\mu = \int_E g \, d\mu$ for every $E \in \mathcal{M}$.

Show proof

Proof. $f - g \in L^1(\mu)$ and $f - g = 0$ a.e., so $\int_E (f - g) \, d\mu = 0$ by the proposition above, and linearity gives $\int_E f \, d\mu = \int_E g \, d\mu$. (For nonnegative $f$ and $g$, which can't be subtracted, this is the proposition on The Lebesgue Integral.) $\blacksquare$

Here's the classic function Riemann integration can't handle, and the corollary disposes of it in two lines.

With length $m$ on $[0, 1]$, let $f = \chi_{\mathbb{Q} \cap [0, 1]}$, which is $1$ at rationals and $0$ at irrationals. Find $\int_{[0, 1]} f \, dm$.


Each single point has length $0$, and $\mathbb{Q} \cap [0, 1]$ is countable, so countable subadditivity gives $m(\mathbb{Q} \cap [0, 1]) = 0$. So $f = 0$ $m$-a.e., and by the corollary $\int f \, dm = \int 0 \, dm = 0$.

Riemann sums can't decide this one: every subinterval holds rationals and irrationals, so the upper sums are all $1$ and the lower sums are all $0$.

So an $L^1$ function is really only known up to a null set. The integral can't tell $f$ from $g$ when $f \sim g$, and soon neither will we.

On The Lᵖ Spaces, $L^1(\mu)$ gets a norm, $\|f\|_1 = \int |f| \, d\mu$. Since $\int |f| = 0$ only says $f = 0$ a.e., the norm only works after identifying functions that are equal a.e. From then on, a "function" in $L^1$ is really an equivalence class under $\sim$.

This also means dominated convergence doesn't care about null sets either.

Dominated convergence only needs its hypotheses almost everywhere: if $f_n \to f$ a.e. (with $f$ measurable) and, for each $n$, $|f_n| \le g$ a.e., the conclusions still hold. The bad points form a countable union of null sets, which is null; set every function to $0$ there, apply the theorem as stated, and the corollary above says no integral changed.

Now the converse direction: what does a small integral say about the function? You met the tool in an exercise on The Lebesgue Integral. It gets a box here, for complex $f$ too, because the rest of the course cites it constantly.

If $f$ is measurable (complex, or with values in $[0, \infty]$) and $t > 0$, then $$\mu(\{|f| > t\}) \le \frac{1}{t} \int_X |f| \, d\mu.$$

Show proof

Proof. Let $E = \{|f| > t\}$, which is measurable. On $E$, $t < |f|$, and off $E$, $t \chi_E = 0 \le |f|$. So $t \chi_E \le |f|$ everywhere, and by monotonicity $t \, \mu(E) = \int t \chi_E \, d\mu \le \int |f| \, d\mu$. Divide by $t$. $\blacksquare$

Here it is on an unbounded function, to see how much it gives away.

With length $m$ on $(0, 1]$, let $f(x) = x^{-1/2}$. Compute $m(\{f > t\})$ for $t \ge 1$ and compare it with Markov's bound.


$x^{-1/2} > t$ exactly when $x < \frac{1}{t^2}$, so $\{f > t\} = (0, \frac{1}{t^2})$ and $m(\{f > t\}) = \frac{1}{t^2}$.

Markov's bound uses $\int_0^1 x^{-1/2} \, dx = 2$: it says $m(\{f > t\}) \le \frac{2}{t}$. True, since $\frac{1}{t^2} \le \frac{2}{t}$ for $t \ge 1$, but loose: the bound only knows the integral, not the shape of $f$. What it does guarantee is that the set where $f$ is huge has small measure.

A function can only be big on a set of small measure, or its integral would be big. Push $t$ to infinity and you get a fact that both of the next sections quietly need.

If $f\colon X \to [0, \infty]$ is measurable and $\int_X f \, d\mu < \infty$, then $f < \infty$ $\mu$-a.e.

Show proof

Proof. For every $n$, $\{f = \infty\} \subseteq \{f > n\}$, so by Markov's inequality $\mu(\{f = \infty\}) \le \frac{1}{n} \int f \, d\mu$. The right side tends to $0$, so $\mu(\{f = \infty\}) = 0$. $\blacksquare$

Push $t$ the other way, toward $0$, and you get the converse of "zero a.e. means zero integral". It needs $f \ge 0$.

If $f\colon X \to [0, \infty]$ is measurable and $\int_X f \, d\mu = 0$, then $f = 0$ $\mu$-a.e.

Show proof

Proof. Let $E_n = \{f > \frac{1}{n}\}$. By Markov's inequality, $\mu(E_n) \le n \int f \, d\mu = 0$. Since $\{f > 0\} = \bigcup_n E_n$, countable subadditivity gives $\mu(\{f > 0\}) \le \sum_n \mu(E_n) = 0$. $\blacksquare$

The hypothesis $f \ge 0$ is doing real work here: it's what stops positive and negative values from cancelling.

Don't drop $f \ge 0$. Under counting measure on $\{1, 2\}$, $f = (1, -1)$ has $\int f \, d\mu = 0$ and isn't $0$ anywhere. For complex or real $f$, the right test is $\int |f| \, d\mu = 0$, or the exercise below.

Now we can settle the equality case from Line Them Up. Equality in the triangle inequality means every value points the same way, up to a null set.

Let $f \in L^1(\mu)$ with $\left|\int_X f \, d\mu\right| = \int_X |f| \, d\mu$. Show that there is $\alpha \in \mathbb{C}$ with $|\alpha| = 1$ and $\alpha f = |f|$ $\mu$-a.e.

Show proof

Proof. Let $z = \int f \, d\mu$. If $z = 0$, then $\int |f| \, d\mu = 0$, so $f = 0$ a.e. by the theorem above, and $\alpha = 1$ works.

Otherwise let $\alpha = \frac{|z|}{z}$. As in the proof of the triangle inequality, $\int \operatorname{Re}(\alpha f) \, d\mu = |z| = \int |f| \, d\mu$, so by linearity $$\int_X \big(|f| - \operatorname{Re}(\alpha f)\big) \, d\mu = 0.$$ The integrand is $\ge 0$ because $\operatorname{Re}(\alpha f) \le |\alpha f| = |f|$, so it is $0$ a.e. At such points $\operatorname{Re}(\alpha f) = |\alpha f|$, and a complex number whose real part equals its absolute value is a nonnegative real number. So $\alpha f = |\alpha f| = |f|$ a.e. $\blacksquare$

One more in the same spirit: if every integral of $f$ vanishes, $f$ itself vanishes a.e. The trick is to choose the set $E$ to fit the sign of $f$.

Let $f \in L^1(\mu)$ with $\int_E f \, d\mu = 0$ for every $E \in \mathcal{M}$. Show that $f = 0$ $\mu$-a.e.

Show proof

Proof. Write $f = u + iv$. Let $E = \{u > 0\}$, which is measurable. By the first exercise, $\int_E u \, d\mu = \operatorname{Re} \int_E f \, d\mu = 0$. On $E$, $u = u^+$, and off $E$, $u^+ = 0$, so $\int_X u^+ \, d\mu = \int_E u \, d\mu = 0$, and $u^+ = 0$ a.e. by the theorem above.

The same argument with $E = \{u < 0\}$ gives $u^- = 0$ a.e., and using imaginary parts with $\{v > 0\}$ and $\{v < 0\}$ gives $v^+ = v^- = 0$ a.e. A union of four null sets is null, so $f = u^+ - u^- + i(v^+ - v^-) = 0$ a.e. $\blacksquare$

Series of Integrable Functions

For nonnegative functions, the series form of the Monotone Convergence Theorem lets you integrate a series term by term with no questions asked. For complex functions you need one question answered: is $\sum \int |f_n|$ finite? If so, the series converges almost everywhere, and you can integrate it term by term.

Let $f_1, f_2, \ldots$ be complex measurable functions, each defined a.e. on $X$, with $$\sum_{n=1}^{\infty} \int_X |f_n| \, d\mu < \infty.$$ Then the series $f(x) = \sum_{n=1}^{\infty} f_n(x)$ converges for $\mu$-almost every $x$, $f \in L^1(\mu)$, and $$\int_X f \, d\mu = \sum_{n=1}^{\infty} \int_X f_n \, d\mu.$$

Show proof

Proof. Each $f_n$ is defined off a null set $S_n$; set $f_n = 0$ on $S_n$. That changes no integral (equal a.e.), and now every $f_n$ is defined everywhere.

Let $\varphi = \sum_n |f_n|$, a measurable function into $[0, \infty]$. By the series form of monotone convergence, $\int \varphi \, d\mu = \sum_n \int |f_n| \, d\mu < \infty$, so $\varphi < \infty$ a.e. by the corollary on finiteness. Let $S = \bigcup_n S_n \cup \{\varphi = \infty\}$, a null set.

For $x \notin S$, the series $\sum f_n(x)$ converges absolutely, since $\sum |f_n(x)| = \varphi(x) < \infty$. Define $f(x) = \sum f_n(x)$ off $S$ and $f = 0$ on $S$. The partial sums $g_n = (f_1 + \cdots + f_n)\chi_{S^c}$ are measurable and converge to $f$ at every point, so $f$ is measurable. Also $|g_n| \le \varphi \chi_{S^c}$, which is finite-valued and integrable, so dominated convergence gives $$\int_X f \, d\mu = \lim_{n \to \infty} \int_X g_n \, d\mu = \lim_{n \to \infty} \sum_{k=1}^{n} \int_{S^c} f_k \, d\mu = \sum_{k=1}^{\infty} \int_X f_k \, d\mu,$$ using linearity and $\mu(S) = 0$. Finally $|f| \le \varphi$, so $f \in L^1(\mu)$. $\blacksquare$

The function $\varphi = \sum |f_n|$ is doing all the work: it's the dominating function, and its integral is exactly the hypothesis. Here's that picture on six points, with signs that make the partial sums swing back and forth.

The partial sums can wobble all they like inside $[-\varphi, \varphi]$. Here's the theorem on a complex series, where monotone convergence can't help.

Let $\mu$ be the counting measure on $\mathbb{N}$ and $f_n = \left(\frac{i}{2}\right)^n \chi_{\{1, \ldots, n\}}$. Check the hypothesis, find $f = \sum f_n$, and verify $\int f \, d\mu = \sum \int f_n \, d\mu$.


Hypothesis. $|f_n| = 2^{-n}$ on $n$ points, so $\int |f_n| \, d\mu = n \, 2^{-n}$, and $\sum n 2^{-n} = 2 < \infty$.

The sum. At the point $k$, only $f_n$ with $n \ge k$ are nonzero, so with $w = \frac{i}{2}$, $$f(k) = \sum_{n \ge k} w^n = \frac{w^k}{1 - w}.$$

Both sides. $\int f \, d\mu = \sum_k \frac{w^k}{1 - w} = \frac{w}{(1 - w)^2}$, and $\sum_n \int f_n \, d\mu = \sum_n n w^n = \frac{w}{(1 - w)^2}$ too. Numerically, $(1 - w)^2 = \frac{3}{4} - i$, so both equal $$\frac{i/2}{3/4 - i} = \frac{\frac{i}{2}\left(\frac{3}{4} + i\right)}{\frac{25}{16}} = -\frac{8}{25} + \frac{6}{25} i.$$

The hypothesis is about $\sum \int |f_n|$, not $\sum \int f_n$, and the difference is a real trap.

Convergence of $\sum \int f_n$ is not enough. Under counting measure on $\mathbb{N}$, let $f_n = \chi_{\{n\}} - \chi_{\{n+1\}}$. Every $\int f_n \, d\mu = 0$, so $\sum \int f_n = 0$. But the series telescopes, $\sum f_n = \chi_{\{1\}}$, whose integral is $1$. Here $\sum \int |f_n| = \sum 2 = \infty$, so the theorem never applied.

Borel–Cantelli and Averages

Two last results, both small, both used constantly later. The first is about sets, but the slickest proof is an integral: count how many sets each point falls in, and integrate the count.

Let $E_1, E_2, \ldots \in \mathcal{M}$ with $\sum_{n=1}^{\infty} \mu(E_n) < \infty$. Then $\mu$-almost every $x \in X$ lies in at most finitely many of the sets $E_n$.

Show proof

Proof. Let $g = \sum_{n=1}^{\infty} \chi_{E_n}$, a measurable function into $[0, \infty]$; $g(x)$ counts the sets $E_n$ that contain $x$. So the set $A$ of points in infinitely many $E_n$ is exactly $\{g = \infty\}$, which is measurable. By the series form of monotone convergence, $$\int_X g \, d\mu = \sum_{n=1}^{\infty} \int_X \chi_{E_n} \, d\mu = \sum_{n=1}^{\infty} \mu(E_n) < \infty,$$ so $g < \infty$ a.e. by the corollary on finiteness, which says $\mu(A) = 0$. $\blacksquare$

The set $A$ in that proof deserves a second look, because you've met it before.

The set $A$ has a name from Upper Limits & Simple Functions: $A = \bigcap_{N} \bigcup_{n \ge N} E_n$, the upper limit of the sets, because $\chi_A = \limsup_n \chi_{E_n}$. A point is in it exactly when it keeps showing up in the tail.

Here are two sequences of sets sweeping across $[0, 1]$, one with measures that add up and one without. Watch each tally.

On the bottom row the total measure is finite, and that's all Borel–Cantelli needs: after the first few sets there's so little ink left that most points never get hit again. The top row is the warning.

Infinitely many chances and I still only show up finitely often. Relatable.

The converse is false. If $\sum \mu(E_n) = \infty$, Borel–Cantelli says nothing at all. With length on $[0, 1]$, $E_n = [0, \frac{1}{n}]$ has $\sum \frac{1}{n} = \infty$, yet only $x = 0$ lies in infinitely many of them. And if the sets sweep across $[0, 1]$ like the top row, almost every point lies in infinitely many. When the sum diverges, find the set by hand.

Try it on a few sequences of sets. Sometimes Borel–Cantelli finishes the job in one line, and sometimes you have to look at the sets.

Loading practice engine...

The integral made that proof short, but Borel–Cantelli is really a fact about measures. Prove it again without integrating anything.

Prove Borel–Cantelli using only monotonicity and countable subadditivity, starting from $A = \bigcap_{N=1}^{\infty} \bigcup_{n \ge N} E_n$.

Show proof

Proof. A point lies in infinitely many $E_n$ exactly when, for every $N$, it lies in some $E_n$ with $n \ge N$; so the set of such points is $A$, and $A \in \mathcal{M}$. For every $N$, $A \subseteq \bigcup_{n \ge N} E_n$, so by monotonicity and countable subadditivity, $$\mu(A) \le \mu\left(\bigcup_{n \ge N} E_n\right) \le \sum_{n \ge N} \mu(E_n).$$ The right side is the tail of a convergent series, so it tends to $0$ as $N \to \infty$. Hence $\mu(A) = 0$. $\blacksquare$

The second result turns averages into pointwise information. For $E \in \mathcal{M}$ with $0 < \mu(E) < \infty$, the average of $f \in L^1(\mu)$ over $E$ is $A_E(f) = \frac{1}{\mu(E)} \int_E f \, d\mu$. An average of numbers in a disc stays in that disc. Run that backwards: if every average avoids a disc, the values must avoid it too, almost everywhere.

Let $\mu(X) < \infty$, $f \in L^1(\mu)$, and $S \subseteq \mathbb{C}$ closed. If $A_E(f) \in S$ for every $E \in \mathcal{M}$ with $\mu(E) > 0$, then $f(x) \in S$ for $\mu$-almost every $x \in X$.

Show proof

Proof. Let $\overline{D} = \{z : |z - \alpha| \le r\}$ be a closed disc with $\overline{D} \subseteq S^c$, and $E = f^{-1}(\overline{D})$, which is measurable. Suppose $\mu(E) > 0$. Since $\mu(E) < \infty$, $\frac{1}{\mu(E)} \int_E \alpha \, d\mu = \alpha$, so $$|A_E(f) - \alpha| = \frac{1}{\mu(E)} \left|\int_E (f - \alpha) \, d\mu\right| \le \frac{1}{\mu(E)} \int_E |f - \alpha| \, d\mu \le r,$$ because $|f - \alpha| \le r$ on $E$. So $A_E(f) \in \overline{D} \subseteq S^c$, contradicting the hypothesis. Hence $\mu(f^{-1}(\overline{D})) = 0$.

Now cover $S^c$ by countably many such discs. $S^c$ is open, so each $w \in S^c$ has some rational $r > 0$ with $\{z : |z - w| < 2r\} \subseteq S^c$; pick $\alpha$ with rational real and imaginary parts and $|\alpha - w| < r$. Then $w \in \{z : |z - \alpha| \le r\} \subseteq \{z : |z - w| < 2r\} \subseteq S^c$. There are only countably many discs with rational centers and radii, so $S^c = \bigcup_j \overline{D}_j$ with each $\overline{D}_j \subseteq S^c$. Then $f^{-1}(S^c) = \bigcup_j f^{-1}(\overline{D}_j)$ is a countable union of null sets, so it is null. $\blacksquare$

The closed discs matter. With open discs the estimate only gives $|A_E(f) - \alpha| \le r$, which puts the average in the closed disc, and that can touch $S$. Here's the most common use.

Let $\mu(X) < \infty$ and $f \in L^1(\mu)$, and suppose $0 \le \frac{1}{\mu(E)} \int_E f \, d\mu \le 1$ whenever $\mu(E) > 0$. What can you say about $f$?


The averages all lie in $S = [0, 1]$, a closed subset of $\mathbb{C}$. By the theorem, $f(x) \in [0, 1]$ for almost every $x$: $f$ is real and $0 \le f \le 1$ a.e. Nothing can be said everywhere: changing $f$ on a null set changes no average.

That's the toolkit: $L^1$ keeps every subtraction finite, the integral is linear and shrinks absolute values, dominated convergence moves limits inside, null sets are invisible, and summable measures mean "finitely often" almost everywhere.

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. Markov's inequality says $|f|$ can't be big on a big set. This says something stronger: the integral of $|f|$ over a small set is small, uniformly, even though $f$ itself can be unbounded.

🌶️ SPICY BONUS 🌶️

Let $f \in L^1(\mu)$. Prove that for every $\varepsilon > 0$ there is $\delta > 0$ such that $\int_E |f| \, d\mu < \varepsilon$ for every $E \in \mathcal{M}$ with $\mu(E) < \delta$.

Show proof

Proof. Truncate: let $f_n = \min\{|f|, n\}$. Since $|f|$ is finite-valued, $0 \le f_1 \le f_2 \le \cdots$ and $f_n \to |f|$ at every point, so by monotone convergence $\int f_n \, d\mu \to \int |f| \, d\mu < \infty$. Everything is finite, so $\int (|f| - f_n) \, d\mu \to 0$.

Let $\varepsilon > 0$, and fix $N$ with $\int (|f| - f_N) \, d\mu < \frac{\varepsilon}{2}$. Put $\delta = \frac{\varepsilon}{2N}$. If $\mu(E) < \delta$, then, since $|f| - f_N \ge 0$ and $f_N \le N$, $$\int_E |f| \, d\mu = \int_E (|f| - f_N) \, d\mu + \int_E f_N \, d\mu \le \int_X (|f| - f_N) \, d\mu + N \mu(E) < \frac{\varepsilon}{2} + N \cdot \frac{\varepsilon}{2N} = \varepsilon.$$ The point is that $N$ is chosen once, from $\varepsilon$, before $E$ is ever mentioned. $\blacksquare$

A tempting shortcut is to claim $|f| \le N'$ a.e. for some constant $N'$, "or else $f \notin L^1$". That's false: $x^{-1/2}$ on $(0, 1]$ with length is integrable and unbounded on every interval $(0, \eta)$. The truncation is what replaces it.