I am aware of a few example of continuous, nowhere differentiable functions. The most famous is perhaps the Weierstrass functions

$$W(t)=\sum_k^{\infty} a^k\cos\left(b^k t\right)$$

but there are other examples, like the van der Waerden functions, or the Faber functions. Most of these "look like" some variation of:

Weierstrass Function from Wolfram.

(Weierstrass functions from Wolfram)

Specifically, they are clearly not invertible. Since these functions are generally self-similar at many scales, this non-invertability would seem to hold essentially everywhere.

I'm wondering if it's possible to construct such a function which is invertible. Intuitively, maybe this would be "jittery" in the same way as the Weierstrass function, but if it had a slope which always increased, it would be invertible. Or perhaps there is at least an example in which the function is invertible over some segment of the range.

  • 708
  • 7
  • 15
  • 2,481
  • 18
  • 34
  • 6
    Guys, high school level amateur here, why can I not differentiate the individual terms to t and sum them to get the answer as an infinite sum over k of a^k.b^k.sin(b^k.t) ? – HarryH Jul 16 '18 at 19:58
  • 14
    @HarryH: You can't always differentiate a *series* (a sum with *infinitely* many terms) term by term. – Hans Lundmark Jul 16 '18 at 20:12
  • @HansLundmark Yes I looked up the Weierstrass function in wikipedia, sorry to have not done that before asking my question. – HarryH Jul 16 '18 at 20:21
  • 1
    Looking at the graph, why can't you just use W(x)+cx, with c>>1 they should become invertible? – Aganju Jul 17 '18 at 00:57
  • 1
    @Aganju: my intuition for that is "how big should c be?" It essentially behaves like a fractal, with small scale variations. How can you be sure that $c$ will be large enough over a well-controlled range? But indeed, that's why I asked the question is I had something of a similar thought in mind. – levitopher Jul 17 '18 at 01:03
  • 16
    @Aganju basically, you would need to choose $c=\infty$, because the function drops down arbitrary steeply locally. – leftaroundabout Jul 17 '18 at 05:27
  • 1
    @HarryH ... good question. But in the cases where $W(t)$ is nowhere differentiable ($ab>3$ or something), the series of derivatives does not converge. – GEdgar Jul 17 '18 at 21:45
  • @GEdgar Thanks, that is a clear reason you mention here. – HarryH Jul 18 '18 at 08:19
  • 2
    You asked a great question - it's a great question because it has an answer which is both interesting and important. – jwg Jul 19 '18 at 09:39

4 Answers4


Interestingly, there are no such examples! For a continuous function $f : \mathbb{R} \rightarrow \mathbb{R}$ to be invertible, it must be either monotone increasing or decreasing. A famous classical result in analysis, Lebesgue's Monotone Function Theorem, states that any monotone function on an open interval is differentiable almost everywhere. Hence, there are no continuous functions that are invertible and nowhere differentiable.

Alex Nolte
  • 4,249
  • 1
  • 11
  • 24

Invertible implies bijective by set theory, and bijective together with continuity implies strictly increasing or decreasing, which imply differentiability almost everywhere! (This is known as Lebesgue's monotone function theorem.)

A. Thomas Yerger
  • 16,021
  • 2
  • 35
  • 69

If $f:(a,b)\to\Bbb R$ is continuous and injective it must be monotone, hence differentiable almost everywhere.

David C. Ullrich
  • 84,497
  • 5
  • 61
  • 132

I will assume by invertible you mean injective, i.e. bijective on its image. As others have mentioned, there are no such examples among functions from $\mathbb{R}$ to $\mathbb{R}$.

However you might find such examples in other topological spaces.

An example $\mathbb{R} \rightarrow \mathbb{R}^2$ is given by $g(t) = (W(t), t)$ with $W$ the Weierstrass function; it is obviously injective and continuous but nowhere differentiable, considering its projection to the first coordinate.

You can also build an example from $\mathbb{R}^2 \rightarrow \mathbb{R}^2$ by considering $g(t_1, t_2) = (t_1, W(t_1) + t_2)$ or its inverse, given by $g^{-1}(x_1, x_2) = (x_1, x_2 - W(x_1))$.

An injection $\mathbb{R}^2 \rightarrow \mathbb{R}$ cannot be continuous so you won't find a counterexample there.

  • 370
  • 2
  • 10