
Cantor function
The Cantor function, also known as the "Devil's Staircase," is a fascinating mathematical function that is continuous but not increasing everywhere. It is constructed from the Cantor set, which is formed by repeatedly removing the middle third of a line segment. Despite having a range that spans from 0 to 1, the Cantor function remains flat on intervals where the Cantor set is removed. It increases only at the points that belong to the Cantor set. This unique property illustrates how a function can be continuous yet have a highly irregular behavior, challenging our intuition about size and measure.