
Inmeasure theory (a branch ofmathematical analysis), a property holdsalmost everywhere if, in a technical sense, the set for which the property holds takes up nearly all possibilities. The notion of "almost everywhere" is a companion notion to the concept ofmeasure zero, and is analogous to the notion ofalmost surely inprobability theory.
More specifically, a property holds almost everywhere if it holds for all elements in a set except a subset of measure zero,[1][2] or equivalently, if the set of elements for which the property holds isconull. In cases where the measure is notcomplete, it is sufficient that the set be contained within a set of measure zero. When discussing sets ofreal numbers, theLebesgue measure is usually assumed unless otherwise stated.
The termalmost everywhere is abbreviateda.e.;[3] in older literaturep.p. is used, to stand for the equivalentFrench phrasepresque partout.[4]
A set withfull measure is one whose complement is of measure zero. In probability theory, the termsalmost surely,almost certain andalmost always refer toevents withprobability 1 not necessarily including all of the outcomes. These are exactly the sets of full measure in a probability space.
Occasionally, instead of saying that a property holds almost everywhere, it is said that the property holds foralmost all elements (though the termalmost all can also have other meanings).
If is ameasure space, a property is said to hold almost everywhere in if there exists a measurable set with, and all have the property.[5] Another common way of expressing the same thing is to say that "almost every point satisfies", or that "for almost every, holds".
It isnot required that the set has measure zero; it may not be measurable. By the above definition, it is sufficient that be contained in some set that is measurable and has measure zero. However, this technicality vanishes when considering acomplete measure space: if is complete then exists with measure zero if and only if is measurable with measure zero.
As a consequence of the first two properties, it is often possible to reason about "almost every point" of a measure space as though it were an ordinary point rather than an abstraction.[citation needed] This is often done implicitly in informal mathematical arguments. However, one must be careful with this mode of reasoning because of the third bullet above: universal quantification over uncountable families of statements is valid for ordinary points but not for "almost every point".
Outside of the context of real analysis, the notion of a property true almost everywhere is sometimes defined in terms of anultrafilter. An ultrafilter on a setX is a maximal collectionF of subsets ofX such that:
A propertyP of points inX holds almost everywhere, relative to an ultrafilterF, if the set of points for whichP holds is inF.
For example, one construction of thehyperreal number system defines a hyperreal number as an equivalence class of sequences that are equal almost everywhere as defined by an ultrafilter.
The definition ofalmost everywhere in terms of ultrafilters is closely related to the definition in terms of measures, because each ultrafilter defines a finitely-additive measure taking only the values 0 and 1, where a set has measure 1 if and only if it is included in the ultrafilter.