Density as a Local Proportion
A measurable set can be complicated at every scale, so membership alone does not describe how much of a small neighborhood it occupies. Density measures that local proportion. The key fact is that, at almost every point belonging to a measurable set, the proportion of nearby points that remain in the set tends to one. The proof is a direct application of differentiation to an indicator function; the exceptional points are allowed, and examples show why they cannot simply be discarded from pointwise calculations.
Throughout, \(m\) denotes Lebesgue measure on \(\mathbb{R}^n\), with its complete Lebesgue sigma-algebra \(\mathcal{L}\). This measure is sigma-finite and finite on bounded sets. For \(x\in\mathbb{R}^n\) and \(r>0\), let \(B(x,r)\) be the open Euclidean ball. Its measure is positive and finite. If \(E\in\mathcal{L}\), then \(\chi_E:\mathbb{R}^n\to\{0,1\}\) is a measurable, real-valued function and is integrable on every bounded set.
The numerator is the measure of the part of the ball lying in \(E\), while the denominator is the measure of the whole ball. The ratio therefore lies in \([0,1]\). In dimension \(n=1\), \(B(x,r)=(x-r,x+r)\) has length \(2r\); in higher dimensions the volume of the ball still cancels when the ratio is formed, but the shape of the neighborhoods is specified by the Euclidean balls.
The Density Theorem
We use the Lebesgue differentiation theorem on \(\mathbb{R}^n\), with Lebesgue measure \(m\): if \(f:\mathbb{R}^n\to\mathbb{R}\) is locally integrable, meaning \(\int_K|f|\,dm<\infty\) for every compact set \(K\), then for \(m\)-almost every \(x\), \(\displaystyle\lim_{r\downarrow0}\frac{1}{m(B(x,r))}\int_{B(x,r)}f\,dm=f(x)\). The theorem is an established result of the earlier material on differentiation; its hypotheses, including local integrability, are checked in the application below.
Proof. Apply the Lebesgue differentiation theorem to \(f=\chi_E\). The function is measurable and real-valued, and for every compact set \(K\), \(\int_K|\chi_E|\,dm\le m(K)<\infty\), so it is locally integrable. Hence there is an \(m\)-null measurable set \(N\) such that for each \(x\notin N\), the averages of \(\chi_E\) over \(B(x,r)\) tend to \(\chi_E(x)\). For every \(x\in\mathbb{R}^n\) and \(r>0\), the definition of the Lebesgue integral of an indicator gives \(\int_{B(x,r)}\chi_E\,dm=m(E\cap B(x,r))\). If \(x\in E\setminus N\), then \(\chi_E(x)=1\). Substituting the integral identity into the differentiation conclusion gives the stated density limit equal to \(1\). Thus all points of \(E\) outside the null set \(N\) have density one, as required. \(\square\)
The theorem does not require \(E\) to have finite measure. Local integrability is enough: on each bounded ball the indicator is bounded by \(1\), and the ball has finite measure. Nor does the theorem say that every point of \(E\) is a density-one point. It makes an almost-everywhere assertion with respect to \(m\).
Proof. The complement \(E^c\) is Lebesgue measurable, and its indicator is locally integrable by the same boundedness argument. Apply the Density Theorem to \(E^c\): outside an \(m\)-null set, each \(x\in E^c\) satisfies \(\displaystyle m(E^c\cap B(x,r))/m(B(x,r))\to1\). For every \(x\) and \(r>0\), the sets \(E\cap B(x,r)\) and \(E^c\cap B(x,r)\) are disjoint and have union \(B(x,r)\). Additivity of \(m\) on these disjoint measurable sets therefore gives \[ \frac{m(E\cap B(x,r))}{m(B(x,r))} =1-\frac{m(E^c\cap B(x,r))}{m(B(x,r))}. \] Taking \(r\downarrow0\) proves that the left-hand ratio tends to \(0\) at almost every \(x\in E^c\). \(\square\)
Worked Densities
Worked Example: Interior Points and Endpoints of an Interval
Let \(E=[2,5]\subset\mathbb{R}\), with Lebesgue measure \(m\). Compute the density at \(x=3\), \(x=2\), and \(x=1\). At \(x=3\), if \(0<r<1\), then \(B(3,r)=(3-r,3+r)\subset[2,5]\), so the intersection has length \(2r\). The ball has length \(2r\) as well, and the ratio is \(2r/(2r)=1\) for every such \(r\). Thus the density at \(3\) is \(1\).
At \(x=2\), if \(0<r<3\), then \(B(2,r)=(2-r,2+r)\) and \(E\cap B(2,r)=[2,2+r)\). The intersection has length \(r\), and the ball has length \(2r\). The ratio is \(r/(2r)=1/2\) for every such \(r\), so the density at \(2\) is \(1/2\), not \(1\). At \(x=1\), if \(0<r<1\), then \(B(1,r)=(1-r,1+r)\) does not meet \(E\), so the ratio is \(0/(2r)=0\). The three calculations agree with the expected interior, endpoint, and exterior behavior.
Worked Example: A Boundary Point of Two Intervals
Let \(E=[0,1]\cup[2,3]\subset\mathbb{R}\), and take \(x=1\). For \(0<r<1\), the ball is \(B(1,r)=(1-r,1+r)\). Its intersection with the first interval is \((1-r,1]\), of length \(r\); it does not reach the second interval because \(1+r<2\). Thus \(m(E\cap B(1,r))=r\), while \(m(B(1,r))=2r\). The ratio is \(r/(2r)=1/2\) at every such radius, so the density at \(1\) is \(1/2\).
For comparison, take \(x=3/2\). If \(0<r<1/2\), then \(B(3/2,r)\) lies in the gap between the two intervals and does not meet \(E\). The numerator is \(0\), the denominator is \(2r>0\), and the ratio is \(0/(2r)=0\). The point \(1\) belongs to \(E\) but is not a density-one point; the point \(3/2\) lies outside \(E\) and has density zero in \(E\). These pointwise facts are compatible with the theorem because the interval endpoints form a finite, hence null, set.
Worked Example: A Dense Null Set
Let \(E=\mathbb{Q}\cap[0,1]\subset\mathbb{R}\). The set is countable. Every singleton has Lebesgue measure zero, and countable subadditivity therefore gives \(m(E)=0\). For any \(x\in\mathbb{R}\) and any \(r>0\), \(E\cap B(x,r)\subseteq E\), so \(0\le m(E\cap B(x,r))\le m(E)=0\). Consequently, for every \(x\) and \(r>0\), \(\displaystyle m(E\cap B(x,r))/m(B(x,r))=0/(2r)=0\). The density of \(E\) is zero at every point, including every point of \(E\).
This example also shows why density is not a count of how many points are present. The rationals in \([0,1]\) are dense in that interval, but they occupy zero Lebesgue measure in every ball. There is no conflict with the Density Theorem: its assertion about almost every point of \(E\) is vacuous when \(m(E)=0\), since the whole set \(E\) is already null.
What the Almost-Everywhere Qualification Allows
Applying the differentiation theorem to an indicator function turns a global measure-theoretic statement into a local geometric one. At almost every point of \(E\), small balls are occupied by \(E\) in a proportion tending to one. At almost every point of \(E^c\), the proportion occupied by \(E\) tends to zero. This is useful whenever a measurable set is studied through its local behavior, rather than only through its total measure.
The qualification “almost every” is essential. In the interval example, the endpoint \(2\) belongs to \(E=[2,5]\) but has density \(1/2\). A tempting but incorrect calculation would say that \(B(2,r)\) “lies in \(E\) on the relevant side,” count the full ball as having intersection length \(2r\), and conclude density \(2r/(2r)=1\). The correction is that the ball is \((2-r,2+r)\): its portion inside \([2,5]\) has length only \(r\), while the ball itself has length \(2r\). The correct ratio is \(r/(2r)=1/2\).
In general, one must calculate both the intersection and the full ball at the same radius. The theorem supplies a conclusion outside a null exceptional set; it does not remove the need to check special points directly, and it does not assert that the density limit exists at every point. In particular, membership in \(E\) alone does not force density one, while a null set can contain points—and even be dense—without having positive density anywhere.
Check Your Understanding
For each question, identify the measurable set and the measure being used, and distinguish the pointwise calculation from the almost-everywhere theorem.
- For \(E=[-1,2]\subset\mathbb{R}\), compute the density at \(x=0\) and at \(x=-1\). State a range of radii on which each ratio is constant.
- Explain why the indicator \(\chi_E\) is locally integrable for every Lebesgue measurable \(E\subseteq\mathbb{R}^n\), even if \(m(E)=\infty\).
- Use the complement identity to show how density one for \(E^c\) at a point implies density zero for \(E\) there.
- If \(N\subseteq\mathbb{R}^n\) is a Lebesgue measurable null set, what is the density of \(N\) at any \(x\in\mathbb{R}^n\)? Justify the answer using the measure of \(N\cap B(x,r)\).
- Why does the density theorem not imply that every point of a measurable set has density one? Give an interval endpoint as a counterexample.