# Examples of measurable and non measurable functions

I'm a new in measure theory and I want to understand measurable functions. As I expect measurable function is the function that maps one set to another where preimage of measurable subset is measurable. Am I right?

I want to understand it on some simple examples. So I need an easy examples of measurable and not measurable functions.

-
Yes, your definition is good. So measurability of a map depends on the $\sigma$-algebra on the set where the function is defined and the set of values. You have to specify it in order to get example, counter-examples. – Davide Giraudo Oct 25 '12 at 8:39
Can we use Borel set of the real line as $\sigma$-algebra? I just don't know what we can use... – DaZzz Oct 25 '12 at 9:14

Indicator functions

Let $(M,\mathcal A)$ be a measurable space. Let $S\subseteq M$ be a subset. Consider the function $1_S\colon M\to\mathbb R$ taking elements in $S$ to $1$ and elements outside $S$ to $0$. Equip $\mathbb R$ with, say, the Borel $\sigma$-algebra. Then $1_S$ is measurable if and only if $S\in\mathcal A$.

-
Ok. So $(M, \mathcal A)$ is measurable space, where $M$ is some set and $\mathcal A$ is the set of subsets in $M$. Then $1_S$ is measurable if and only if $S \in \mathcal A$. Is it correct? Now a don't understand why we need to equip $\mathbb R$ with Borel $\sigma$-algebra. Why is it important? Is $\mathbb R$ a real line, by the way? – DaZzz Oct 25 '12 at 15:07
Oh, now I see why we need to equip $\mathbb R$ with its Borel $\sigma$-algebra. It follows from the definition... – DaZzz Oct 25 '12 at 15:17
I've got it! Thanks! – DaZzz Oct 25 '12 at 15:20

Just in case someone will find this now. The answer if a function is measurable or not depends mostly on the chosen sigma-algebra. For example let $f(x)$ take 2 values, say $a$ and $b$ for some $x$. This function won't be measurable for sigma-algebra $\{\emptyset, X\}$, but will be if we choose for example $\mathcal{B}(\mathbb{R})$.

-
You surely don't mean to say that the function takes two values for the same x. You also probably want to say that f is from R to R – Rodrigo Dec 16 '15 at 17:44