ArticleslgStudy

mathematics

Cantor function

Cantor function is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Cantor function rather than just read about it. In short: In mathematics, the Cantor function is an example of a function that is continuous, but not absolutely continuous. It is a notorious counterexample in analysis, because it challenges naive intuitions about continuity, derivative, and measure.

Cantor function — main illustration
Cantor function — illustration

Key takeaways

  • Cantor function belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Cantor function to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Cantor function from memory before moving on to harder problems.

Reference excerpt

In mathematics, the Cantor function is an example of a function that is continuous, but not absolutely continuous. It is a notorious counterexample in analysis, because it challenges naive intuitions about continuity, derivative, and measure. Although it is continuous everywhere, and has zero derivative almost everywhere, its value still goes from 0 to 1 as its argument goes from 0 to 1. Thus, while the function seems like a constant one that cannot grow, it does indeed monotonically grow. It is also called the Cantor ternary function, the Lebesgue function, Lebesgue's singular function, the Cantor–Vitali function, the Devil's staircase, the Cantor staircase function, and the Cantor–Lebesgue function. Georg Cantor (1884) introduced the Cantor function and mentioned that Scheeffer pointed out that it was a counterexample to an extension of the fundamental theorem of calculus claimed by Harnack. The Cantor function was discussed and popularized by Scheeffer (1884), Lebesgue (1904), and Vitali (1905).

Definition

To define the Cantor function c:[0,1]→[0,1], let x be any number in [0,1] and obtain c(x) by the following steps:

Express x in base 3, using digits 0, 1, 2. If the base-3 representation of x contains a 1, replace every digit strictly after the first 1 with 0. Replace any remaining 2s with 1s. Interpret the result as a binary number. The result is c(x). For example:

14 has the ternary representation 0.02020202... There are no 1s so the next stage is still 0.02020202... This is rewritten as 0.01010101... This is the binary representation of 13, so c(14)=13. 15 has the ternary representation 0.01210121... The digits after the first 1 are replaced by 0s to produce 0.01000000... This is not rewritten since it has no 2s. This is the binary representation of 14, so c(15)=14. 200243 has the ternary representation 0.21102 (or 0.211012222...). The digits after the first 1 are replaced by 0s to produce 0.21. This is rewritten as 0.11. This is the binary representation of 34, so c(200243)=34. Equivalently, letting 𝒞 be the Cantor set on [0,1], the Cantor function c:[0,1]→[0,1] can be defined as c(x)={∑n=1∞an2n,if x=∑n=1∞2an3n∈𝒞 for an∈{0,1};supy≤x,y∈𝒞c(y),if x∈[0,1]∖𝒞. This formula is well-defined, since every member of the Cantor set has a unique base 3 representation that only contains the digits 0 or 2. (For some members of 𝒞, the ternary expansion is repeating with trailing 2's and there is an alternative non-repeating expansion ending in 1. For example, 13 = 0.13 = 0.02222...3 is a member of the Cantor set). Since c(0)=0 and c(1)=1, and c is monotonic on 𝒞, it is clear that 0≤c(x)≤1 also holds for all x∈[0,1]∖𝒞.

Properties The Cantor function challenges naive intuitions about continuity and measure; though it is continuous everywhere and has zero derivative almost everywhere, c(x) goes from 0 to 1 as x goes from 0 to 1, and takes on every value in between. The Cantor function is the most frequently cited example of a real function that is uniformly continuous (precisely, it is Hölder continuous of exponent α=log3(2)) but not absolutely continuous. It is constant on intervals of the form (0.x1x2x3...xn022222..., 0.x1x2x3...xn200000...), and every point not in the Cantor set is in one of these intervals, so its derivative is 0 outside of the Cantor set. On the other hand, it has no derivative at any point in an uncountable subset of the Cantor set containing the interval endpoints described above. The Cantor function can also be seen as the cumulative probability distribution function of the 1/2-1/2 Bernoulli measure μ supported on the Cantor set: c(x)=μ([0,x]). This probability distribution, called the Cantor distribution, has no discrete part. That is, the corresponding measure is atomless. This is why there are no jump discontinuities in the function; any such jump would correspond to an atom in the measure. However, no non-constant part of the Cantor function can be represented as an integral of a probability density function; integrating any putative probability density function that is not almost everywhere zero over any interval will give positive probability to some interval to which this distribution assigns probability zero. In particular, as Vitali (1905) pointed out, the function is not the integral of its derivative even though the derivative exists almost everywhere. The Cantor function is the standard example of a singular function. The Cantor function is also a standard example of a function with bounded variation but, as mentioned above, is not absolutely continuous. However, every absolutely continuous function is continuous with bounded variation. The Cantor function is non-decreasing, and so in particular its graph defines a rectifiable curve. Scheeffer (1884) showed that the arc length of its graph is 2. Note that the graph of any nondecreasing function such that f(0)=0 and f(1)=1 has length not greater than 2. In this sense, the Cantor function is extremal.

Lack of absolute continuity The Lebesgue measure of the Cantor set is 0. Therefore, for any positive ε < 1 and any δ > 0, there exists a finite sequence of pairwise disjoint sub-intervals with total length < δ over which the Cantor function cumulatively rises more than ε. In fact, for every δ > 0 there are finitely many pairwise disjoint intervals (xk,yk) (1 ≤ k ≤ M) with ∑k=1M(yk−xk)<δ and ∑k=1M(c(yk)−c(xk))=1.

Alternative definitions

Iterative construction

Below we define a sequence (fn)n of functions on the unit interval that converges to the Cantor function. Let f0(x)=x. Then, for every integer n≥0, the next function fn+1(x) will be defined in terms of fn(x) as follows:fn+1(x)={12fn(3x)if 0≤x≤1312if 13≤x≤2312+12fn(3x−2)if 23≤x≤1The three definitions are compatible at the end-points 13 and 23, because fn(0)=0 and fn(1)=1 for every n, by induction. One may check that (fn)n converges pointwise to the Cantor function defined above. Furthermore, the convergence is uniform. Indeed, separating into three cases, according to the definition of fn+1, one sees that

maxx∈[0,1]|fn+1(x)−fn(x)|≤12maxx∈[0,1]|fn(x)−fn−1(x)|,n≥1. If f denotes the limit function, it follows that, for every n≥0,

maxx∈[0,1]|f(x)−fn(x)|≤2−n+1maxx∈[0,1]|f1(x)−f0(x)|.

… excerpt ends here. Continue reading the full article.

Illustrations

Cantor function: The graph of the Cantor function on the unit interval
The graph of the Cantor function on the unit interval
Cantor function: Iterated construction of the Cantor function
Iterated construction of the Cantor function
Cantor function illustration

Worked examples

Example 1 — a first encounter with Cantor function

Start with the simplest possible case. Write down what Cantor function claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Cantor function before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Cantor function ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Cantor function

In research
Cantor function appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Cantor function in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Cantor function is common in secondary-school and first-year university syllabi. It links to neighbouring topics De Rham curves, Fractals, Georg Cantor, so understanding it makes those chapters shorter.
In everyday life
Look for Cantor function outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Cantor function” →

How to study Cantor function in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Cantor function means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Cantor function out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Cantor function in simple terms?

In mathematics, the Cantor function is an example of a function that is continuous, but not absolutely continuous. It is a notorious counterexample in analysis, because it challenges naive intuitions about continuity, derivative, and measure.

Why does Cantor function matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Cantor function?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Cantor function.

Tags

  • De Rham curves
  • Fractals
  • Georg Cantor
  • Measure theory
  • Special functions

Keep exploring