Hey! It’s Tivadar from The Palindrome.
Today, we’ll do an excursion into one of the weirder part of mathematics: real-valued functions. I’m serious. Real functions (and even real number) are particularly intricate and often wild.
As Charles Hermite famously wrote in an 1893 letter to his colleague Thomas Stieltjes, “I turn with terror and horror from this lamentable scourge of continuous functions with no derivatives.”
In this post, we'll see what caused Hermite to rage, and how weird eventually became normal, and normal became weird.
If you enjoy my content, a paid subscription is the best way to support me. I do this full time, and your support enables me to keep democratizing mathematics and machine learning, one post at a time.
Paid subscribers get:
exclusive paid articles
a special thanks and mention in the posts and videos,
and the full archive of 200+ math-and-machine-learning-packed posts, also available as a beautifully rendered 1000+ page book.
Enjoy the post, and see you soon!
Cheers,
Tivadar
This is the Weierstrass function. It’s continuous everywhere but differentiable nowhere, and if we zoom in, we can see that its graph is self-similar, like a fractal. The counter-example of Weierstrass broke how we think about functions. We used to think of them as well-behaved, elegant curves, but in reality, they are jagged, wild, and oppose all of our notions of regularity.
The Cantor set
Differentiability is not the only notion we had to challenge. To see another example, let’s get rid of this function and focus only on the interval between zero and one.
We’re going to cut this small interval up, so let’s make it thick to visualize the details.
By removing the middle third of the interval, we get two pieces. By removing the middle thirds of the remaining ones, we get four. By removing the middle thirds again, we get eight, and so on. We can repeat this process indefinitely.
What’s at the end is the so-called Cantor set, a mind-bending construction that is tiny and huge at the same time. Formally speaking, the Cantor set is the intersection of all of these finite-union-of-interval sets. Its total length is zero, yet it is still uncountable and completely disconnected, meaning that there’s a gap between any two of its points.
The Devil’s Staircase
Alright. Let’s get back on track. Why am I talking about the Cantor set in a video about functions? Because we are about to turn it into one, aptly named “the Devil’s staircase”. (Or Cantor’s function, if you prefer its boring name.) So, let’s go back to our interval [0, 1].





