# Prove a composition of two functions is meaurable [duplicate]

Let $f,g:[0,1]\rightarrow [0,1]$ be measurable functions.Is $g\circ f$ measurable or not?

The composition is definitely measurable from the axiom definition of measurable function. But if we want to prove it from the classic definition of measurable function,we have to prove that preimage of an open set of this composition is measurable. In order to do that,we have to prove that the preimage of a mesurable set by a measurable function is a measurable set.Now I don't know what to do with the mesurable sets in $[0,1]$ except for the Borel sets.

## marked as duplicate by user91500, Shailesh, user99914, Watson, Claude LeiboviciJul 25 '16 at 8:58

Hint: $(g \circ f)^{-1}(A) = f^{-1} (g^{-1}(A))$
Let $c$ be the Cantor "devil's staircase" function, so that $c$ is continuous and $g(C) = [0,1]$ where $C$ is the Cantor set. Let $f(x) = \sup\{y: c(y) = x\}$ for $x \in [ 0,1]$, $-1$ otherwise. Since $f$ is increasing on $[0,1]$, it is measurable. $f$ maps $[0,1]$ into the Cantor set. Let $E$ be a nonmeasurable subset of $[0,1]$. There is a subset $V$ of the Cantor set with $f^{-1}(V) = E$. Define $g$ by $g(x) = x$ if $x \in V$, $g(x) = -1$ otherwise. Since $g = 0$ a.e., $g$ is measurable. But $(g \circ f)^{-1}((0,infty)) = E$ is nonmeasurable.
• Your g(x) = -1 is out of the codomain given in the question $g : [0,1] \to [0,1]$ – Q the Platypus Jul 25 '16 at 4:47