Exercise: Let $(S, \mathcal{A})$ be a measurable space. Let $f:S\to \mathbb{R}$ be a measurable function and let $p\in(0,\infty)$. Show that the function $\left|f\right|^p$ is a measurable.
What I've tried: I know that if $f$ is a measurable function that $\left|f\right|$ is a measurable function as well. Furthermore if $f,g$ are measurable functions, then $fg$ is a measurable function as well. If $p>1$, I can write $\left|f\right|^p= \left|f\right|^q\cdot \left|f\right|^r$, where $q\in\mathbb{N}$ and $r\in(0,1)$. Using the things I know, $\left|f\right|^q$ must be a measurable function. So if I can show that $\left|f\right|^r$ is a measurable function I'm done.
Since I can't think of any useful properties of measurable functions to show that $\left|f\right|^r$ is measurable, I tried to use the definition of measurable functions: $\left|f\right|^r$ is measurable if for $B\in\mathcal{B}(\mathbb{R})$ we have that $\left|f\right|^{-r}(B)\in\mathcal{A}.$ But I don't really know how to continue from here.
Question: How do I show that $\left|f\right|^p$ is measurable?
Thanks!
Rule: measurability of functions is preserved by composition.
Let $\langle\Omega_i,\mathcal A_i\rangle$ be measurable spaces for $i=1,2,3$.
Let $f:\Omega_1\to\Omega_2$ and $g:\Omega_2\to\Omega_3$ be measurable functions.
Then $g^{-1}(\mathcal A_3)\subseteq\mathcal A_2$ and $f^{-1}(\mathcal A_2)\subseteq\mathcal A_1$ so that also $f^{-1}(g^{-1}(\mathcal A_3))\subseteq\mathcal A_1$.
Now observe that $f^{-1}(g^{-1}(\mathcal A_3))=(g\circ f)^{-1}(\mathcal A_3)$ so that apparantly $g\circ f:\Omega_1\to\Omega_3$ is measurable.
This can be applied here.
For $g$ take the function prescribed by $x\mapsto|x|^p$.