What is the cardinality of a set of all monotonic functions on a segment $[0,1]$?

What is the cardinality of a set of all real monotonic functions on a segment $[0,1]$?

Does it really matter that functions are monotonic?


There are $(2^\omega)^\omega = 2^\omega = \mathfrak{c}$ ways to choose the values of the function on the rationals in $[0,1]$. Suppose that $f$ is a monotone function on $\mathbb{Q}\cap [0,1]$. For each irrational $x\in [0,1]$ let $$f^-(x) = \sup_{q\in\mathbb{Q}\cap[0,x)}f(q)$$ and $$f^+(x) = \inf_{q\in\mathbb{Q}\cap(x,1]}f(q).$$ Since $f$ is monotone, the intervals $(f^-(x),f^+(x))$ are pairwise disjoint, and therefore only countable many of them can be non-empty. When $(f^-(x),f^+(x))=\varnothing$, $f^-(x)=f^+(x)$, and the only way to define $f(x)$ that preserves monotonicity is $f(x) = f^-(x) = f^+(x)$. Only the non-empty intervals $(f^-(x),f^+(x))$ permit any choice of values of $f(x)$. There are only countably many such intervals, and each permits $2^\omega = \mathfrak{c}$ choices for $f(x)$ preserving monotonicity of $f$, so $f$ can be extended in $(2^\omega)^\omega = 2^\omega = \mathfrak{c}$ ways to a monotone function on $[0,1]$. Thus, there are altogether $2^\omega \cdot 2^\omega = 2^\omega = \mathfrak{c}$ monotone functions on $[0,1]$.

The monotonicity does matter, because there are altogether $(2^\omega)^{2^\omega}=2^{\omega\cdot 2^\omega} = 2^{2^\omega} = 2^\mathfrak{c}$ functions on $[0,1]$, and $2^\mathfrak{c}>\mathfrak{c}$.