# Measurable function

Short description: Function for which the preimage of a measurable set is measurable

In mathematics and in particular measure theory, a measurable function is a function between the underlying sets of two measurable spaces that preserves the structure of the spaces: the preimage of any measurable set is measurable. This is in direct analogy to the definition that a continuous function between topological spaces preserves the topological structure: the preimage of any open set is open. In real analysis, measurable functions are used in the definition of the Lebesgue integral. In probability theory, a measurable function on a probability space is known as a random variable.

## Formal definition

Let $\displaystyle{ (X,\Sigma) }$ and $\displaystyle{ (Y,\Tau) }$ be measurable spaces, meaning that $\displaystyle{ X }$ and $\displaystyle{ Y }$ are sets equipped with respective $\displaystyle{ \sigma }$-algebras $\displaystyle{ \Sigma }$ and $\displaystyle{ \Tau. }$ A function $\displaystyle{ f:X\to Y }$ is said to be measurable if for every $\displaystyle{ E\in \Tau }$ the pre-image of $\displaystyle{ E }$ under $\displaystyle{ f }$ is in $\displaystyle{ \Sigma }$; that is, for all $\displaystyle{ E \in \Tau }$ $\displaystyle{ f^{-1}(E) := \{ x\in X \mid f(x) \in E \} \in \Sigma. }$

That is, $\displaystyle{ \sigma (f)\subseteq\Sigma, }$ where $\displaystyle{ \sigma (f) }$ is the σ-algebra generated by f. If $\displaystyle{ f:X\to Y }$ is a measurable function, we will write $\displaystyle{ f \colon (X, \Sigma) \rightarrow (Y, \Tau). }$ to emphasize the dependency on the $\displaystyle{ \sigma }$-algebras $\displaystyle{ \Sigma }$ and $\displaystyle{ \Tau. }$

## Term usage variations

The choice of $\displaystyle{ \sigma }$-algebras in the definition above is sometimes implicit and left up to the context. For example, for $\displaystyle{ \R, }$ $\displaystyle{ \Complex, }$ or other topological spaces, the Borel algebra (containing all the open sets) is a common choice. Some authors define measurable functions as exclusively real-valued ones with respect to the Borel algebra.

If the values of the function lie in an infinite-dimensional vector space, other non-equivalent definitions of measurability, such as weak measurability and Bochner measurability, exist.

## Notable classes of measurable functions

• Random variables are by definition measurable functions defined on probability spaces.
• If $\displaystyle{ (X, \Sigma) }$ and $\displaystyle{ (Y, T) }$ are Borel spaces, a measurable function $\displaystyle{ f:(X, \Sigma) \to (Y, T) }$ is also called a Borel function. Continuous functions are Borel functions but not all Borel functions are continuous. However, a measurable function is nearly a continuous function; see Luzin's theorem. If a Borel function happens to be a section of a map $\displaystyle{ Y\xrightarrow{~\pi~}X, }$ it is called a Borel section.
• A Lebesgue measurable function is a measurable function $\displaystyle{ f : (\R, \mathcal{L}) \to (\Complex, \mathcal{B}_\Complex), }$ where $\displaystyle{ \mathcal{L} }$ is the $\displaystyle{ \sigma }$-algebra of Lebesgue measurable sets, and $\displaystyle{ \mathcal{B}_\Complex }$ is the Borel algebra on the complex numbers $\displaystyle{ \Complex. }$ Lebesgue measurable functions are of interest in mathematical analysis because they can be integrated. In the case $\displaystyle{ f : X \to \R, }$ $\displaystyle{ f }$ is Lebesgue measurable if and only if $\displaystyle{ \{f \gt \alpha\} = \{ x\in X : f(x) \gt \alpha\} }$ is measurable for all $\displaystyle{ \alpha\in\R. }$ This is also equivalent to any of $\displaystyle{ \{f \geq \alpha\},\{f\lt \alpha\},\{f\le\alpha\} }$ being measurable for all $\displaystyle{ \alpha, }$ or the preimage of any open set being measurable. Continuous functions, monotone functions, step functions, semicontinuous functions, Riemann-integrable functions, and functions of bounded variation are all Lebesgue measurable. A function $\displaystyle{ f:X\to\Complex }$ is measurable if and only if the real and imaginary parts are measurable.

## Properties of measurable functions

• The sum and product of two complex-valued measurable functions are measurable. So is the quotient, so long as there is no division by zero.
• If $\displaystyle{ f : (X,\Sigma_1) \to (Y,\Sigma_2) }$ and $\displaystyle{ g:(Y,\Sigma_2) \to (Z,\Sigma_3) }$ are measurable functions, then so is their composition $\displaystyle{ g\circ f:(X,\Sigma_1) \to (Z,\Sigma_3). }$
• If $\displaystyle{ f : (X,\Sigma_1) \to (Y,\Sigma_2) }$ and $\displaystyle{ g:(Y,\Sigma_3) \to (Z,\Sigma_4) }$ are measurable functions, their composition $\displaystyle{ g\circ f: X\to Z }$ need not be $\displaystyle{ (\Sigma_1,\Sigma_4) }$-measurable unless $\displaystyle{ \Sigma_3 \subseteq \Sigma_2. }$ Indeed, two Lebesgue-measurable functions may be constructed in such a way as to make their composition non-Lebesgue-measurable.
• The (pointwise) supremum, infimum, limit superior, and limit inferior of a sequence (viz., countably many) of real-valued measurable functions are all measurable as well.
• The pointwise limit of a sequence of measurable functions $\displaystyle{ f_n: X \to Y }$ is measurable, where $\displaystyle{ Y }$ is a metric space (endowed with the Borel algebra). This is not true in general if $\displaystyle{ Y }$ is non-metrizable. Note that the corresponding statement for continuous functions requires stronger conditions than pointwise convergence, such as uniform convergence.

## Non-measurable functions

Real-valued functions encountered in applications tend to be measurable; however, it is not difficult to prove the existence of non-measurable functions. Such proofs rely on the axiom of choice in an essential way, in the sense that Zermelo–Fraenkel set theory without the axiom of choice does not prove the existence of such functions.

In any measure space $\displaystyle{ (X, \Sigma) }$ with a non-measurable set $\displaystyle{ A \subset X, }$ $\displaystyle{ A \notin \Sigma, }$ one can construct a non-measurable indicator function: $\displaystyle{ \mathbf{1}_A:(X,\Sigma) \to \R, \quad \mathbf{1}_A(x) = \begin{cases} 1 & \text{ if } x \in A \\ 0 & \text{ otherwise}, \end{cases} }$ where $\displaystyle{ \R }$ is equipped with the usual Borel algebra. This is a non-measurable function since the preimage of the measurable set $\displaystyle{ \{1\} }$ is the non-measurable $\displaystyle{ A. }$

As another example, any non-constant function $\displaystyle{ f : X \to \R }$ is non-measurable with respect to the trivial $\displaystyle{ \sigma }$-algebra $\displaystyle{ \Sigma = \{\varnothing, X\}, }$ since the preimage of any point in the range is some proper, nonempty subset of $\displaystyle{ X, }$ which is not an element of the trivial $\displaystyle{ \Sigma. }$