Determine whether the function is Lebesgue measurable Here's the full problem:

Let $\mathcal{N} \subset [0,1]$ be a non-measurable set. Determine whether the function
  $$f(x) = \left\{
     \begin{array}{lr}
       -x & : x \in \mathcal{N}\\
       x & : x \notin \mathcal{N}
     \end{array}
   \right.$$
  is measurable.

Here is what I've been thinking. We know that the definition of a measurable function entails that we can map any interval back to our domain and that it must then be measurable, which will imply $f \in \mathcal{M}$, where $\mathcal{M}$ denotes the set containing all measurable sets. What we'll ultimately be mapping back, I think, is
$$f^{-1}(\mathcal{N}), f^{-1}(\mathcal{N^c})$$
which implies we're mapping back
$$f^{-1}(\mathcal{N \cup N^c})=f^{-1}([0,1]) \in \mathcal{M}$$
so that means $f \in \mathcal{M}$.
Now my question: was this even remotely correct? I'm very new to Lebesgue measure, so this problem has been hurting. A friend and I were discussing this earlier, and we both agreed that it may not be this simple, so any feedback would be much obliged!
EDIT: Here is the way my professor constructed a non-measurable set for us:

Non-measurable set
Consider a set $E \subseteq \mathbb{R}$ and recall that an equivalence relation partitions $E$ into equivalence classes $[x]=\{z:z\sim x\}$, i.e
$$E=\bigcup_{i}[x]\;\;\;,\;\;[x]\cap [y] = \emptyset$$
  $$\implies z\; s.t \; z\sim x,\; z\sim y \implies y\sim x,\;but\;then\;[x]=[y]$$
Now suppose $E=[0,1]$ and say $x\sim y$ if $x-y \in \mathbb{Q}$ (this is an equivalence relation). Then,
  $$[0,1]=\bigcup_{\alpha \in \mathbb{R \setminus Q}} E_{\alpha}$$
  where $E_{\alpha}=[x_{\alpha}]$ and $\alpha$ is clearly uncountable. Now define $\mathcal{N}=\bigcup\{x_{\alpha}\}$. By transfinite induction, we establish that $\mathcal{N}\subset [0,1]$.

 A: What do you mean by $f \in \mathcal{M}$?
You noted correctly that you have to decide wether $f^{-1}(I)$ is measurable for every interval $I \subset \Bbb{R}$.
As the definition of $f$ involves a nonmeasurable set, probably, $f$ will not be measurable (this is no rigorous argument, we just want to decide if we want to prove $f$ to be measurable or nonmeasurable).
So you need to choose $I$ correctly to ensure that $f^{-1}(I)$ is not measurable.
Attention: Spoilers below!

 You already know that $N$ is not measurable, so try to get something like $f^{-1}(I) = N$.

$ $

 Hint: It might be useful to consider $I = (0,\infty)$.

A: Here's how I did this problem.
Let $f$ be described as above. $f$ is a measurable function if, for every $I$, $f^{-1} (I)$ is measurable. Now, what $f$ does is, is to separate out the points in $N$ from those not in $N$, by sending the ones not in $N$ to their negative values, while fixing the ones in $N$. So by taking the inverse of any $I$ of the form $(0,a), a > 1$, we'd have that $f^{-1}(I)=f^{-1}((0,1] \cup (1, a))=N \cup \emptyset=N$. This works since we decomposed $I$ into disjoint sets. Since $N$ is not measurable, clearly for this choice of $I$, we have an unmeasurable set, so $f$ cannot be measurable.
Not sure if this is 100% correct, but this was my reasoning.
