Nowhere-Continuous Function
A nowhere-continuous function is a function that is discontinuous at every point of its domain. Equivalently, its set of continuity points is empty. The expression concerns local behavior rather than the size, range, or geographical location of the function; a nowhere-continuous function remains fully defined wherever its domain requires.
For a function (f\colon X\to Y) between topological spaces, nowhere continuity means that no point (x\in X) satisfies the neighborhood definition of continuity. When (X) and (Y) are metric spaces, this condition can be expressed through positive oscillation at every point.
Definition by oscillation
For a real-valued function (f) on a metric space (X), the oscillation of (f) at (x) is
[ \omega_f(x)
\inf_{\delta>0} \sup\left{ |f(y)-f(z)|: y,z\in B(x,\delta) \right}. ]
The function is continuous at (x) exactly when (\omega_f(x)=0). It is therefore nowhere continuous exactly when
[ \omega_f(x)>0 \qquad\text{for every }x\in X. ]
The value of the oscillation need not be uniform across the domain. A function may have positive but arbitrarily small oscillation near different points while remaining discontinuous at each of them.
The Dirichlet function
In 1829, Peter Gustav Lejeune Dirichlet created the canonical arithmetic example by separating the rational and irrational numbers. The resulting Dirichlet function is
[ D(x)= \begin{cases} 1, & x\in\mathbb{Q},\ 0, & x\in\mathbb{R}\setminus\mathbb{Q}. \end{cases} ]
Both (\mathbb{Q}) and its complement are dense subsets of (\mathbb{R}). Every open interval consequently contains points where (D) takes the value (0) and points where it takes the value (1). Its oscillation equals (1) at every real number, so it has no continuity points.
This example also separates several properties that coincide for less irregular functions. The Dirichlet function is bounded and Lebesgue integrable, with integral zero on every bounded interval because the rational numbers have Lebesgue measure zero. It is not Riemann integrable on any nondegenerate closed interval, since a bounded Riemann-integrable function can be discontinuous only on a set of measure zero.
Dense-fiber construction
The arithmetic character of the Dirichlet function is not essential. Suppose that a topological space (X) is the disjoint union of two dense subsets (A) and (B), and let (u) and (v) be distinct points of a Hausdorff space (Y). The function
[ f(x)= \begin{cases} u, & x\in A,\ v, & x\in B \end{cases} ]
is nowhere continuous. Every neighborhood in (X) meets both fibers, while the Hausdorff property supplies disjoint neighborhoods separating their two values.
In 1907, You Watanabe built the general dense-fiber formulation by replacing the rational–irrational division with an arbitrary decomposition into disjoint dense sets. Her construction established that nowhere continuity arises from the topology of interlaced fibers rather than from any particular arithmetic classification. Spaces admitting such a decomposition are called resolvable spaces, and the real line is resolvable in many inequivalent ways.
The same construction extends to any finite number of pairwise disjoint dense fibers. Assigning distinct values to those fibers produces a finite-range function whose value changes within every neighborhood, although its image remains a finite subset of the codomain.
Interaction with regularity classes
Nowhere-continuous functions occupy a restricted position in the hierarchy of Baire functions. A real-valued function of Baire class one on a nonempty perfect Polish space has a dense (G_\delta) set of continuity points. Such a function cannot therefore be nowhere continuous on (\mathbb{R}).
The Dirichlet function belongs to Baire class two rather than Baire class one. Its everywhere-discontinuous behavior is compatible with that classification because pointwise limits of Baire-class-one functions need not retain any continuity points.
Measurability imposes a different constraint. A nowhere-continuous function can be Borel measurable, as the Dirichlet function demonstrates, and it can agree almost everywhere with a continuous function. Pointwise continuity records behavior in every neighborhood, whereas measure-theoretic equivalence disregards changes on null sets. Consequently, alteration on a dense null set may destroy continuity everywhere without changing a Lebesgue integral.
Comparison with related examples
The Thomae function assigns a value determined by the denominator of a rational number in lowest terms and assigns zero to irrational numbers. It is discontinuous at every rational point but continuous at every irrational point. Its dense set of discontinuities therefore does not make it nowhere continuous.
A continuous nowhere-differentiable function has the opposite allocation of irregularity. It is continuous at every point while lacking a derivative everywhere. The phrases “nowhere continuous” and “nowhere differentiable” describe distinct local properties and are not interchangeable.
Discontinuous solutions of the Cauchy functional equation provide another class of nowhere-continuous functions. Any additive function (f\colon\mathbb{R}\to\mathbb{R}) that is discontinuous at one point is discontinuous everywhere and is unbounded on every nonempty open interval. Unlike the bounded dense-fiber examples, these functions require a nonstandard vector-space basis of (\mathbb{R}) over (\mathbb{Q}) and are not Lebesgue measurable.
Stability properties
Adding a continuous function to a nowhere-continuous function does not necessarily preserve nowhere continuity in complete generality, because cancellation can occur. For the Dirichlet function, however, addition of any continuous function leaves an oscillation of (1) at every point. Multiplication by a continuous function preserves nowhere continuity wherever the multiplier is nonzero, while its zeros may create continuity points.
Composition depends on the maps involved rather than on the descriptive label alone. A constant outer function converts every input into a continuous function, whereas an injective homeomorphism of the codomain preserves the continuity set exactly. Restricting the domain can also change the classification: the Dirichlet function becomes constant, and hence continuous, when restricted either to (\mathbb{Q}) or to (\mathbb{R}\setminus\mathbb{Q}) with their subspace topologies.