Lebesgue's density theorem
Template:Short description In mathematics, Lebesgue's density theorem states that for any Lebesgue measurable set , the "density" of is 0 or 1 at almost every point in . Additionally, the "density" of is 1 at almost every point of . Intuitively, this means that the boundary of , the set of points in for which all neighborhoods are partially in and partially outside , is of measure zero.

Statement
Let be the Lebesgue measure on the Euclidean space and be a Lebesgue measurable set. Let and let ε denote the open ball of radius centered at . Define the density at a point
For example, given a square in the plane, the density at every point inside the square is 1, on the edges is 1/2, and at the corners is 1/4. The set of points in the plane at which the density is neither 0 nor 1 is non-empty (the square boundary), but it is of measure zero.
The Lebesgue density theorem is a particular case of the Lebesgue differentiation theorem.
Thus, this theorem is also true for every finite Borel measure on instead of Lebesgue measure, as proven in sections 2.8–2.9 of Federer's Geometric Measure Theory, 1969.