In mathematics, a nowhere continuous function, also called an everywhere discontinuous function, is a function that is not continuous at any point of its domain. If f is a function from real numbers to real numbers, then f is nowhere continuous if for each point x there is an ε > 0 such that for each δ > 0 we can find a point y such that 0 < |x − y| < δ and |f(x) − f(y)| ≥ ε. Therefore, no matter how close we get to any fixed point, there are even closer points at which the function takes not-nearby values.
More general definitions of this kind of function can be obtained, by replacing the absolute value by the distance function in a metric space, or by using the definition of continuity in a topological space.
One example of such a function is the indicator function of the rational numbers, also known as the Dirichlet function, named after German mathematician Peter Gustav Lejeune Dirichlet. This function is written IQ and has domain and codomain both equal to the real numbers. IQ(x) equals 1 if x is a rational number and 0 if x is not rational. If we look at this function in the vicinity of some number y, there are two cases:
In less rigorous terms, between any two irrationals, there is a rational, and vice versa.
The Dirichlet function can be constructed as the double pointwise limit of a sequence of continuous functions, as follows: