# understanding simple functions

Let $(X,\mathcal{M})$ be a measurable space. The definition of a simple function on a set $X$ is that it is a finite linear combination, with real coefficients, of characteristic functions of sets in $\mathcal{M}$. I'm trying to understand why, equivalently,

$f:X\rightarrow \mathbb{R}$ is simple iff $f$ is measurable and the range of $f$ is a finite subset of $\mathbb{R}$.

The forward direction makes sense by definition of what a simple function is. However, I am having trouble proving the other direction.

If $f$ is measurable, then $f^{-1}(E)\in \mathcal{M}$ for any $E\subseteq range(f)=\left\{a_1, \ldots , a_n \right\}$. What do I do from here? How do I show $f$ is simple?

I appreciate the help!

-

$f = \sum_{i=1}^{n} a_{i} \chi_{f^{-1}(\{a_i\})}$

-

For each $a_i$, put a little neighborhood $V_i = (a_i - \epsilon, a_i + \epsilon)$ around it, so that all the neighborhoods are distinct. As $f$ is measurable,

$$A_i := f^{-1}(V_i)$$

is a measurable subset of $\mathbb{R}$. Now conclude that $$f(x) \in V_i \iff f(x) = a_i$$

and use this to show that $$f = \sum_{i = 1}^n a_i \chi_{A_i}$$

Morally: If the value of $f$ is close to $a_i$, then it had to be $a_i$ after all.

-
Okay, I think I was stressing over a trivial thing here. Right, if $f(x)\in V_j$, then $f(x)=a_j$, so $\chi_{A_j}(x)=1$ and $\chi_{A_i}(x)=0$ for all $i\neq j$. Then we can trivially rewrite $f(x)=a_j=\displaystyle \sum_{i=1}^n a_i \chi_{A_i}$. –  Sarah Jan 31 at 1:12