characteristic function
The characteristic function of a set is the simplest possible description of membership: it answers “are you in the set?” with a 1 for yes and a 0 for no. It turns a set into a function — a switch that is on exactly over the set and off everywhere else. It is the atom from which simple functions, and through them the Lebesgue integral, are built.
Formally, for a subset E of a space X, the characteristic function 1_E (also written chi_E) is defined by 1_E(x) = 1 if x belongs to E, and 1_E(x) = 0 if x does not belong to E. The function 1_E is measurable if and only if E is a measurable set, and in that case it is the basic example of a simple function. Its Lebesgue integral over X equals mu(E): integrating the indicator simply recovers the measure of the set.
Characteristic functions translate set operations into arithmetic, which is why they are so convenient: 1 of an intersection equals the product of the indicators, 1 of a complement equals 1 minus the indicator, and for disjoint sets 1 of a union equals the sum. A word of caution on terminology: in probability and in some areas the phrase “characteristic function” means the Fourier transform of a distribution — an entirely different object. In measure theory it always means the indicator.
The Dirichlet function is 1_Q, the characteristic function of the rationals: 1 at every rational, 0 at every irrational. Since m(Q) = 0, its Lebesgue integral over [0, 1] is m(Q intersect [0,1]) = 0, matching the rule integral of 1_E equals m(E).
Integrating an indicator returns the measure of its set.