In mathematics, the **Lebesgue differentiation theorem** is a theorem of real analysis, which states that for almost every point, the value of an integrable function is the limiting average taken around the point. The theorem is named for Henri Lebesgue.

For a Lebesgue integrable real or complex-valued function *f* on **R**^{n}, the indefinite integral is a set function which maps a measurable set *A* to the Lebesgue integral of , where denotes the characteristic function of the set *A*. It is usually written

with

The *derivative* of this integral at *x* is defined to be

where |

The

The stronger assertion is that the right hand side tends to zero for almost every point *x*. The points *x* for which this is true are called the **Lebesgue points** of *f*.

A more general version also holds. One may replace the balls *B* by a family of sets *U* of *bounded eccentricity*. This means that there exists some fixed *c* > 0 such that each set *U* from the family is contained in a ball *B* with . It is also assumed that every point *x* ∈ **R**^{n} is contained in arbitrarily small sets from . When these sets shrink to *x*, the same result holds: for almost every point *x*,

The family of cubes is an example of such a family , as is the family (*m*) of rectangles in **R**^{2} such that the ratio of sides stays between *m*^{−1} and *m*, for some fixed *m* ≥ 1. If an arbitrary norm is given on **R**^{n}, the family of balls for the metric associated to the norm is another example.

The one-dimensional case was proved earlier by Lebesgue (1904). If *f* is integrable on the real line, the function

is almost everywhere differentiable, with Were defined by a Riemann integral this would be essentially the fundamental theorem of calculus, but Lebesgue proved that it remains true when using the Lebesgue integral.

The theorem in its stronger form—that almost every point is a Lebesgue point of a locally integrable function *f*—can be proved as a consequence of the weak–*L*^{1} estimates for the Hardy–Littlewood maximal function. The proof below follows the standard treatment that can be found in Benedetto & Czaja (2009), Stein & Shakarchi (2005), Wheeden & Zygmund (1977) and Rudin (1987).

Since the statement is local in character, *f* can be assumed to be zero outside some ball of finite radius and hence integrable. It is then sufficient to prove that the set

has measure 0 for all *α* > 0.

Let *ε* > 0 be given. Using the density of continuous functions of compact support in *L*^{1}(**R**^{n}), one can find such a function *g* satisfying

It is then helpful to rewrite the main difference as

The first term can be bounded by the value at *x* of the maximal function for *f* − *g*, denoted here by :

The second term disappears in the limit since *g* is a continuous function, and the third term is bounded by |*f*(*x*) − *g*(*x*)|. For the absolute value of the original difference to be greater than 2*α* in the limit, at least one of the first or third terms must be greater than *α* in absolute value. However, the estimate on the Hardy–Littlewood function says that

for some constant *A _{n}* depending only upon the dimension

whence

Since *ε* was arbitrary, it can be taken to be arbitrarily small, and the theorem follows.

The Vitali covering lemma is vital to the proof of this theorem; its role lies in proving the estimate for the Hardy–Littlewood maximal function.

The theorem also holds if balls are replaced, in the definition of the derivative, by families of sets with diameter tending to zero satisfying the *Lebesgue's regularity condition*, defined above as *family of sets with bounded eccentricity*. This follows since the same substitution can be made in the statement of the Vitali covering lemma.

This is an analogue, and a generalization, of the fundamental theorem of calculus, which equates a Riemann integrable function and the derivative of its (indefinite) integral. It is also possible to show a converse – that every differentiable function is equal to the integral of its derivative, but this requires a Henstock–Kurzweil integral in order to be able to integrate an arbitrary derivative.

A special case of the Lebesgue differentiation theorem is the Lebesgue density theorem, which is equivalent to the differentiation theorem for characteristic functions of measurable sets. The density theorem is usually proved using a simpler method (e.g. see Measure and Category).

This theorem is also true for every finite Borel measure on **R**^{n} instead of Lebesgue measure (a proof can be found in e.g. (Ledrappier & Young 1985)). More generally, it is true of any finite Borel measure on a separable metric space such that at least one of the following holds:

- the metric space is a Riemannian manifold,
- the metric space is a locally compact ultrametric space,
- the measure is doubling.

A proof of these results can be found in sections 2.8–2.9 of (Federer 1969).