If the preimage of every non-measurable set is non-measurable, must the function be measurable? There is an intrinsic analogy between the continuous functions in topology and the measurable functions in measure theory. As for example, you can find striking analogies starting from their definition to some properties of them. For example:


*

*If $(X,T)$ and $(Y,S)$ are two topological spaces then $f:(X,T)\rightarrow(Y,S)$ is continuous if pre-image of every set (open) in the topology $S$ is a set (open) in the topology $T$. If $(\mathcal{C},\sigma)$ and $(\mathcal{D},\alpha)$ are two measurable spaces then $g:(\mathcal{C},\sigma)\rightarrow(\mathcal{D},\alpha)$ is measurable if for every $A\in\alpha$, $f^{-1}(A)\in\sigma$. 

*If $f,g$ are continuous functions then so are $f+g$, $fg$, $f\circ g$, $f/g$ if $g$ is non-zero. Similarly, if $f_1,g_1$ are measurable functions then so are $f_1+g_1$, $f_1g_1$, $f_1\circ g_1$, $f_1/g_1$ if $g_1$ is non-zero.


and so on. 
Now $f$ is continuous even if the pre-image of every closed set is a closed set. My question is that, if pre-image of every non-measurable set is non-measurable or the function $f$, then can I tell that $f$ is measurable?
 A: The statement "if $S$ is non-measurable then $f^{-1}(S)$ is non-measurable" is  not true, even for constant functions.  Thus let $S$ be a non-measurable subset of your favourite  space containing a point $s$ and $f$ the constant function on the space with value $s$.  Thus $f^{-1}(S)$ is the whole space, and thus measurable, but $S$ is non-measurable.
A: In a topological space $X$, a set $U\subseteq X$ is open $\iff$ $X\setminus U$ is closed.
In a measurable space $X$, a set $U\subseteq X$ is measurable $\iff$  $X\setminus U$ is measurable.
So the argument for a function between topological spaces being continuous iff preimages of closed sets are closed doesn't translate to your question about preimages of non-measurable sets.
Let $X$ be a set with more than one element, and consider the example of the identity function $$\mathrm{id}_X:(X,\mathcal{M}_1)\to(X,\mathcal{M}_2),$$ where $\mathcal{M}_1=\{\varnothing,X\}$ is the trivial $\sigma$-algebra, and $\mathcal{M}_2=\mathcal{P}(X)$ is the discrete $\sigma$-algebra. The preimage of every non-measurable set in the codomain is non-measurable in the domain (this is a vacuous statement since every set is measurable in the codomain), but there are many measurable sets in the codomain whose preimage is not measuable in the domain, so $\mathrm{id}_X$ is not a measurable function here.
A: A counterexample is the following:
Let $X$ be any set, $\mathcal{B}_1=\{\varnothing,X\}$ the trivial $\sigma$-algebra on $X$ and $\mathcal{B}_2$ any $\sigma$-algebra on $X$ different from the trivial one.
Considere the identity function $i:X\to X$, where the domain is endowed with $\mathcal{B}_1$ and the codomain with $\mathcal{B}_2$. Clearly every non-measurable set in the codomain has non-measurable preimage, but $i$ is not measurable.
