Types of Set Density
“Dense” and “almost everywhere” both mean “nearly everything,” in different senses. A dense set is near every point; an “almost everywhere” set misses only a set of measure zero. Neither implies the other.
Definitions
Consider a set $A$ of real numbers. Consider any two real numbers $x$ and $y$ such that $x < y$. We say $A$ is dense if there is always a number $a$ in $A$ such that $x < a < y,$ no matter how close together the $x$ and $y$ are.
Consider a set $A \subseteq \reals$. The set $A$ is dense if every open interval contains a point in $A$.
Examples
- The set of rational numbers, $\mathbb{Q}$
-
$\mathbb{Q}$, as a subset of $\reals$
$\mathbb{Q}$ is dense in $\reals$ because every interval contains a rational number.
Non-examples
-
The integers $\mathbb{Z}$
The integers are not dense in $\reals$, because there is no integer between $1$ and $2$.
Properties
- Both $\mathbb{Q}$ and $\reals \setminus \mathbb{Q}$ are dense in $\reals$.
Consider a property of the points of a measure space, which may hold at some points and fail at others. The property holds almost everywhere if the set of points where it fails has measure zero.
Non-examples
-
$\mathbb{Q}$, as a subset of $\reals$
$\mathbb{Q}$ does not hold almost everywhere, because $\mathbb{Q}$ has measure zero.
Consider a set $A \subseteq \reals$. The set $A$ has full measure if the complement $\reals \setminus A$ has measure zero.
Consider a measure $\mu$ on a space $X$ and a measurable set $A \subseteq X$. The set $A$ has full measure if the complement of $A$ has measure zero:
\[\mu(X \setminus A) = 0.\]Non-examples
-
$\mathbb{Q}$, as a subset of $\reals$
$\mathbb{Q}$ does not have full measure in $\reals$, because its complement $\reals \setminus \mathbb{Q}$ does not have measure zero.
Properties
- A set $A$ has full measure if and only if almost every point of $X$ is in $A$.
- A countable intersection of sets of full measure has full measure, because the complement of the intersection is a countable union of sets of measure zero.
- For Lebesgue measure on $\reals^n$, every set of full measure is dense, because every nonempty open set has positive measure and so is not contained in the complement.
- For a probability measure, an event has full measure if and only if its probability is $1$.
Examples
| Example | dense | almost everywhere | full measure | Why |
|---|---|---|---|---|
| $\mathbb{Q}$, as a subset of $\reals$ | ✓ | ✗ | ✗ | |
Missing example: reals_minus_rationals_as_a_subset_of_reals | ||||
Missing example: the_complement_of_a_fat_cantor_set_in_0_1 | ||||
Notes
- “Dense” has another meaning for matrices: a dense matrix has mostly nonzero entries, the opposite of a sparse matrix. It is unrelated to a dense set.