# 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 $f$ is a function from real numbers to real numbers, then $f$ is nowhere continuous if for each point $x$ there is some $\varepsilon >0$ such that for every $\delta >0,$ we can find a point $y$ such that $|x-y|<\delta$ and $|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 $\mathbf {1} _{\mathbb {Q} }$ and has domain and codomain both equal to the real numbers. By definition, $\mathbf {1} _{\mathbb {Q} }(x)$ is equal to $1$ if $x$ is a rational number and it is $0$ otherwise.
More generally, if $E$ is any subset of a topological space $X$ such that both $E$ and the complement of $E$ are dense in $X,$ then the real-valued function which takes the value $1$ on $E$ and $0$ on the complement of $E$ will be nowhere continuous. Functions of this type were originally investigated by Peter Gustav Lejeune Dirichlet.

### Non-trivial additive functions

A function $f:\mathbb {R} \to \mathbb {R}$ is called an additive function if it satisfies Cauchy's functional equation: $f(x+y)=f(x)+f(y)\quad {\text{ for all }}x,y\in \mathbb {R} .$ For example, every map of form $x\mapsto cx,$ where $c\in \mathbb {R}$ is some constant, is additive (in fact, it is linear and continuous). Furthermore, every linear map $L:\mathbb {R} \to \mathbb {R}$ is of this form (by taking $c:=L(1)$).
Although every linear map is additive, not all additive maps are linear. An additive map $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 $\mathbb {R} \to \mathbb {R}$ is discontinuous at every point of its domain. Nevertheless, the restriction of any additive function $f:\mathbb {R} \to \mathbb {R}$ to any real scalar multiple of the rational numbers $\mathbb {Q}$ is continuous; explicitly, this means that for every real $r\in \mathbb {R} ,$ the restriction $f{\big \vert }_{r\mathbb {Q} }:r\,\mathbb {Q} \to \mathbb {R}$ to the set $r\,\mathbb {Q} :=\{rq:q\in \mathbb {Q} \}$ is a continuous function. Thus if $f:\mathbb {R} \to \mathbb {R}$ is a non-linear additive function then for every point $x\in \mathbb {R} ,$ $f$ is discontinuous at $x$ but $x$ is also contained in some dense subset $D\subseteq \mathbb {R}$ on which $f$'s restriction $f\vert _{D}:D\to \mathbb {R}$ is continuous (specifically, take $D:=x\,\mathbb {Q}$ if $x\neq 0,$ and take $D:=\mathbb {Q}$ if $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 $f$ is nowhere continuous if its natural hyperreal extension has the property that every $x$ is infinitely close to a $y$ such that the difference $f(x)-f(y)$ is appreciable (that is, not infinitesimal).