Sitemap
Press enter or click to view image in full size
Chalkboard-style image showing the piecewise definition of the Dirichlet function: D(x) equals 1 when x is rational and 0 when x is irrational.

Member-only story

MATHEMATICAL MYSTERIES

The Function That Is Broken Everywhere

15 min readJun 7, 2026

A function sounds like a calm object.

Press enter or click to view image in full size
Equation: x maps to f(x), showing the basic idea of a function as a rule that sends an input x to an output f(x).

You give it a number. It gives you another number. We usually imagine a curve, perhaps smooth, perhaps sharply bent, perhaps with a few jumps. Even when a function behaves badly, we often expect the bad behavior to occur at special points.

Then comes the Dirichlet function.

It is one of the simplest functions in mathematics, and one of the most disturbing. It does not need a complicated formula. It does not need infinite series, trigonometric tricks, or advanced machinery. It only asks one question:

Is the input rational or irrational?

If the answer is rational, the function gives 1.
If the answer is irrational, the function gives 0.

That is all.

And from this innocent rule comes a function that is discontinuous everywhere, cannot be drawn as an ordinary curve, has no point of local calm, defeats

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web
Already have an account? Sign in

Vagelis Plevris

Written by Vagelis Plevris

Structural engineer, professor and science communicator turning complex ideas into clear, useful and engaging stories.

Unknown user

Write a response

I quickly bottomed out of college math (part of a proposed physics degree), switched to psychology instead -- and hated math ever since. Now, at age 76, you are helping me finally appreciate math again. Thank you!

13

Great fun!

8

I simply cannot imagine the caterwauling and consternation Dirichlet's function caused when first published. Probably right up there with "calculus is no good because it divides by zero" meeting Bernard Bolzano's definition of a limit.

Great essay. Just great.

9