# Not measurable function whose module is measurable

I read through my notes that is trivial to find a not measurable function $f$ whose module $|f|$ is measurable. However I don't know how to provide such an example.

-
If $A$ is a non-measurable set, take $f=\chi_A-\chi_{A^C}$. –  David Mitra May 5 '14 at 14:02
Thank you very much –  user73793 May 5 '14 at 14:03
But if we take $\left(|\chi_A-\chi_{A^C}|\right)^{-1}\lbrace{1\rbrace}$ this is either $A$ or $A^C$ and $A$ is not measurable... –  user73793 May 5 '14 at 14:44
but still $A\cup A^C=X$ and the full space belongs to the $\sigma$-algebra. So it's done...am I right? –  user73793 May 5 '14 at 15:26