gives Minkowski's question mark function .


  • Mathematical function, suitable for both symbolic and numeric manipulation.
  • For a real number with continued fraction representation , the Minkowski's question mark function equals .
  • For certain arguments, MinkowskiQuestionMark automatically evaluates to exact values.
  • MinkowskiQuestionMark can be evaluated to arbitrary numerical precision.
  • MinkowskiQuestionMark automatically threads over lists.


open allclose all

Basic Examples  (2)

Evaluate MinkowskiQuestionMark at a quadratic irrational number:

Plot MinkowskiQuestionMark over the unit interval:

Scope  (14)

Numerical Evaluation  (6)

Evaluate numerically:

Evaluate at integers:

Evaluate at rational numbers:

Evaluate at quadratic irrational numbers:

Evaluate at high precision:

MinkowskiQuestionMark threads elementwise over lists and matrices:

Function Properties  (8)

MinkowskiQuestionMark is defined for all real numbers:

Its domain is restricted to real inputs:

MinkowskiQuestionMark achieves all real values::

Hence, it is surjective:

MinkowskiQuestionMark is injective:

MinkowskiQuestionMark has no discontinuities:

However, it is singular everywhere:

MinkowskiQuestionMark is nondecreasing:

MinkowskiQuestionMark is neither non-negative or non-positive:

MinkowskiQuestionMark is neither convex nor concave:

TraditionalForm formatting:

Applications  (3)

Enumeration of rational numbers from the unit interval, based on the binary representation of the ordinal number:

First few rational numbers, according to the chosen enumeration strategy:

Plot the cumulative distribution function of so constructed rationals:

Compare it with the Minkowski's question mark function:

An unstable fixed point of the Minkowski's question mark function:

Build a continued fraction expansion of a rational number:

Compare to the builtin function:

Properties & Relations  (2)

The Minkowski's question mark function satisfies reflection identity TemplateBox[{{1, -, x}}, MinkowskiQuestionMark]=1-TemplateBox[{x}, MinkowskiQuestionMark]:

For the function also satisfies TemplateBox[{{x, /, {(, {x, +, 1}, )}}}, MinkowskiQuestionMark]=1/2TemplateBox[{x}, MinkowskiQuestionMark]:

MinkowskiQuestionMark satisfies TemplateBox[{{{(, {{p, _, 1}, +, {p, _, 2}}, )}, /, {(, {{q, _, 1}, +, {q, _, 2}}, )}}}, MinkowskiQuestionMark]=1/2 (TemplateBox[{{{(, {p, _, 1}, )}, /, {(, {q, _, 1}, )}}}, MinkowskiQuestionMark]+TemplateBox[{{{(, {p, _, 2}, )}, /, {(, {q, _, 2}, )}}}, MinkowskiQuestionMark]) for adjacent elements and of a Farey sequence:

Wolfram Research (2014), MinkowskiQuestionMark, Wolfram Language function, https://reference.wolfram.com/language/ref/MinkowskiQuestionMark.html.


Wolfram Research (2014), MinkowskiQuestionMark, Wolfram Language function, https://reference.wolfram.com/language/ref/MinkowskiQuestionMark.html.


Wolfram Language. 2014. "MinkowskiQuestionMark." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MinkowskiQuestionMark.html.


Wolfram Language. (2014). MinkowskiQuestionMark. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MinkowskiQuestionMark.html


@misc{reference.wolfram_2024_minkowskiquestionmark, author="Wolfram Research", title="{MinkowskiQuestionMark}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MinkowskiQuestionMark.html}", note=[Accessed: 19-May-2024 ]}


@online{reference.wolfram_2024_minkowskiquestionmark, organization={Wolfram Research}, title={MinkowskiQuestionMark}, year={2014}, url={https://reference.wolfram.com/language/ref/MinkowskiQuestionMark.html}, note=[Accessed: 19-May-2024 ]}