Tutorials › Measure Theory › Indicator Functions Recover Measure

Integration of Nonnegative Functions · Tutorial 239 of 798

Indicator Functions Recover Measure

See how indicator integrals encode measure, and compute finite sums of indicators by partitioning their sets into disjoint pieces.

Advanced 9 min read

What You'll Learn

  • Derive the integral of an indicator from the definition of a simple-function integral
  • Handle empty sets and sets of zero, finite, or infinite measure
  • Compute finite nonnegative combinations of indicators on disjoint sets
  • Partition overlapping sets to determine the values of a sum of indicators
  • Recover a measure from its integrals of indicator functions
  • Identify why a sum of indicators is not generally the indicator of a union

Indicator Functions Turn Measure into an Integral

An indicator function records membership in a set using only the values zero and one. Its Lebesgue integral therefore has a direct interpretation: it measures the size of the set on which the function equals one. This simple identity is also a way to recover a measure from its integrals. For finite sums of indicators, it gives exact computations once we keep track of how the sets overlap.

Let \((X,\mathcal{M},\mu)\) be a measure space, with no assumption that \(\mu\) is finite, sigma-finite, or complete. A set \(E\) is measurable when \(E\in\mathcal{M}\), and its indicator is the real-valued measurable function \(\chi_E\) defined by \(\chi_E(x)=1\) for \(x\in E\) and \(\chi_E(x)=0\) for \(x\notin E\). For a nonnegative simple function \(s\) taking finitely many distinct positive values \(c_1,\ldots,c_k\), its integral is the sum of each value times the measure of its level set:

$$ \int s\,d\mu=\sum_{j=1}^k c_j\,\mu(\{x\in X:s(x)=c_j\}). $$

Zero-valued level sets contribute nothing and are omitted. If a positive-valued level set has infinite measure, its term, and hence the integral, is \(+\infty\). This is the simple-function integral; no subtraction of infinite quantities occurs.

The Indicator Identity

Theorem: For every \(E\in\mathcal{M}\), in the measure space \((X,\mathcal{M},\mu)\), $$\int \chi_E\,d\mu=\mu(E).$$ Both sides are in \([0,\infty]\). The equality is an equality of extended real numbers, not an almost-everywhere statement.

Proof. If \(E=\varnothing\), then \(\chi_E\) is identically zero and both sides equal zero. If \(E\ne\varnothing\), the only positive value of \(\chi_E\) is \(1\), and its level set is \(\{x:\chi_E(x)=1\}=E\). The simple-function integral formula therefore gives \(\int\chi_E\,d\mu=1\cdot\mu(E)=\mu(E)\). This computation includes \(\mu(E)=0\), finite positive measure, and \(\mu(E)=+\infty\); in the last case the integral is \(+\infty\). \(\square\)

The identity needs measurability of \(E\), so that \(\chi_E\) is measurable and the simple-function integral applies. It needs no finiteness assumption. In particular, on \((\mathbb{R},\mathcal{L},m)\), if \(E\) is Lebesgue measurable, then \(\int\chi_E\,dm=m(E)\); \(E\) need not be Borel. A nonmeasurable set does not fall under this statement: its indicator is not Lebesgue measurable.

Worked Example: An Indicator of an Interval

On \((\mathbb{R},\mathcal{L},m)\), compute \(\int\chi_{[-2,3)}\,dm\).

The set \([-2,3)\) is Lebesgue measurable, so the indicator identity applies. Its Lebesgue measure is the interval length \(3-(-2)=5\). Thus

$$ \int\chi_{[-2,3)}\,dm=m([-2,3))=3-(-2)=5. $$

Check: the function equals \(1\) on an interval of length \(5\) and \(0\) outside it, so the level-set formula also gives \(1\cdot5=5\). If instead \(E=\{0\}\), then \(\chi_E\) is nonzero at \(0\), but \(m(E)=0\), and the same identity gives \(\int\chi_{\{0\}}\,dm=0\).

The integral of an indicator therefore records the measure of its set exactly, even when that measure is infinite. More formally, if \(\mu\) and \(\nu\) are two measures on the same measurable space \((X,\mathcal{M})\), then they agree on all measurable sets if and only if their integrals agree on all indicators. Indeed, \(\int\chi_E\,d\mu=\mu(E)\) and \(\int\chi_E\,d\nu=\nu(E)\) for every \(E\in\mathcal{M}\). Thus equality of the integrals implies \(\mu(E)=\nu(E)\) for every such \(E\); conversely, equality of the measures gives equality of those integrals. No finiteness assumption on either measure is needed.

Finite Nonnegative Combinations

Consider measurable sets \(E_1,\ldots,E_n\in\mathcal{M}\) and finite coefficients \(a_1,\ldots,a_n\ge0\). The function \(f=\sum_{i=1}^n a_i\chi_{E_i}\) is a nonnegative, real-valued simple function. If the sets are disjoint, its value is \(a_i\) on \(E_i\) and zero off their union, so its integral is a sum of the corresponding level-set contributions. If the sets overlap, the value at a point is the sum of all coefficients whose sets contain that point. The following partition formula handles both cases.

Proposition: Let \(E_1,\ldots,E_n\in\mathcal{M}\) and \(a_1,\ldots,a_n\ge0\) be finite real numbers in \((X,\mathcal{M},\mu)\). For each subset \(J\subseteq\{1,\ldots,n\}\), define $$ A_J=\left(\bigcap_{i\in J}E_i\right)\cap \left(\bigcap_{i\notin J}E_i^c\right), \qquad c_J=\sum_{i\in J}a_i. $$ An intersection over no sets means \(X\), and an empty sum is zero. Then $$ \int\left(\sum_{i=1}^n a_i\chi_{E_i}\right)d\mu =\sum_{\substack{J\subseteq\{1,\ldots,n\}\\c_J>0}}c_J\,\mu(A_J). $$ The sum has finitely many terms; its value may be \(+\infty\).

Proof. Each \(A_J\) is measurable because it is a finite intersection of measurable sets and their complements. The sets \(A_J\) are pairwise disjoint: if \(J\ne K\), some index belongs to exactly one of them, and the corresponding intersection requires a point to lie both in \(E_i\) and in \(E_i^c\). They cover \(X\), because every \(x\in X\) determines exactly one membership pattern \(J=\{i:x\in E_i\}\). On \(A_J\), \(\chi_{E_i}\) equals \(1\) exactly for \(i\in J\), so \(f(x)=\sum_{i\in J}a_i=c_J\). The positive level sets of \(f\) are therefore the unions of those \(A_J\) with the same positive value \(c_J\). Applying the simple-function integral formula and the finite additivity of \(\mu\) on disjoint measurable sets gives the displayed sum. Patterns with \(c_J=0\) have value zero and contribute nothing, including when \(\mu(A_J)=+\infty\). \(\square\)

For pairwise disjoint \(E_i\), each point belongs to at most one of the sets, so the only patterns with positive \(c_J\) are singletons \(J=\{i\}\) for which \(a_i>0\). The formula reduces to \(\sum_{i:a_i>0}a_i\mu(E_i)\). For overlapping sets, one must instead account for the value on each membership pattern. This proposition concerns finite combinations with nonnegative coefficients; it does not define the integral of a general signed function.

Worked Example: Disjoint Sets with Different Coefficients

On \((\mathbb{R},\mathcal{L},m)\), let \(E_1=[0,1)\), \(E_2=[2,5)\), and \(f=4\chi_{E_1}+\tfrac12\chi_{E_2}\). Compute \(\int f\,dm\).

The two intervals are disjoint. Their lengths are \(1-0=1\) and \(5-2=3\). The function has value \(4\) on \(E_1\), value \(\tfrac12\) on \(E_2\), and value zero elsewhere. Hence

$$ \int f\,dm=4\cdot1+\frac12\cdot3=4+\frac32=\frac{11}{2}. $$

Check by levels: the set where \(f\ge\tfrac12\) has measure \(1+3=4\), and the set where \(f\ge4\) has measure \(1\). The two positive levels are \(\tfrac12\) and \(4\), so the level-set integral is \(\tfrac12\cdot4+(4-\tfrac12)\cdot1=2+\tfrac72=\tfrac{11}{2}\), in agreement.

Worked Example: Two Overlapping Indicators

On \((\mathbb{R},\mathcal{L},m)\), let \(E_1=[0,2)\), \(E_2=[1,4)\), and \(f=2\chi_{E_1}+3\chi_{E_2}\). Compute its integral, keeping track of the overlap.

The membership patterns divide the union into \([0,1)\), \([1,2)\), and \([2,4)\). Their lengths are \(1-0=1\), \(2-1=1\), and \(4-2=2\), respectively. On these pieces, \(f\) has values \(2\), \(2+3=5\), and \(3\). It is zero outside \([0,4)\). Therefore

$$ \int f\,dm=2\cdot1+5\cdot1+3\cdot2=2+5+6=13. $$

Check by levels: \(\{f\ge2\}=[0,4)\) has measure \(4\); \(\{f\ge3\}=[1,4)\) has measure \(3\); and \(\{f\ge5\}=[1,2)\) has measure \(1\). The successive positive levels are \(2,3,5\), so their increments are \(2,1,2\). The level-set calculation is \(2\cdot4+1\cdot3+2\cdot1=8+3+2=13\), matching the partition calculation. The half-open endpoints specify membership exactly; changing finitely many endpoints would not change these Lebesgue measures.

A Common Overlap Mistake

A frequent error is to replace a sum of indicators by the indicator of the union. For the sets \(E_1=[0,2)\) and \(E_2=[1,4)\), that mistake would give \(\chi_{E_1}+\chi_{E_2}=\chi_{E_1\cup E_2}\), and then assign the integral the value \(m([0,4))=4\). The asserted equality of functions is false: on \([1,2)\), the left side equals \(2\), while the right side equals \(1\). The corrected computation partitions the union: the sum has value \(1\) on \([0,1)\), value \(2\) on \([1,2)\), and value \(1\) on \([2,4)\). Its integral is \(1\cdot1+2\cdot1+1\cdot2=4\). The numerical answer happens to equal the union's measure here, but the functions and their pointwise values are not equal. Multiplying the first indicator by \(2\) and the second by \(3\), as in the preceding example, makes the difference in integral visible: the sum has integral \(13\), not the union's measure \(4\).

There is a separate issue when a set is not measurable. The identity does not license assigning an integral to every set indicator: the indicator must be measurable in the stated measure space. And when \(\mu(E)=+\infty\), the identity still holds, but it says the nonnegative integral is infinite rather than finite. These qualifications keep the formula useful without confusing measurability, finiteness, and the pointwise values of the function.

Check Your Understanding

For each question, state the measure space and verify that every set used is measurable before applying an indicator formula.

  1. On \((\mathbb{R},\mathcal{L},m)\), compute \(\int\chi_{[-3,2)}\,dm\). What changes if the set is \(\{0\}\)?
  2. For disjoint measurable \(E_1,E_2\) and finite \(a,b\ge0\), use the partition formula to compute the integral of \(a\chi_{E_1}+b\chi_{E_2}\).
  3. On \((\mathbb{R},\mathcal{L},m)\), partition \([0,3)\) according to membership in \(E_1=[0,2)\) and \(E_2=[1,3)\), and compute the integral of \(\chi_{E_1}+2\chi_{E_2}\).
  4. Why does \(\int\chi_E\,d\mu=\mu(E)\) remain valid when \(\mu(E)=+\infty\)?
  5. Explain how equality of the integrals of all measurable-set indicators implies equality of two measures on the same measurable space.