# Measurable sets example

So there is this example in my book where it goes:

$X_S(x) = 1$ if $x \in S$, otherwise $0$ when $x \notin S$ Where $X_S: \mathbb{R} \rightarrow \mathbb{R}$, and $S$ a set in $\mathbb{R}$. Now $X_s$ is a measurable function as $S$ is a measurable set, it just says but doesnt show how in the example. Can anyone help me understand why this is the case? I mean I can see that the inverses are: $$X^{-1}_S ([a,+\infty)) = S, \text{if} \space \space 0 <a\le 1$$ $$X^{-1}_S ([a,+\infty)) = \mathbb{R}, \text{if} \space \space a\le 0$$ $$X^{-1}_S ([a,+\infty)) = \emptyset, \text{if} \space \space 1<a$$

Just using some previous examples, but I dont know exactly why we start from $[a, +\infty)$, why not $(a, +\infty)$?Now from what I know of measurable functions, they are meassurable if $f^{-1}(a,b)$ is measurable set. In this case we have $S, \mathbb{R}, \emptyset$, but I just dont get why $S, \mathbb{R}, \emptyset$ are measurable?

That the $S$ is measurable is simply by assumption (... as $S$ is a measurable set...)
${\bf{R}}$ must be measurable because $\mu^{\ast}(A)=\mu^{\ast}({\bf{R}}\cap A)+\mu^{\ast}({\bf{R}}^{c}\cap A)$.
$\emptyset$ must be measurable because $\emptyset={\bf{R}}-{\bf{R}}$.
• So $S$ is not mentioned as being measurable we can just assume its measurable? – Aurora Borealis Nov 27 '17 at 6:34
• I think that is a confusion in the English, it writes that "as $S$ is a measurable set" so this is the assumption by my English interpretation, if not, this question is not true and we certainly can find some counterexample. – user284331 Nov 27 '17 at 6:36
$S$ is measurable by hypothesis. The empty set is always an element of a sigma algebra and sigma algebras are closed under complements so $\mathbb{R}$ is measurable.