TITLE: $f$ measurable implies $\dfrac{1}{f}$ measurable
QUESTION [5 upvotes]: Suppose $f:X\to\mathbb{R}$ is Borel-measurable over a measurable space $X$, and $f(x)\neq 0$ for each $x\in X$. I want to prove that $\dfrac 1f$ is measurable.
Let $a\in\mathbb{R}$. I tried to prove that $\{x\in X:\dfrac{1}{f(x)}>a\}$ is measurable. Of course if $a>0$ then $\{x\in X:\dfrac{1}{f(x)}>a\}=\{x\in X:\dfrac 1a>f(x)\}$, hence measurable, but what if $a<0$?
Any hint? Thanks.

REPLY [6 votes]: For $a>0  \quad\frac{1}{f} \in (a, \infty)$ is equivalent to $f \in (0,\frac{1}{a})$. 
For $a = 0 \quad\frac{1}{f} \in (a, \infty)$ is equivalent to $f \in (0,\infty)$.
For $a < 0 \quad\frac{1}{f} \in (a, \infty)$ is equivalent to $f \in (0,\infty) \cup (-\infty, \frac{1}{a})$.
Hence, for instance, when  $a>0 \quad (\frac{1}{f})^{-1}(0,a) = f^{-1}(0,\frac{1}{a})$ which is measurable. In the other cases, the inverse images under $\frac{1}{f}$ are also measurable. Since sets of the form $(a,\infty)$ forma  $\pi$-system generating the Borel $\sigma$-algebra on $\mathbb{R}$ we are done.