What does the indicator function $\mathbb{1}_A:S\to\mathbb{R}$ do?

106 Views Asked by At

Exercise: Let $(S,\mathcal{A})$ be a measurable space and let $A\subseteq S$. Show that $A\in\mathcal{A}$ if and only if $\mathbb{1}_A:S\to\mathbb{R}$ is measurable.

I think I understand how I should solve this exercise. What I don't understand is what the mapping $\mathbb{1}_A:S\to\mathbb{R}$ does. In this case $\mathbb{1}_A$ is the indicator function (I checked with my professor), which has a range of $\{0,1\}$. Hence, I would expect the mapping to be $\mathbb{1}_A:S\to\{0,1\}$.

Question: Why is the function $\mathbb{1}_A$ defined from $S\to\mathbb{R}$ instead from $S\to\{0,1\}$?