MATHGEEK.com

Zero But Not Quite: The Strange Function That’s Almost Nothing Yet Everything

March 14, 2025 | by Eric

A5FF7E8E-313D-425E-815C-5DFB213A8AC6.png

Zero But Not Quite: The Strange Function That’s Everywhere and Nowhere

Few things in mathematics are more instructive or enlightening than a well-chosen counterexample. Don’t you agree? After all, counterexamples are really just theorems in reverse. By using counterexamples, it’s possible not only to see when a result works, but—more importantly—to see when a result does not work.

When we hear the term “counterexample” in mathematics, many of us immediately think of the Cantor ternary set and the Cantor–Lebesgue function. But today, let’s explore another set and another function that, although not as widely known, are just as fruitful when it comes to producing interesting counterexamples. (Of course, I’m not suggesting we should abandon the Cantor ternary set entirely! In fact, we’ll find it quite useful in our construction.)

Setting Up Our Mathematical Stage

To begin, let \(\mu\) denote Lebesgue measure on the measurable space \((\mathbb{R}, \mathcal{M}(\mathbb{R}))\) where \(\mathbb{R}\) denotes the real line and \(\mathcal{M}(\mathbb{R})\) denotes the Lebesgue measurable subsets of the real line.

For a positive real number \(p\), the set \(L_p(\mathbb{R})\) typically denotes the set of all real-valued Lebesgue measurable functions defined on \(\mathbb{R}\) such that the Lebesgue integral

\[\int_\mathbb{R} |f|^p\, d\mu\]

is finite.

But here’s where things get interesting. Strictly speaking, \(L_p(\mathbb{R})\), when considered to be a normed linear space, is not a set of functions, but is instead a set of equivalence classes of functions in which any two functions equal almost everywhere (with respect to \(\mu\)) are considered to be equivalent.

That is, if \(\mathscr{N}\) denotes the set of all functions that are zero almost everywhere, then a “point” \(f\) in \(L_p(\mathbb{R})\) is really the set \(f\oplus\mathscr{N}\), which consists of all functions of the form \(f+g\) where \(g\in\mathscr{N}\).

So we might ask ourselves: since \(\mathscr{N}\) plays such a prominent role when \(L_p(\mathbb{R})\) is viewed as a normed linear space, what strange functions might be lurking inside this equivalence class of zero?

What’s a Hamel Basis and Why Should We Care?

A subset \(H\) of \(\mathbb{R}\) is said to be a Hamel basis for \(\mathbb{R}\) over the rationals if every nonzero real number may be expressed uniquely as a finite linear combination of distinct elements from \(H\) with nonzero rational coefficients.

But wait—does such an unusual set even exist?

To construct a Hamel basis that will suit our particular requirements, we first need to recall some properties of the Cantor ternary set. The Cantor ternary set \(C\) is an uncountable subset of the interval \([0, 1]\) that has Lebesgue measure zero.

It follows from the standard construction of \(C\) that every point in the interval \([0, 2]\) may be expressed as the sum of two points from \(C\). Thus, if \(A\) denotes the union of the sets obtained when \(C\) is translated by \(n\) for every integer \(n\), then every real number can be written as the sum of two points from \(A\). Note that \(A\) is a Lebesgue null set.

Next, let \(\{a_\beta:\beta < c\}\) denote a well-ordering of the set \(A\). (Such an ordering is always possible due to the axiom of choice.)

Building Our Hamel Basis

We will now use \(A\) to construct a Hamel basis \(H\) for \(\mathbb{R}\).

To begin, if \(a_1\) is nonzero then put \(a_1\) into \(H\); otherwise, put \(a_2\) into \(H\). Next, assume that for a given \(\alpha < c\) it has been decided whether or not to put \(a_\beta\) into \(H\) for all \(\beta < \alpha\). Then, put \(a_\alpha\) into \(H\) if \(a_\alpha\) is not expressible as a finite linear combination of distinct elements already in \(H\) with nonzero rational coefficients.

In this way, the construction of \(H\) is completed with a standard appeal to transfinite induction. Note that \(H\) is a Lebesgue null set since it is a subset of the Lebesgue null set \(A\).

Although any Hamel basis has inner Lebesgue measure zero, there do exist non–Lebesgue measurable Hamel bases if we assume the continuum hypothesis. In any event, however, our Hamel basis is a Lebesgue null set.

But does \(H\) actually satisfy the properties required of a Hamel basis? Let’s check:

First, consider a real number \(x\) and let \(x=y+z\) where \(y\) and \(z\) are from \(A\). It follows from our construction of \(H\) that \(y\) and \(z\) are each expressible as a finite linear combination of distinct elements from \(H\) with nonzero rational coefficients. Thus, \(x\), and hence any real number, may be expressed as such a linear combination.

Assume that a nonzero real number \(x\) has two distinct such representations. Subtracting one of these representations from the other results in a representation of zero as a finite linear combination of distinct elements from \(H\) with nonzero rational coefficients. But such a representation for zero is impossible since otherwise any element of \(H\) could be expressed as a finite linear combination of other elements from \(H\) with nonzero rational coefficients in violation of our construction of \(H\).

Thus, we see that \(H\) is indeed a Hamel basis for the real line over the rationals. Further, this Hamel basis, like the Cantor ternary set, is an uncountable Lebesgue null set.

The Peculiar Function in the Equivalence Class of Zero

At last, we are ready to produce the previously promised peculiar point from \(\mathscr{N}\).

Let \(\psi\) be a mapping of \(H\) onto the real line. (Note that the Cantor set, and hence \(H\), has the same cardinality as the real line.) Extend this function to the entire real line by setting \(\psi(qh)=\psi(h)\) for each \(h\in H\) and each nonzero rational \(q\) and by setting \(\psi(x)=0\) elsewhere.

Now, consider a nonempty interval \(I\) and a real number \(\lambda\). Let \(a\) be an element from \(H\) such that \(\psi(a)=\lambda\). Since there are infinitely many rational multiples of \(a\) in \(I\), it follows that \(\psi\) takes on the value \(\lambda\) infinitely many times inside the interval \(I\).

Indeed, since \(\lambda\) and \(I\) were chosen arbitrarily, it follows that \(\psi\) takes on every real value infinitely many times inside any nonempty interval.

Further, since \(\psi\) is zero off a countable union of Lebesgue null sets, we see that \(\psi\) is zero almost everywhere. Thus, we have a function that is equivalent to zero and yet exhibits pointwise behavior that is very peculiar.

Indeed, although it is almost everywhere zero, its graph is effectively “smeared” over the entire plane! Further, adding \(\psi\) to an integrable function dramatically alters that function’s pointwise properties but does not change its integral at all.

Isn’t that remarkable? This function and the corresponding Hamel basis null set should be included in everyone’s arsenal of counterexamples.

References

  1. Gary L. Wise and Eric B. Hall, Counterexamples in Probability and Real Analysis, Oxford University Press, New York, 1993.
  2. Bernard R. Gelbaum and John M. H. Olmsted, Counterexamples in Analysis, Holden–Day, Oakland, California, 1964.

RELATED POSTS

View all

view all