53
$\begingroup$

There are many "strange" functions to choose from and the deeper you get involved with math the more you encounter. I consciously don't mention any for reasons of bias. I am just curious what you consider strange and especially like.

Please also give a reason why you find this function strange and why you like it. Perhaps you could also give some kind of reference where to find further information.

As usually: Please only mention one function per post - and let the votes decide :-)

$\endgroup$
5
  • 2
    $\begingroup$ m.reddit.com/r/math/comments/9txzv/… $\endgroup$
    – Regenbogen
    Commented Apr 22, 2010 at 14:21
  • $\begingroup$ books.google.com/… $\endgroup$
    – Regenbogen
    Commented Apr 22, 2010 at 14:23
  • $\begingroup$ thank you... would like to see this community's answers and votes! $\endgroup$
    – vonjd
    Commented Apr 22, 2010 at 14:24
  • $\begingroup$ What restrictions, if any, are you placing on the functions? Do they have to be defined (or valued) on the reals or complex numbers, or are functions between arbitrary topological spaces, algebraic objects, unstructured sets etc. acceptable? What about functors between categories? $\endgroup$ Commented Apr 22, 2010 at 14:39
  • 3
    $\begingroup$ Counterexamples in analysis has some nice ones: books.google.nl/… $\endgroup$
    – skupers
    Commented Aug 21, 2010 at 18:40

37 Answers 37

36
$\begingroup$

A Brownian motion sample path.

These are about the most bizarrely behaved continuous functions on $\mathbb{R}^+$ that you can think of. They are nowhere differentiable, have unbounded variation, attain local maxima and minima in every interval... Many, many papers and books have been written about their strange properties.

Edit: As commented, I should clarify the term "sample path". Brownian motion is a stochastic process $B_t$. We say a sample path of Brownian motion has some property if the function $t \mapsto B_t$ has that property almost surely. So, run a Brownian motion, and with probability 1 you will get a function with all these weird properties.

$\endgroup$
1
  • 6
    $\begingroup$ Pedantic, but maybe worth mentioning that these functions have these properties almost surely rather than certainly. $\endgroup$
    – Tom Smith
    Commented Apr 22, 2010 at 20:48
80
$\begingroup$

The empty function $\emptyset:\emptyset\to\emptyset$ is quite strange when you first meet it.

$\endgroup$
12
  • 73
    $\begingroup$ For me, it makes a good argument that the "correct" value for $0^0$ is 1: it's the number of functions from a set with 0 elements to a set with 0 elements. $\endgroup$ Commented Apr 22, 2010 at 19:13
  • 57
    $\begingroup$ And, of course, it gives combinatorial meaning to the fact that 0! = 1, since the empty function is a bijection! $\endgroup$ Commented Apr 23, 2010 at 6:36
  • 9
    $\begingroup$ Elsewhere I have raised the question of whether this function should be considered a constant function. On the one hand, $f(x_1)=f(x_2)$ for every $x_1$ and $x_2$ in the domain; on the other hand, there is no $y$ in the codomain such that for every $x$ we have $f(x)=y$. I consider it non-constant. $\endgroup$ Commented Nov 14, 2010 at 3:29
  • 14
    $\begingroup$ A morphism in a category with terminal object $t$ may be called constant if it factors through $t$. According to this definition, $\emptyset \to S$ is constant iff $S$ is nonempty. $\endgroup$ Commented Jul 16, 2012 at 16:50
  • 4
    $\begingroup$ There are different sensible notions of a constant morphism: nlab.mathforge.org/nlab/show/constant+morphism $\endgroup$ Commented Feb 2, 2013 at 10:09
47
$\begingroup$

The Busy Beaver function

Let Σ be a finite alphabet, for instance {0, 1}; let M be the set of Turing machines with alphabet Σ, and let HM be the set of Turing machines that halt when given the empty string ε as input.

For each MH, Let s(M) be the number of steps performed by M before halting (when given ε as input).

Finally, let S : ℕ → ℕ be the function defined by

S(n) = max {s(M) : MH and M has n states}

Notice that S is well-defined, since only finitely many Turing machines with n states exist.

In other words, S(n) is the maximum number of steps performed on ε among all halting Turing machines with n states. S is called the Busy Beaver function.

It turns out that S is uncomputable because it grows faster than any computable function, that is, for all recursive functions f : ℕ → ℕ we have S(n) > f(n) for large enough n, and in particular f is o(S).

$\endgroup$
2
  • 10
    $\begingroup$ In particular, it grows faster than the Ackermann function. $\endgroup$ Commented Apr 22, 2010 at 19:17
  • 1
    $\begingroup$ @JoelDavidHamkins It's faster than the Ackermann function iterated Graham's number of times. $\endgroup$ Commented Sep 8, 2015 at 0:24
34
$\begingroup$

I like the Cantor function. A continuous, increasing function $f:[0,1]\rightarrow[0,1]$ with derivative $0$ almost everywhere. See wiki article here.

$\endgroup$
3
  • 25
    $\begingroup$ The same is true of $f(x)=\sum_{0<p/q<x} \frac{1}{2^q-1}$, where the sum is over all irreducible fractions $p/q$. But this function is also strictly increasing! $\endgroup$ Commented Apr 23, 2010 at 12:36
  • 3
    $\begingroup$ @KevinO'Bryant I realize it's been over four years, but 18 upvotes notwithstanding, for sure this function is discontinuous at every positive rational number? But I grant you that it is not only continuous, but differentiable at irrational points. $\endgroup$ Commented Aug 17, 2014 at 11:55
  • $\begingroup$ It is definitely discontinuous at rational points. At $p/q$ the difference between the limit from the left and from the right is $1/(2^q-1)$, which is definitely not 0. It is differentiable at irrational $x$, and moreover its derivative is 0 whenever it has one! $\endgroup$ Commented Aug 28, 2014 at 2:47
31
$\begingroup$

The Conway base 13 function has to be the weirdest function I know. This function is continuous nowhere, yet it satisfies the intermediate value theorem. Only John Conway...

$\endgroup$
1
  • $\begingroup$ The function is pretty funny too. It adds +, -, and . as digits in base-13, and then his function interprets it as a base-10 number. $\endgroup$ Commented Sep 8, 2015 at 0:29
30
$\begingroup$

The Ackermann function $A(n,m)$ is defined on the natural numbers by a very simple recursion, but the values grow enormously, almost beyond conception. This function completely transcends any simple-minded system of rates-of-growth based on polynomial, exponential, double-exponential and so on.

The first few values of the diagonal function $A(n) = A(n,n)$ are:

  • $A(0) = 1$
  • $A(1) = 3$
  • $A(2) = 7$
  • $A(3) = 61$
  • $A(4) = 2^{2^{2^{65536}}}-3$
  • $A(5)$ is vast, and can be described in terms of exponential stacks of $2$s, whose height is a stack of $2$s, etc. 5 times.
  • $A(6)$ is so vast, it is best described using the Ackermann function itself.

The levels of the Ackerman function $A_n(m)=A(n,m)$ stratify the primitive recursive functions, in the sense that they are each primitive recursive, but every primitive recursive function is bounded by such a level of the Ackermann function. Thus, the Ackermann function itself is not primitive recursive, although it is computable in the sense of computability theory.

$\endgroup$
4
  • 6
    $\begingroup$ I never really thought of the Ackermann function as being strange, only big. But maybe that's just me. $\endgroup$ Commented Apr 23, 2010 at 12:13
  • 6
    $\begingroup$ Ketil, yes, perhaps I agree. But what is strangely wonderful about it is that the recursive definition A(n+1,m+1)=A(n,A(n+1,m)) is so simple, and yet leads immediately to such incomprehensible growth. $\endgroup$ Commented Apr 23, 2010 at 12:21
  • $\begingroup$ @Joel I HATE the Ackermann function-I lost a whole letter grade on my set theory final because I couldn't construct the damn thing. $\endgroup$ Commented Jul 1, 2010 at 23:20
  • 5
    $\begingroup$ I can't remember where (probably tvtropes), but when reading something about the Ackermann numbers (1 ^ 1, 2 ^^ 2, 3 ^^^ 3, etc), which are related to the Ackermann function, the joke was "it's always weird when looking at a sequence of numbers that goes: 1, 4, too big to count." $\endgroup$ Commented Jul 4, 2010 at 15:39
30
$\begingroup$

I suppose the strangest function in mainstream mathematics is Riemann zeta function http://en.wikipedia.org/wiki/Riemann_zeta_function

$ \zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s} = \frac{1}{1^s} + \frac{1}{2^s} + \frac{1}{3^s} + \cdots \;\;\;\;\;\;\;{Re}(s) >1. $

It is part of one of the most important hypothesis and is very influential in many branch of moder mathematics. It is actively used in many areas and is researched in many ways, it is not curiosity, or exotic example, but important mathematical being!

And is mysterious and strange! Take a look: alt text

$\endgroup$
2
29
$\begingroup$

I'm still quite impressed about $f(x)=\mathrm e^x$ …

$\endgroup$
3
  • 7
    $\begingroup$ Very true, me too! Could you please elaborate on why you consider this function "strange" - thank you. $\endgroup$
    – vonjd
    Commented Apr 23, 2010 at 9:29
  • 5
    $\begingroup$ Because of its stubborn nature: whether you differentiate it, or integrate it, it remains unmoved ;-) $\endgroup$
    – Suvrit
    Commented Nov 13, 2010 at 17:39
  • 8
    $\begingroup$ There's a part of me which has never quite gotten over the Euler identity $e^{ix} = \cos(x) + i\sin(x)$, which was perhaps the biggest intellectual thrill of my early teenage years... $\endgroup$ Commented May 29, 2011 at 23:33
26
$\begingroup$

Thomae's function, also called the "popcorn function". It's continuous at all irrationals and discontinuous at all rationals. Here a picture:

Thomae's function

$\endgroup$
2
22
$\begingroup$

The Weierstrass function is particularly intriguing, as it's a function that's everywhere continuous, but nowhere differentiable.
$f(x)= \sum_{n=0} ^\infty a^n \cos(b^n \pi x)$
where 0<a<1, and b is a positive odd integer such that $ab > 1 + \frac{3\pi}{2}$.
It challenges the notion that, just because a function is continuous, it must also be differentiable in most places, which I think is pretty cool.

$\endgroup$
1
  • $\begingroup$ So is the Brownian sample path, also mentioned in this thread. $\endgroup$ Commented Nov 13, 2010 at 19:16
21
$\begingroup$

Please excuse me if I include two related functions in one answer. Any space filling curve is rather strange, at least for me. Let $\gamma\colon[0,1]\to[0,1]^2$ be such a curve, that is, $\gamma$ is continuous and surjective. Let $\gamma(t)=(x(t),y(t))$; then $x(t)$ (or $y(t)$) is my other candidate for strangest function: given any $z\in[0,1]$, $x^{-1}(z)$ has the cardinality of the continuum.

$\endgroup$
20
$\begingroup$

An unbounded operator with dense graph.

In functional analysis, one deals with unbounded operators on Hilbert space, but usually ones that are closed, or are at least closable. At the opposite end of the spectrum, one can construct linear operators whose graph is dense: for any pair $(x,y)$, there is a sequence $x_n$ such that $x_n \to x$ and $A x_n \to y$ ! It's not so easy even on $\mathbb{R}$ to come up with a function whose graph is dense, and the examples I think of aren't measurable. But in infinite dimensions, you can find one that is linear! It's just an illustration that facts that are trivial in finite dimensions can be horribly, horribly false in infinite dimensions.

A family of examples of this is constructed in

MR0782615 (86i:47052) Lindsay, J. M. A family of operators with everywhere dense graphs. Exposition. Math. 2 (1984), no. 4, 375--378.

Interestingly, as an appplication, Lindsay uses such operators to prove that a Brownian motion sample path is nowhere differentiable --- which is my other favorite strange function!

$\endgroup$
4
  • $\begingroup$ Thank you - perhaps you could create a new post for Brownian Motion then, too?!? $\endgroup$
    – vonjd
    Commented Apr 22, 2010 at 14:48
  • $\begingroup$ The exotic solutions $f : \mathbb{R}\to\mathbb{R}$ to Cauchy's functional equation $f(x+y)=f(x)+f(y)$ have dense graphs. They are obviously linear, but not continuous. (Not sure about measurability). $\endgroup$ Commented Nov 13, 2010 at 14:47
  • $\begingroup$ (I mean $\mathbb{Q}$-linear.) $\endgroup$ Commented Nov 13, 2010 at 14:48
  • $\begingroup$ There's one acting in $\mathcal{C}([0,1])\cup\mathcal{C}([2,3])$. I forgot what it acts like, though. :/ Can you help me? (I'm pretty sure I saw it on wiki.) $\endgroup$ Commented Jul 2, 2015 at 0:19
19
$\begingroup$

The function defined by the power series $f(x)=x-x^2+x^4-x^8+x^{16}-\dots$ What is its limit as $x$ approaches $1$ from below? EDIT (This answer is a trick question.)

$\endgroup$
1
14
$\begingroup$

Minkowski's question mark function if only for the strange $?(\cdot)$ notation.

$\endgroup$
3
13
$\begingroup$

It is pretty obvious after you've seen it, but I like the crinkled curve from Halmos's Hilbert Space Problem book:

Let $f:\mathbb{R}\rightarrow(0,\infty)$ be an $L^2$ function, and define $t\mapsto g_t:\mathbb{R}\rightarrow L^2(\mathbb{R})$ by $$g_t(x)=\chi_{(-\infty,t)}(x) \times f(x).$$

Then $g_t$ has the property that for all $t_1 < t_2 < t_3$ the secants $g_{t_2}-g_{t_1}$ and $g_{t_3}-g_{t_2}$ are mutually orthogonal. (The curve turns a corner at every point.)

$\endgroup$
1
  • $\begingroup$ Heh, that's cute. $\endgroup$ Commented May 29, 2011 at 23:39
10
$\begingroup$

Dirac delta function seems strange to me since the first time I saw it. http://en.wikipedia.org/wiki/Dirac_delta_function

$\endgroup$
8
  • 6
    $\begingroup$ Well, technically the Dirac delta function is a distribution, and not a function. $\endgroup$
    – J.C. Ottem
    Commented Apr 22, 2010 at 14:57
  • 24
    $\begingroup$ Well, it is a function, just not on the space you might think... $\endgroup$ Commented Apr 22, 2010 at 15:42
  • 10
    $\begingroup$ Haha, well everything is a function not on the space you might think. $\endgroup$
    – Tom Ellis
    Commented Apr 22, 2010 at 22:08
  • 15
    $\begingroup$ I heard that after Schwartz got the Fields medal someone quipped "Now they're giving the Fields medal for integration by parts." $\endgroup$
    – Jon
    Commented Apr 23, 2010 at 6:18
  • 34
    $\begingroup$ We used to say that Dirac's delta is the characteristic function of physicists: if you're a physicist, it's a function, otherwise, it isn't. $\endgroup$ Commented Aug 21, 2010 at 20:02
10
$\begingroup$

Interpreting your questions a bit liberally, I suggest the Goodstein sequence:

http://en.wikipedia.org/wiki/Goodstein%27s_theorem

$\endgroup$
10
$\begingroup$

f(x) = sin (1/x): (x not 0); f(x) = 0 (x equals 0)

$\endgroup$
3
  • $\begingroup$ Could you please elaborate a little on that... thanks! $\endgroup$
    – vonjd
    Commented Apr 23, 2010 at 14:20
  • 3
    $\begingroup$ The functions one learns about early in studying mathematics are chosen to illustrate various "issues:' continuity, having a derivative, being periodic, etc. One of the functions one learns about in this way is y = sin(x). So while there are many functions that are "strange," the transition from y = sin (x) to y = sin (1/x) offers I feel lots of nice lessons about functions and their behavior. There are many web sites that use graphics to help one understand what is going on here. One such site is: math.washington.edu/~conroy/general/sin1overx $\endgroup$ Commented Apr 23, 2010 at 15:32
  • $\begingroup$ As an added bonus, you get that the function is connected but not path connected... $\endgroup$ Commented Nov 13, 2010 at 0:57
9
$\begingroup$

These functions like the Cantor function and the continuous-but-not-differentiable function are all well and good, but contrived - the only place you ever see them is as counterexamples. Here is a function that has many uses in Number Theory, and still manages to have a strange property or two. Let $x=h/k$ with $h$ and $k$ integers, $k>0$. Define $$s(x)=\sum_{c=1}^{k-1}((c/k))((ch/k))$$ where $((y))=0$ if $y$ is an integer, $((y))=\lbrace y\rbrace-1/2$ otherwise. It is easily proved that the sum depends only on the ratio of $h$ and $k$, not on their individual values, so $s$ is a well-defined function from the rationals to the rationals. It is known as the Dedekind sum; it came up originally in Dedekind's study of the transformation formula of the Dedekind $\eta$-function.

Now for the strange properties.

Hickerson, Continued fractions and density results for Dedekind sums, J Reine Angew Math 290 (1977) 113-116, MR 55 #12611, proved that the graph of $s$ is dense in the plane.

With Nick Phillips, I proved (Lines full of Dedekind sums, Bull London Math Soc 36 (2004) 547-552, MR 2005m:11075) that, with the exception of the line $y=x/12$, every line through the origin with rational slope passes through infinitely many points on the graph of $s$. We suspect that the points are dense on those lines, though we could only prove it for the line $y=x$.

$\endgroup$
8
$\begingroup$

I like the Theta functions which are given by Fourier-type series. They show up in many areas in mathematics. For example:

i)They are very important in the study of abelian varieties in algebraic geometry (for example, in the case of elliptic curves they are used in the proof of Abel's theorem and are related to Weierstrass $\mathcal{P}-$function).

ii) They satisfy a number of interesting indentities. For example, in the one-dimensional case, they satisfy Jacobi's triple product identity which can be used to show Jacobi's four square theorem

iii) They can be used to solve algebraic equations degree equations explicitly (see this link)

iv) In the one-dimensional case, they solve the heat equation.

$\endgroup$
3
  • 2
    $\begingroup$ But are they strange? $\endgroup$ Commented Apr 23, 2010 at 4:41
  • 2
    $\begingroup$ Well, they are definitely unusual in the sense that they are not taught in school. Also, the fact that they appear in such a variety of mathematical disciplines is also rather surprising. But I see your point. $\endgroup$
    – J.C. Ottem
    Commented Apr 23, 2010 at 7:31
  • 1
    $\begingroup$ I was going to write modular forms, but this is good enough. $\endgroup$ Commented Jul 15, 2010 at 15:21
8
$\begingroup$

The Osgood curve ("A Jordan Curve of Positive Area") is an injective map from [0,1] into $\mathbb{R}^2$ which traces out an image of positive area. (This differs from standard space-filling curves, which are not injective.)

$\endgroup$
6
$\begingroup$

The Banach limit assigns to every bounded sequence of real numbers a real number "limit" in a way that is linear, shift invariant, and agrees with the usual limit whenever it exists. Banach limits are among the mysterious examples of continuous linear functionals on $\ell^\infty$ that aren't represented by elements of $\ell^1$. Unfortunately, the Hahn-Banach theorem is used in the construction of the Banach limit, and the values aren't canonical. There's a precise definition at http://en.wikipedia.org/wiki/Banach_limit .

$\endgroup$
6
$\begingroup$

A canonical example from elementary real analysis - the Blancmange function. Consider $f$ defined piecewise by

$f(x) = x - [x], \quad \text{if} \quad 0 \leq x- [x] \leq \frac{1}{2}$,

and

$f(x) = 1 - (x - [x]), \quad \text{if} \quad \frac{1}{2} < x - [x] < 1$,

(where $[x]$ is the integer part of $x$). Then define the Blancmange function, $B$

$B(x) = \sum_{n=0}^{\infty}\dfrac{1}{2^n} f(2^{n}x)$.

The series converges by the Comparison Test, since $|f(2^{n}x)| \leq \frac{1}{2}$, for all $x \in \mathbb{R}$, and it can be shown that $B$ is uniformly continuous but nowhere differentiable. Here a picture of the function:

Blancmange function

A tasty counterexample to the converse of "differentiability $\implies$ continuity".

$\endgroup$
4
  • $\begingroup$ Huh? The explicit you description you gave is just a sawtooth function. $\endgroup$ Commented Jul 1, 2010 at 23:17
  • $\begingroup$ My bad - I compiled my answer using LaTeX, however I didn't copy the complete post across properly. I will edit now. $\endgroup$ Commented Jul 1, 2010 at 23:25
  • 3
    $\begingroup$ Closely related is the tavuk göğsü function, replete with shredded chicken. $\endgroup$ Commented Jul 1, 2010 at 23:34
  • $\begingroup$ one can describe $f(x)$ as the distance function from $\mathbb{Z}$. $\endgroup$ Commented Nov 2, 2014 at 19:44
5
$\begingroup$

Among the "special" functions encountered in analysis in my view Ingrid Daubechies' waveletes with compact support are the strangest.

$\endgroup$
1
  • 1
    $\begingroup$ Could you please give some more details? Thanks $\endgroup$
    – vonjd
    Commented Apr 22, 2010 at 18:00
5
$\begingroup$

One can construct a natural 'metric' for the Riemann sphere which is equivalent to the spherical metric but which is singular on a dense set of points of the Riemann sphere though remains $L^1$ integrable.

These are built from degree 2 rational maps (first constructed by Mary Rees) which have the whole Riemann sphere as their Julia sets, and have the orbits of their critical points also dense. The Carlesson-Jones-Yoccoz construction of a expanding metric for critically-finite rational maps actually extends to this case, and we get a metric in which this Julia set actually looks as if it was hyperbolic!

[The details are worked out in my PhD thesis, never published as I decided that computer algebra suited me better than complex dynamics].

$\endgroup$
5
$\begingroup$

Since Mariano took my favorite already, I'll go with the stopping time function for the 3x+1 problem: http://www.ieeta.pt/~tos/3x+1.html

$\endgroup$
5
$\begingroup$

Fix a probability $p < 1/2$ of winning an unfair coin toss. For $x \in [0,1]$ rational, let $f(x)$ be the probability that, if you started with $x$ dollars, you could make it to 1 dollar through optimal betting* on the outcome of these coin flips. This function $f(x)$ is obviously weakly increasing on $[0,1]$ (in fact strictly). Less obvious is that it extends to a continuous function on $[0,1]$, whose derivative exists almost everywhere, but that derivative is $0$.

http://www.maa.org/joma/Volume8/Siegrist/RedBlack.pdf

$\endgroup$
5
$\begingroup$

I can't believe no one has mentioned the Dirichlet function:
(I guess it's up to me to bring it up...)

$\endgroup$
3
  • 17
    $\begingroup$ If you plant a post of unit height at every point in $\{(x, y) : x, y \in \mathbb{N}^+\}$ and stand at the origin, looking in the direction of $(1,1)$, you will see this picture. $\endgroup$
    – Max
    Commented Nov 13, 2010 at 13:09
  • $\begingroup$ @Max It's been 3 years since your comment, but I don't think that's precisely the case. Standing at the origin you will see a pole at x-coordinate $\arctan \frac{m}{n}$ with height $\frac{1}{n}$. Here, the pole of height $\frac{1}{n}$ is at x-coordinate $\frac{m}{n}$ instead. $\endgroup$ Commented Feb 19, 2014 at 12:06
  • 1
    $\begingroup$ This image shows a modified version of Dirichlet function = Thomae function or small Riemann function , see mathworld.wolfram.com/DirichletFunction.html $\endgroup$
    – Adam
    Commented May 29, 2018 at 15:35
5
$\begingroup$

Nonconstant continuous locally recurrent functions are quite unintuitive. A real-valued function is locally recurrent on $\mathbb R$ if for every $x_0\in\mathbb R$ and every deleted neighborhood $N(x_0)$ of $x_0$, there exists $x\in N(x_0)$ for which $f(x)=f(x_0)$. Thus in some sense a nonconstant continuous locally recurrent function looks everywhere like $x\sin(1/x)$ at $x=0$. See papers in the American Math. Monthly of Bush (1962), Marcus (1963), and Mauldon (1965).

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .