When Pointwise Equality Is More Than We Need
The previous tutorial established that bounded Riemann integrable functions on a closed bounded interval are Lebesgue integrable, with the same integral. The Lebesgue integral also suggests a broader perspective: two functions may differ at some points yet have the same integral, provided those differences occur only on a null set. The relevant notion is equality almost everywhere.
This tutorial makes that notion precise and treats it as a way of grouping functions. We will prove that it is an equivalence relation and that equivalent integrable functions have equal integrals. This does not say that the functions are pointwise identical. Rather, it identifies a precise sense in which their differences are negligible for integration.
The set \(N\) is an exceptional set: equality is required at every point outside it, but no equality is required inside it. There may be more than one such exceptional set. In particular, the definition is not saying that the set of points where \(f\) and \(g\) differ must itself have been named in advance; it says that this set is contained in a measurable null set.
For Lebesgue measure, every subset of a null set is measurable, by completeness of Lebesgue measure. Thus, if \(f\) and \(g\) are Lebesgue measurable, their disagreement set is measurable as well. The definition above works on a general measure space without requiring completeness, because it allows an exceptional measurable null set containing all points of disagreement.
Almost-Everywhere Equality Is an Equivalence Relation
Proof. For any measurable function \(f\), the equality \(f(x)=f(x)\) holds for every \(x\in X\). The empty set is a measurable null set, so \(f=f\) almost everywhere. This proves reflexivity.
If \(f=g\) outside a measurable null set \(N\), then \(g=f\) at every point outside that same \(N\). Thus \(g=f\) almost everywhere, proving symmetry.
For transitivity, suppose \(f=g\) outside a measurable null set \(N_1\), and \(g=h\) outside a measurable null set \(N_2\). The union \(N_1\cup N_2\) is a measurable null set. At any \(x\notin N_1\cup N_2\), both equalities hold, and hence \(f(x)=g(x)=h(x)\). Therefore \(f=h\) almost everywhere. This proves transitivity.
The theorem means we can divide measurable functions into equivalence classes. Two functions belong to the same class precisely when they are equal almost everywhere. The class of \(f\), written \([f]\), consists of all measurable functions that are equal to \(f\) almost everywhere. A class can contain many pointwise different functions.
Worked Example: A Countable Set of Differences
On \([0,2\pi]\), let \(C=\{\pi/n:n\text{ is a positive integer}\}\), and define \(f(x)=\sin x\) and \(g(x)=\sin x+\mathbf{1}_C(x)\). The set \(C\) is countable, so it is a Lebesgue null set. Both functions are measurable: \(\sin x\) is continuous, and the indicator of the measurable set \(C\) is measurable. They are bounded on this interval and therefore integrable.
For \(x\notin C\), \(\mathbf{1}_C(x)=0\), so \(f(x)=g(x)\). For \(x\in C\), \(\mathbf{1}_C(x)=1\), so \(g(x)=f(x)+1\). In particular, the functions are not pointwise identical, but \(f=g\) almost everywhere. Their integrals are $$ \int_{[0,2\pi]} f\,d\lambda =\int_0^{2\pi}\sin x\,dx =[-\cos x]_0^{2\pi} =-1-(-1)=0 $$ and $$ \int_{[0,2\pi]} g\,d\lambda =\int_{[0,2\pi]} f\,d\lambda +\int_{[0,2\pi]}\mathbf{1}_C\,d\lambda =0+\lambda(C)=0. $$ Here the integral of the indicator is the measure of its set. This example exhibits distinct representatives of the same almost-everywhere equivalence class.
Equivalent Integrable Functions Have the Same Integral
Proof. By linearity for integrable functions, \(h=f-g\) is integrable. Since \(f=g\) outside a measurable null set, \(h=0\) almost everywhere, and hence \(|h|=0\) almost everywhere. The Zero Integral Criterion applied to the nonnegative measurable function \(|h|\) gives $$ \int_X |h|\,d\mu=0. $$ The Absolute-Value Bound for an Integrable Function now yields $$ \left|\int_X h\,d\mu\right| \leq \int_X|h|\,d\mu =0. $$ Therefore \(\int_Xh\,d\mu=0\). Using linearity once more, $$ \int_X f\,d\mu-\int_X g\,d\mu =\int_X(f-g)\,d\mu =\int_Xh\,d\mu =0. $$ Thus \(\int_X f\,d\mu=\int_X g\,d\mu\), as claimed.
The hypotheses matter. The theorem assumes both functions are integrable, so the integrals are finite real numbers and linearity applies. It does not claim that arbitrary functions with infinite integrals have equal integrals whenever they agree almost everywhere; such statements require care with extended values and undefined differences.
Worked Example: Altering Values on the Integers
On \(\mathbb{R}\), define \(f(x)=e^{-|x|}\) and \(g(x)=e^{-|x|}+\mathbf{1}_{\mathbb{Z}}(x)\), where \(\mathbb{Z}\) is the set of integers. The integers are countable and therefore form a Lebesgue null set. The functions are measurable. Also, \(f\) is integrable, and \(\mathbf{1}_{\mathbb{Z}}\) has integral zero, so \(g\) is integrable by linearity.
For every \(x\notin\mathbb{Z}\), \(g(x)=f(x)\); for every integer \(x\), \(g(x)=f(x)+1\). Thus \(f=g\) almost everywhere, although they differ at every integer. Direct calculation gives $$ \int_{\mathbb{R}}f\,d\lambda =\int_{-\infty}^0 e^x\,dx+\int_0^\infty e^{-x}\,dx =1+1=2. $$ Since \(\int_{\mathbb{R}}\mathbf{1}_{\mathbb{Z}}\,d\lambda=\lambda(\mathbb{Z})=0\), it follows that $$ \int_{\mathbb{R}}g\,d\lambda =\int_{\mathbb{R}}f\,d\lambda+0 =2. $$ The integral does not record the changed values on the integers.
Equivalence Classes of Integrable Functions
The invariance theorem allows us to define integration on equivalence classes rather than on individual representatives. Let \(\mathcal{I}\) denote the set of all integrable real-valued measurable functions on \(X\). Consider the set of classes \(\mathcal{I}/\!\sim\), where \(f\sim g\) means \(f=g\) almost everywhere. Define \([f]+[g]=[f+g]\) and \(c[f]=[cf]\) for \(c\in\mathbb{R}\).
Proof. Suppose \(f\sim f'\) and \(g\sim g'\). There are measurable null sets \(N_1,N_2\) outside which \(f=f'\) and \(g=g'\), respectively. Outside \(N_1\cup N_2\), both equalities hold, so \(f+g=f'+g'\). Thus \(f+g\sim f'+g'\), which shows that \([f]+[g]\) is independent of the representatives.
For any scalar \(c\), the equality \(f=f'\) outside \(N_1\) implies \(cf=cf'\) there. Hence \(cf\sim cf'\), so scalar multiplication is also independent of representatives. Sums and scalar multiples of integrable functions are integrable by linearity for integrable functions, so these operations stay within \(\mathcal{I}\).
Finally, if \([f]=[g]\), then \(f=g\) almost everywhere. The Invariance of the Integral Under Almost-Everywhere Equality gives \(\int_X f\,d\mu=\int_X g\,d\mu\). Therefore \(\mathcal{J}([f])\) has the same value whichever representative is used. This proves that the integral is well-defined on the classes.
In this sense, an integrable equivalence class has one unambiguous integral, even though it may have many representatives. The usual pointwise operations on representatives induce the corresponding operations on classes. This construction is the starting point for treating integrable functions as objects identified up to almost-everywhere equality.
Worked Example: Equal Integrals Do Not Guarantee Equivalence
On \(\mathbb{R}\), let \(f=\mathbf{1}_{(0,1)}\) and \(g=\mathbf{1}_{(1,2)}\). Both are measurable and integrable. Their integrals are $$ \int_{\mathbb{R}}f\,d\lambda=\lambda((0,1))=1, \qquad \int_{\mathbb{R}}g\,d\lambda=\lambda((1,2))=1. $$ Thus their integrals are equal.
However, on every \(x\in(0,1)\), \(f(x)=1\) and \(g(x)=0\). The functions therefore disagree on \((0,1)\), a set of measure \(1\), so they are not equal almost everywhere. Equal integrals alone do not determine an equivalence class: the invariance theorem gives a consequence of almost-everywhere equality, not a converse.
What the Equivalence Does—and Does Not—Identify
Almost-everywhere equality is weaker than pointwise equality but stronger than having the same integral. It identifies functions whose disagreement is confined to a null set, and the invariance theorem shows why this identification is natural for integration. In particular, replacing one representative of an integrable class by another cannot change its integral.
A common pitfall is to turn “almost everywhere” into “everywhere.” In the countable-set example, the functions differ at every point of \(C\), even though \(C\) has measure zero. Conversely, another pitfall is to infer almost-everywhere equality merely from equal integrals; the two indicator functions in the final example have equal integrals but differ on sets of positive measure.
The next step is to examine what happens when a function is changed on a null set, including the role of measurability and integrability for the altered function. For now, the central point is that equivalence classes provide a precise language for ignoring null-set differences while retaining a well-defined integral.
Check Your Understanding
Use the definition and the theorems in this tutorial to answer the following questions.
- What property must a measurable exceptional set have for two functions to be equal almost everywhere?
- In the proof of transitivity, why is the union of the two exceptional sets sufficient?
- Which earlier results are used to prove that almost-everywhere equal integrable functions have equal integrals?
- Why do the sum and scalar multiplication of equivalence classes not depend on the representatives chosen?
- Can two integrable functions have equal integrals without being equal almost everywhere? Explain using the indicator-function example.