# Why the characteristic function is measurable?

On page 11 of Rudin's real and complex analysis,

Let $X$ be a measurable space. If $E$ is measurable set in $X$ and if

\begin{equation} \chi_{E}(x)=\begin{cases} 1, & x\in E \\ \\ 0, & x\notin E. \end{cases} \end{equation} then $\chi_E$ is a measurable function.

Do we prove $\chi_E^{-1}(V)$ is a measurable set in $X$ for every open set $V$ in $\{0,1\}$? But $\{0\}$ is an open set in $\{0,1\}$，isn't it? So $\chi_E^{-1}(\{0\})$ is not a measurable set in $X$?

• You do not see characteristic function as a map to $\{0,1\}$ you see it as a map to $\mathbb{R}$..
– user312648
Feb 3 '18 at 16:51
• @cello But Wikipedia says $\chi_{E} : X \to {0,1}$. en.wikipedia.org/wiki/Characteristic_function Feb 3 '18 at 17:03
• @User0.618 Here $\{0,1\}$ is the range in its definition, because the codomain may differ in the context, for example one could also look at the characteristic function in $\mathbb{C}$. Feb 3 '18 at 17:16

$\mathcal{X}_E^{-1}(\{0\}) = E^C$, which is perfectly measurable.
Take any $A \in \mathcal{B}(\mathbb{R})$:
$\mathcal{X}_E^{-1}(A) =\begin{cases} X, & 0,1 \in A \\ E, & 1 \in A, 0 \notin A \\ E^C, & 1 \notin A, 0 \in A \\ \emptyset, & o.w. \end{cases}$
all those sets are measurable, since $E$ is measurable.
Consider $\chi_E^{-1}((-\infty,\alpha])$ for various $\alpha$
If you take the subspace topology of $\{0,1\}$ induced from the real line you'll note that ${0}$ is open in $\{0,1\}$ since $\{0\}=(-1/2,1/2)\cap \{0,1\}$. Likewise $\{1\}$ is open in $\{0,1\}$ for a similar reason and hence the topology on $\{0,1\}$ is the discrete topology.