# If $f:X\rightarrow Y$ and $V\subseteq Y$, does there exist $U\subseteq X$ such that $f(U)=V$?

I am afraid this is quite a trivial question. However, let $f:X\rightarrow Y$, where $X$ and $Y$ are sets. Is that true that for any subset $V$ in $Y$ there exists a subset $U$ in $X$ such that $f(U)=V$? Thanks.

• In general, no. The codomain and image are not the same thing. – TheDayBeforeDawn Jun 8 '16 at 9:14
• That's exactly the condition required for the map $f$ to be surjective ("onto") – MPW Jun 8 '16 at 10:32

let $X=\{x_1\,,x_2\,,x_3\,\}$ , $Y=\{y_1\,,y_2\,,y_3,y_4\}$ and $V=\{y_3,y_4\}$ No, unless $f\colon X \to Y$ is onto $Y$. Suppose $X$ is nonempty and $y_0 \in Y$ but $y_0 \notin f(X)$. Then for any $V\subseteq Y$ with $y_0\in V$, there is no $U\subseteq X$ with $f(U)= V$.
Simple example: $X$ any set, $Y = \{0,1\}$, $f$ the constant function $x\mapsto 0\colon X\to Y$. Then if $V=\{1\}$ or $V=Y$, there is no $U\subseteq X$ such that $f(U) = V$.
In general, given $f\colon X \to Y$, if $V\subseteq f(X)$ then $f(U) = V$ where $U = f^{-1}(V)$, but if $V \cap (Y\setminus f(X)) \ne \emptyset$ then for all $U\subseteq X, f(U) \ne V$ — in this case, $f(f^{-1}(V)) \subsetneqq V$.