Tutorials › Real Analysis › Measurable Functions

Measure Theory · Tutorial 841 of 1000

Measurable Functions

Learn what it means for a function to be measurable, how to check this for basic examples, and why measurability is preserved under composition.

Advanced 9 min read

What You'll Learn

  • Define measurable maps between measurable spaces and real-valued measurable functions
  • Distinguish Borel measurability from Lebesgue measurability
  • Characterize measurable indicator functions using their underlying sets
  • Prove measurability for functions with countable range
  • Verify measurability of compositions of measurable maps
  • Recognize why measurability is essential for assigning measures to function-defined events

From Measurable Sets to Measurable Functions

The previous tutorial studied structural properties of Lebesgue measure, including how measurable sets behave under affine maps and how open sets decompose into intervals. A natural next question is how to describe a function using measurable sets. For a function \(f\), the set of inputs whose outputs lie in a specified target set is its preimage. Measurability requires these preimages to belong to the relevant sigma-algebra.

This requirement makes precise the idea that a function is compatible with the measurable structure of its domain and codomain. It does not require the function to be continuous. In particular, measurable functions can have discontinuities, and their definition depends on the sigma-algebras chosen on both spaces.

Definition (Measurable Function): Let \((X,\mathcal{F})\) and \((Y,\mathcal{G})\) be measurable spaces. A function \(f:X\to Y\) is \((\mathcal{F},\mathcal{G})\)-measurable if
$$ f^{-1}(B)=\{x\in X:f(x)\in B\}\in\mathcal{F} \qquad\text{for every }B\in\mathcal{G}. $$
When the sigma-algebras are understood, we simply call \(f\) measurable.

For real-valued functions, the standard target sigma-algebra is the Borel sigma-algebra \(\mathcal{B}(\mathbb{R})\). Thus, if \((X,\mathcal{F})\) is a measurable space and \(f:X\to\mathbb{R}\), then \(f\) is measurable when \(f^{-1}(B)\in\mathcal{F}\) for every Borel set \(B\subseteq\mathbb{R}\). When \(X=\mathbb{R}\) and \(\mathcal{F}=\mathcal{L}\), this is often called Lebesgue measurability of the function. This definition uses Lebesgue measurable sets in the domain but Borel sets in the target.

The choice of target sigma-algebra matters. If a function is measurable for a sigma-algebra \(\mathcal{G}\), it is also measurable for any smaller sigma-algebra contained in \(\mathcal{G}\), since fewer target sets need to be checked. Conversely, a larger target sigma-algebra imposes more conditions. When real-valued functions are discussed without further qualification, Borel sets are the target sets used in the definition.

Basic Examples and a Characterization by Indicator Functions

A useful first class of functions records membership in a single set. For \(A\subseteq X\), its indicator function is the function that takes the value \(1\) on \(A\) and \(0\) outside \(A\). It translates a set into a real-valued function, and the following result shows exactly when that function is measurable.

Theorem (Measurability of an Indicator Function): Let \((X,\mathcal{F})\) be a measurable space and \(A\subseteq X\). Define \(\mathbf{1}_A:X\to\mathbb{R}\) by \(\mathbf{1}_A(x)=1\) for \(x\in A\) and \(\mathbf{1}_A(x)=0\) for \(x\notin A\). Then \(\mathbf{1}_A\) is measurable if and only if \(A\in\mathcal{F}\).

Proof. Suppose first that \(\mathbf{1}_A\) is measurable. The singleton \(\{1\}\) is a closed, hence Borel, subset of \(\mathbb{R}\). By measurability,

$$ A=\mathbf{1}_A^{-1}(\{1\})\in\mathcal{F}. $$

Conversely, suppose \(A\in\mathcal{F}\). For any Borel set \(B\subseteq\mathbb{R}\), the preimage \(\mathbf{1}_A^{-1}(B)\) depends only on whether \(0\) and \(1\) belong to \(B\). If neither belongs to \(B\), the preimage is \(\varnothing\). If both belong to \(B\), it is \(X\). If \(1\in B\) but \(0\notin B\), it is \(A\). If \(0\in B\) but \(1\notin B\), it is \(X\setminus A\). Each of these sets belongs to \(\mathcal{F}\), because a sigma-algebra contains \(X\) and is closed under complements. Thus every Borel preimage is measurable, so \(\mathbf{1}_A\) is measurable. \(\square\)

Worked Example: An Indicator of a Lebesgue Measurable Set

Let \(A=[-2,1)\cup\{4\}\subseteq\mathbb{R}\), equipped with Lebesgue measure. The interval \([-2,1)\) is Borel, and the singleton \(\{4\}\) is Borel, so \(A\) is Borel and therefore Lebesgue measurable. The indicator function \(\mathbf{1}_A\) is consequently measurable. For example,

$$ \mathbf{1}_A^{-1}\bigl((1/2,3/2)\bigr)=A, \qquad \mathbf{1}_A^{-1}\bigl((-1,1/2)\bigr)=\mathbb{R}\setminus A. $$

The first equality holds because the only value of \(\mathbf{1}_A\) in \((1/2,3/2)\) is \(1\); the second holds because \(0\) belongs to \((-1,1/2)\) but \(1\) does not. Both preimages are Lebesgue measurable. The theorem also works in the other direction: if the indicator is measurable, its set \(A\) must be measurable.

Functions with Countable Range

Indicators take only two values. The same idea extends to functions taking any countable collection of values. Such functions are often called countably valued. Their measurability is determined by the sets on which each value is attained.

Theorem (Measurability of a Countably Valued Function): Let \((X,\mathcal{F})\) be a measurable space, and let \(f:X\to\mathbb{R}\) have countable range \(R=f(X)\). Then \(f\) is measurable if and only if
$$ \{x\in X:f(x)=r\}\in\mathcal{F} \qquad\text{for every }r\in R. $$

Proof. Suppose \(f\) is measurable. For each \(r\in R\), the singleton \(\{r\}\) is Borel, and therefore

$$ \{x\in X:f(x)=r\}=f^{-1}(\{r\})\in\mathcal{F}. $$

For the reverse implication, suppose every level set \(E_r=\{x\in X:f(x)=r\}\) is in \(\mathcal{F}\). Let \(B\subseteq\mathbb{R}\) be any Borel set. Since \(f\) takes values only in \(R\),

$$ f^{-1}(B)=\bigcup_{r\in R\cap B} E_r. $$

The index set \(R\cap B\) is at most countable because \(R\) is countable. Each set in this union belongs to \(\mathcal{F}\), so the union belongs to \(\mathcal{F}\) by closure under countable unions. Thus \(f^{-1}(B)\in\mathcal{F}\) for every Borel \(B\), and \(f\) is measurable. \(\square\)

Worked Example: The Floor Function

Define \(f:\mathbb{R}\to\mathbb{R}\) by \(f(x)=\lfloor x\rfloor\), the greatest integer less than or equal to \(x\). Its range is the countable set \(\mathbb{Z}\). For each integer \(k\),

$$ \{x\in\mathbb{R}:f(x)=k\}=[k,k+1). $$

Indeed, \(\lfloor x\rfloor=k\) means precisely \(k\leq x<k+1\). Each interval \([k,k+1)\) is Borel and hence Lebesgue measurable. The countably valued function theorem therefore shows that the floor function is measurable, both on \((\mathbb{R},\mathcal{B}(\mathbb{R}))\) and on \((\mathbb{R},\mathcal{L})\). This verification does not require the floor function to be continuous; in fact, it has a jump at every integer.

Worked Example: A Function Built from Two Measurable Pieces

Let \(A\in\mathcal{F}\), and define \(f:X\to\mathbb{R}\) by \(f(x)=3\) on \(A\) and \(f(x)=-2\) on \(X\setminus A\). The range is \(\{-2,3\}\). The level sets are

$$ f^{-1}(\{3\})=A, \qquad f^{-1}(\{-2\})=X\setminus A. $$

Both are in \(\mathcal{F}\), so the countably valued function theorem gives measurability. For example, \(f^{-1}((0,4))=A\), since \(3\in(0,4)\) and \(-2\notin(0,4)\), while \(f^{-1}((-\infty,0))=X\setminus A\). This example shows how a measurable set can be encoded by a function with two possible values.

Measurability Is Preserved Under Composition

A basic structural property of measurable functions is that they can be composed. This allows a measurable output to be passed through another measurable rule without losing measurability.

Theorem (Composition of Measurable Functions): Let \((X,\mathcal{F})\), \((Y,\mathcal{G})\), and \((Z,\mathcal{H})\) be measurable spaces. Suppose \(f:X\to Y\) is \((\mathcal{F},\mathcal{G})\)-measurable and \(g:Y\to Z\) is \((\mathcal{G},\mathcal{H})\)-measurable. Then \(g\circ f:X\to Z\) is \((\mathcal{F},\mathcal{H})\)-measurable.

Proof. Let \(C\in\mathcal{H}\). Since \(g\) is measurable, \(g^{-1}(C)\in\mathcal{G}\). Since \(f\) is measurable, its preimage under \(f\) is in \(\mathcal{F}\). The preimage identity for a composition gives

$$ (g\circ f)^{-1}(C)=f^{-1}\bigl(g^{-1}(C)\bigr)\in\mathcal{F}. $$

This holds for every \(C\in\mathcal{H}\), which is exactly the definition of measurability of \(g\circ f\). \(\square\)

For instance, if \(f:(X,\mathcal{F})\to\mathbb{R}\) is measurable and \(\varphi:\mathbb{R}\to\mathbb{R}\) is continuous, then \(\varphi\) is measurable as a map from \((\mathbb{R},\mathcal{B}(\mathbb{R}))\) to itself, by the Continuous Preimages of Borel Sets Theorem. The composition theorem implies that \(\varphi\circ f\) is measurable. This includes transformations such as \(x\mapsto x^2\) applied to a measurable real-valued function.

Worked Example: Transforming a Measurable Function

Let \(f:(X,\mathcal{F})\to\mathbb{R}\) be measurable, and define \(h(x)=e^{f(x)}\). The exponential function \(\varphi(t)=e^t\) is continuous on \(\mathbb{R}\), so it is Borel measurable. By the composition theorem, \(h=\varphi\circ f\) is measurable. More explicitly, for any Borel set \(B\subseteq\mathbb{R}\),

$$ h^{-1}(B)=f^{-1}\bigl(\varphi^{-1}(B)\bigr). $$

Continuity of \(\varphi\) ensures that \(\varphi^{-1}(B)\) is Borel, and measurability of \(f\) then ensures that its preimage belongs to \(\mathcal{F}\). For example, for \(B=(1,\infty)\), the exponential function is increasing and \(e^t>1\) exactly when \(t>0\), so

$$ h^{-1}((1,\infty))=f^{-1}((0,\infty))\in\mathcal{F}. $$

The conclusion follows for all Borel target sets, not just this example.

Why Measurability Matters

Measurability is the condition that makes it possible to transfer questions about a function into questions about measurable sets. If \(f:X\to\mathbb{R}\) is measurable, then for every Borel set \(B\), the event \(\{x:f(x)\in B\}\) is measurable in \(X\). In a probability space, this ensures that probabilities such as \(\mathbb{P}(f\in B)\) are defined. In a measure space, it ensures that the measure of such a preimage can be considered.

A common pitfall is to treat measurability as a property of a formula alone. It is a property of the function together with the sigma-algebras on its domain and codomain. For example, the same real-valued function may be measurable when the domain carries the Lebesgue sigma-algebra but fail to be measurable for a smaller sigma-algebra. Always identify the measurable structure being used.

Another important distinction is that measurability is weaker than continuity. The floor function is measurable despite its discontinuities, and indicator functions can be measurable even when they have many discontinuities. The definition asks whether target Borel sets have measurable preimages; it does not ask that small changes in input produce small changes in output.

Key takeaway: A measurable function is one whose preimages of target measurable sets belong to the domain sigma-algebra. Indicators encode measurable sets, countably valued functions are checked through their level sets, and compositions of measurable maps remain measurable.

Check Your Understanding

Use the definitions and results in this tutorial to answer the following questions.

  1. What two sigma-algebras are involved in the definition of a measurable function \(f:X\to Y\)?
  2. Why does measurability of \(\mathbf{1}_A\) imply that \(A\) belongs to the domain sigma-algebra?
  3. For a function with countable range, which sets need to be checked to establish measurability using the countably valued function theorem?
  4. Why is the floor function measurable even though it is discontinuous at every integer?
  5. In the composition theorem, which preimage identity reduces measurability of \(g\circ f\) to measurability of \(f\) and \(g\)?