# Nowhere continuous function

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 ${\displaystyle f}$ is a function from real numbers to real numbers, then ${\displaystyle f}$ is nowhere continuous if for each point ${\displaystyle x}$ there is some ${\displaystyle \varepsilon >0}$ such that for every ${\displaystyle \delta >0,}$ we can find a point ${\displaystyle y}$ such that ${\displaystyle |x-y|<\delta }$ and ${\displaystyle |f(x)-f(y)|\geq \varepsilon }$. Therefore, no matter how close it gets 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.

## Examples

### Dirichlet function

One example of such a function is the indicator function of the rational numbers, also known as the Dirichlet function. This function is denoted as ${\displaystyle \mathbf {1} _{\mathbb {Q} }}$ and has domain and codomain both equal to the real numbers. By definition, ${\displaystyle \mathbf {1} _{\mathbb {Q} }(x)}$ is equal to ${\displaystyle 1}$ if ${\displaystyle x}$ is a rational number and it is ${\displaystyle 0}$ if ${\displaystyle x}$ otherwise.

More generally, if ${\displaystyle E}$ is any subset of a topological space ${\displaystyle X}$ such that both ${\displaystyle E}$ and the complement of ${\displaystyle E}$ are dense in ${\displaystyle X,}$ then the real-valued function which takes the value ${\displaystyle 1}$ on ${\displaystyle E}$ and ${\displaystyle 0}$ on the complement of ${\displaystyle E}$ will be nowhere continuous. Functions of this type were originally investigated by Peter Gustav Lejeune Dirichlet.[1]

A function ${\displaystyle f:\mathbb {R} \to \mathbb {R} }$ is called an additive function if it satisfies Cauchy's functional equation: ${\displaystyle f(x+y)=f(x)+f(y)\quad {\text{ for all }}x,y\in \mathbb {R} .}$ For example, every map of form ${\displaystyle x\mapsto cx,}$ where ${\displaystyle c\in \mathbb {R} }$ is some constant, is additive (in fact, it is linear and continuous). Furthermore, every linear map ${\displaystyle L:\mathbb {R} \to \mathbb {R} }$ is of this form (by taking ${\displaystyle c:=L(1)}$).

Although every linear map is additive, not all additive maps are linear. An additive map ${\displaystyle f:\mathbb {R} \to \mathbb {R} }$ is linear if and only if there exists a point at which it is continuous, in which case it is continuous everywhere. Consequently, every non-linear additive function ${\displaystyle \mathbb {R} \to \mathbb {R} }$ is discontinuous at every point of its domain. Nevertheless, the restriction of any additive function ${\displaystyle f:\mathbb {R} \to \mathbb {R} }$ to any real scalar multiple of the rational numbers ${\displaystyle \mathbb {Q} }$ is continuous; explicitly, this means that for every real ${\displaystyle r\in \mathbb {R} ,}$ the restriction ${\displaystyle f{\big \vert }_{r\mathbb {Q} }:r\,\mathbb {Q} \to \mathbb {R} }$ to the set ${\displaystyle r\,\mathbb {Q} :=\{rq:q\in \mathbb {Q} \}}$ is a continuous function. Thus if ${\displaystyle f:\mathbb {R} \to \mathbb {R} }$ is a non-linear additive function then for every point ${\displaystyle x\in \mathbb {R} ,}$ ${\displaystyle f}$ is discontinuous at ${\displaystyle x}$ but ${\displaystyle x}$ is also contained in some dense subset ${\displaystyle D\subseteq \mathbb {R} }$ on which ${\displaystyle f}$'s restriction ${\displaystyle f\vert _{D}:D\to \mathbb {R} }$ is continuous (specifically, take ${\displaystyle D:=x\,\mathbb {Q} }$ if ${\displaystyle x\neq 0,}$ and take ${\displaystyle D:=\mathbb {Q} }$ if ${\displaystyle x=0}$).

### Discontinuous linear maps

A linear map between two topological vector spaces, such as normed spaces for example, is continuous (everywhere) if and only if there exists a point at which it is continuous, in which case it is even uniformly continuous. Consequently, every linear map is either continuous everywhere or else continuous nowhere. Every linear functional is a linear map and on every infinite-dimensional normed space, there exists some discontinuous linear functional.

### Other functions

The Conway base 13 function is discontinuous at every point.

## Hyperreal characterisation

A real function ${\displaystyle f}$ is nowhere continuous if its natural hyperreal extension has the property that every ${\displaystyle x}$ is infinitely close to a ${\displaystyle y}$ such that the difference ${\displaystyle f(x)-f(y)}$ is appreciable (that is, not infinitesimal).

• Blumberg theorem – even if a real function ${\displaystyle f:\mathbb {R} \to \mathbb {R} }$ is nowhere continuous, there is a dense subset ${\displaystyle D}$ of ${\displaystyle \mathbb {R} }$ such that the restriction of ${\displaystyle f}$ to ${\displaystyle D}$ is continuous.