TITLE: Absolute value of a measurable function is measurable
QUESTION [5 upvotes]: Let $(X , \mathscr{M}, \mu)$ be a measure space. Prove that if $f$ is measurable, then $|f|$ is measurable. 

A function $f$ is measurable if $f^{-1}((a , \infty)) = \{x : f(x) > a\} \in \mathscr{M}$ for every $a \in \mathbb{R}$.

Ok so this is what I have so far:
Consider two cases: $a < 0$ and $a \geq 0$. If $a < 0$, then we have $$|f|^{-1}((a , \infty)) = \{x : |f(x)| > a \} = X \in \mathscr{M}$$ since $\mathscr{M}$ is a $\sigma$-algebra. I am confused on how to prove the case when $a \geq 0$. If $a \geq 0$, we have $$|f|^{-1}((a , \infty)) = \{x : |f(x)| > a \} = ?$$ I am assuming we will have to use that fact that $f$ is measurable. 
Any help will be appreciated!

REPLY [5 votes]: Proposition 0. Suppose $f : X \rightarrow \mathbb{R}$ is measureable, and that $g : \mathbb{R} \rightarrow \mathbb{R}$ is measureable. Then so too is $g \circ f$.

Proof. Consider $A \subseteq \mathbb{R}$ with $A$ Borel-measureable. Then $g^{-1}(A)$ is Borel-measureable. Hence $f^{-1}(g^{-1}(A))$ is measureable. Hence $(g \circ f)(A)$ is measureable. We deduce that $g \circ f$ is measurable.
So, it remains to prove:

Proposition 1. Let $g : \mathbb{R} \rightarrow \mathbb{R}$ denote the absolute value function. Then $g$ is measurable.
(Once again, all copies of $\mathbb{R}$ are viewed as measureable spaces with respect to the Borel $\sigma$-algebra in this theorem.)

Proof. Observe that:
$$g^{-1}(a,\infty) = (-\infty,-a)\cup (a,\infty)$$
So $g^{-1}(a,\infty)$ is clearly Borel-measurable. Hence $g$ is measurable.