## Motivation.

I’m a bit sad that I don’t have a catchy title for this post, but at least we have a neat topic: measurable functions.  In pure, unadulterated generality, these things (to me, at least) look exactly like continuous functions in topology: the idea is that if you "pull back" a measurable set, you ought to get a measurable set.  Specifically, our "pulling back" in this case is doing to be taking the pre-image of the function (not to be confused with the inverse, which does not always exist; the pre-image, on the other hand, exists and is a set). Does this look familiar?  If I said, maybe, "open" instead of "measurable"?  Yeah.  Yeah.

In this post, we will work with ${\mathbb R}$ with the standard sigma-algebra generated by the open sets of the standard topology on ${\mathbb R}$.  But, that’s still kind of a lot of sets to consider.  Do we have to look at them all, or do we have a basis for this sigma-algebra?

For all you lazy mathematicians, you’re in luck.  In fact, the sets $(-\infty, a)$ for each $a\in {\mathbb R}$ generate the sigma-algebra we’re considering (try to prove this; it’s not that hard!)  Thus, it suffices just to check out the pre-images $f^{-1}((-\infty,a))$ for $a\in {\mathbb R}$ in order to see if $f$ is measurable.

Last, note that we could use the other open or closed semi-infinite intervals, but I like $(-\infty, a)$ the best.

## So what is a measurable function?

In our "special" case with ${\mathbb R}$, we’re going to formally define it this way:

Definition.  A function $f:{\mathbb R}\rightarrow {\mathbb R}$ is measurable if the pre-image $f^{-1}((-\infty, a))$ is measurable for each $a\in {\mathbb R}$.

That’s it.  There’s a lot to talk about, because measurable functions are the foundation for Lebesgue integration so we need to know a lot about them.  For example, is a limit of measurable functions measurable?  What about the sum or difference of two?  In a "reasonable" domain and range situation (like we have here) are the compositions of measurable functions measurable?  How does measurable compare with continuous?  We can go on and on.  We’ll do a bunch of work to prove some basic results here, and then talk in the next post (hopefully!) about Littlewood’s Three Principles of Real Analysis which I paraphrase below:

• Every measurable set almost a finite union of intervals (we’ve seen this last post).
• Every measurable function is almost continuous (we’ll see this next post).
• Every convergent sequence of measurable functions is almost uniformly convergent (next post as well).

These "almosts" deal with the former things differing from the latter things if we exclude a subset of finite measure from the considered domain.  For example, the last post we showed that a measurable set was "almost" an open set.  For now, just keep these in the back of your head, because these are the three big things about measurable functions.  Think of them like a road map; we’re going to need to blow through all three eventually.

## Non-Measurable Functions.

Sometimes it’s nice to define things in terms of things they are not.  In this case, we’re going to present an example just because there is a prototypical example that comes up constantly that you should put in your head as soon as possible for counter-example purposes.  It’s actually sort of funny how easy it is to construct a counter example.

First, remember, we have already constructed a non-measurable set in a previous post.  Call it $A$.

Define $\chi_{A}:{\mathbb R}\rightarrow {\mathbb R}$ in the following way:

$\chi_{A}(x) = \left\{\begin{array}{lr} 1 & x \in A \\ 0 & x \notin A \end{array}\right\}$

This is often called the characteristic function of $A$It’s 1 when $x\in A$ and 0 when it’s not.  Pretty easy.  Let’s show that $\chi_{A}$ isn’t measurable.  This turns out to be easy.  Consider, for example, the set $\{1\}$ in the range; clearly this is measurable (in fact, it’s a set of measure 0!) so we should be able to take the pre-image and get something measurable out of that.  But, alas, $\chi_{A}^{-1}(\{1\}) = A$ and $A$ isn’t measurable!  Thus, $\chi_{A}$ cannot be measurable either!

As I mentioned before, this is the prototypical example of a non-measurable set.   You should, therefore, keep this in your head so that when you see a statement like, "If a function takes on only finitely many variables, it must be measurable," you can think to yourself, "Does it work for $\chi_{A}$?"

## Some Measurable Functions.

Before we get into the finer points of operations with measurable functions, maybe it would be good to give a class of functions which are measurable.  It’s always nice to have examples to work with.

Every continuous function is measurable.  That is, continuous functions $f:{\mathbb R}\rightarrow {\mathbb R}$ are measurable.  It’s not hard to see why.  Note that $(-\infty, a)$ is an open set in the range, and so $f^{-1}((-\infty,a))$ is an open set in the domain.  We know that every open set is measurable, so this gives us that $f$ is measurable.  neat.

The Heaviside Step Function is measurable.  You’ve seen this function.  It’s the one where it’s 0 for every value less than zero, and 1 for every value greater than or equal to zero (in fact, some people make this function have a value of one-half at $x =0$, but this isn’t so important to us right now.

This is easy to prove measurability for.  If $a < 0$, then we have nothing to worry about.  If $0< a < 1$, then our pre-image is every $x$ such that $f(x) = 0$; this will be $(-\infty, 0)$.  If $a \geq 1$ then our pre-image is every $x$ such that $f(x)$ has the value of 0 or 1; but this is just ${\mathbb R}$.  All of this is measurable.

A step function with finitely many range values is measurable.  This proof is exactly the same as the last.

A step function with at most countably many range values is measurable.  Why?  Because the pre-image will always have measure zero.  Same idea as the above examples.

A function which is continuous with the exception of countably many holes is measurable (not just continuous between the holes, it must be equal to a continuous function everywhere except those holes).  This one is a bit tricky, but the idea here is that if you only have some holes in your continuous function, then you can probably get away with it being nice and measurable so long as the holes, all-together, don’t take up too much space.  Also, I want to note here that jump functions do NOT count as this kind of function, since their continuities are known (surprisingly?) as jump discontinuities.  The holes that I am referring to are also called removable discontinuities.

Similar to above, a function which is continuous except at a set of removable discontinuities of measure zero is measurable.  Same reasoning as above.

I bring up the last statement primarily because of one extremely important example that comes up quite a bit when we want to talk about the inadequacy of the Riemann integral. We will talk about this a bit later, but for now, we will state that the characteristic function of the rationals is measurable. Recall that this is the function which takes a value 1 at every rational point and 0 at every irrational point. Note that we needed the last statement even though this only takes on two values since it is not a step function.  (The following picture is as good as I can do to approximate this!)

And here’s a really important (albeit, kind of obvious) one:

A function which takes on a countable number of values is measurable if $\{x\, | \, f(x) = c\}$ is measurable for each $c\in {\mathbb R}$This says that if we have something which sort of looks like a step function, except it’s "going up and down", then it’s going to be measurable if, at each of the countable values it takes, the pre-image of the points mapping to that variable is measurable.  (Below I’ve shown this for three values, since trying to draw any more than finitely many values makes my wrist hurt.)

Notice that with this last statement, we can show that the characteristic function of the rationals is measurable if we can show that the set of rationals (and therefore, the set of irrationals) is measurable.  This is not difficult, and would be good practice for the reader!  (Hint: the proof is very short.)

I also bring up this last statement for a reason; the reader may say, "Well, this is all fine and good, but very few functions I know take on countably many values."  Indeed, even $f(x) = x$, an extremely simple linear function, takes on more than countably many values.  The hidden agenda here is that we will be able to "cut up" a general measurable function into ones which have only countably many values, and then approximate our function by making our "cuts" smaller and smaller — this is exactly what we do with Riemann integration, but it will turn out that Lebesgue integration will be slightly better behaved with respect to some limits.  We will go into this later when we talk about the Lebesgue integral, but for now let’s explore some stuff we can do with measurable functions.

## What Can I Do With Measurable Functions?

The following statements I will make without proof, but the proofs are relatively easy to find online.  In fact, once you know addition, subtraction, and squaring, then multiplication becomes easy using the following identity:

$fg(x) = \frac{1}{4}\left((f(x) + g(x))^{2} - (f(x) - g(x))^{2}\right)$

which is kind of neat in and of itself.  I’ve seen this stated as the "polarizing identity", but I’m not exactly sure why it’s called that.  Either way,

• The sum of two measurable functions is measurable.
• The square of a function is measurable; that is, if $f$ is measurable, so is $f^{2}$.
• The product of two measurable functions is measurable.
• The quotient of two measurable functions is measurable, assuming that the denominator does not vanish.
• The composition of two measurable functions is NOT NECESSARILY measurable; read below in the comments as to why.
• Given two functions $f, g$ we have that $M(x) = \max(f(x),g(x))$ is measurable and $m(x) = \min(f(x),g(x))$ is measurable.
• The absolute value of a function is measurable.

These are usually given as exercises to students just getting into measure theory, which is one reason I hesitate to prove them here.  Another is that they would be somewhat irritating to type up.  Nonetheless, these basic operations give us some tools to work with and, really, the above is not all that surprising: we would expect measurable functions (being relatively nice things) to behave like this.  All it really comes down to, for most of these, is the manipulation of terms to show that we can make the pre-image of $(-\infty,a)$ a nice union or intersection of sets we know to be measurable.

On the other hand, it is not so obvious (or, at least, it wasn’t to me) what happens if you did something slightly more complicated.  For example, take a sequence of measurable functions which converge.  Do it!  Take your favorite sequence of measurable functions that converge to something.  Now, is the limit of these measurable functions measurable?  We know in the case of continuity, this need not be true: take $f_{n}(x) = x^{n}$ between 0 and 1 inclusive; we know this limit is zero everywhere except at $x = 1$, where it has a value of 1 and is, thus, not continuous.

Maybe measurable functions are a bit less rigid and we can do a bit more with them in terms of limits.  We investigate this in the next post.

### 7 Responses to “Real Analysis Primer, Part 6: Measurable Functions and Basic Operations.”

1. Anonymous said

Do some practice problems and stop typing this shit up

• jonathan said

Anonymous, that is very rude! I am learning a lot from this post and I have respect for the author. After all, he has put a good amount of effort into this blog and I am benefiting from his work.

2. Anonymous said

Are you sure that composition of measurable functions is measurable?

• James said

Good catch; you’re right, it’s not true. For those who like reading comments, I’ll expand on this: here, I’ve defined Lebesgue-measurable functions which are defined as functions with the property that the preimage of a Borel set is a Lebesgue-measurable set. Lebesgue-measurable sets can be thought of as a union of a Borel set and a set of measure zero, so it does *not* follow (as you pointed out!) that if we have a composition of (Lebesgue-)measurable functions that this composition is (Lebesgue-)measurable; it could be the case that the pre-image of a Borel set is some Borel set and a set of measure zero where the preimage of the set of measure zero is non-measurable (there are a few good ways to do this; some explicit examples using the Cantor function can be found in Counterexamples in Analysis, Royden, etc.).

On the other hand, if we were to say that two functions are Borel-measurable (the preimage of a Borel set is a Borel set) then the composition will be a Borel-measurable function. This points out the importance of knowing what kind of measurable functions one is working with!

3. Anonymous said

” our pre-image is the point {0}” ?
Do you mean our pre-image is the pre-image of the point {0} (ie ]-oo;0 [) ?

4. armel said

i need help sir, if |f| is measurable would it imply that f is also measurable, I think that it is not but i can not find a way to prove it.
best regards