What is the difference between $f(f^{-1}(U))$ and $f^{-1}(f(U))$? What is the difference between $f(f^{-1}(U))$ and $f^{-1}(f(U))$.
Now i Think if $f$ is onto then $f(f^{-1}(U)) = U $ while $f^{-1}(f(U))=U$ no matter what.
why don't I have a clear picture in my mind?
 A: If $f:X\to Y$, then $f\big[f^{-1}[U]\big]$ makes sense only if $U\subseteq Y$, while $f^{-1}\big[f[U]\big]$ makes sense only if $U\subseteq X$.
If $U\subseteq Y$, then $f^{-1}[U]$ is the set of all $x\in X$ such that $f(x)\in U$; when you apply $f$ to that set, you get back whatever part of $U$ is in the range of $f$.
If $U\subseteq X$, then $f[U]$ is the set of all points $f(x)\in Y$ such that $x\in U$; to keep the notation simple, let $A=f[U]$. Now $f^{-1}[A]$ is the set of all $x\in X$ such that $f(x)\in A$; this can be a lot more than the set $U$ with which you started. For instance, let
$$f:\Bbb R\to\Bbb Z:x\mapsto\lfloor x\rfloor\;.$$
(Recall that $\lfloor x\rfloor$ is the largest integer $n$ such that $n\le x$; thus $\lfloor 3\rfloor=\lfloor \pi\rfloor=3$.) 
Let $U=\left(\frac13,\frac23\right)\subseteq\Bbb R$. Then $f[U]=\{0\}$, and $f^{-1}\big[f[U]\big]=f^{-1}\big[\{0\}\big]=[0,1)$.
A: $U\subseteq f^{-1}(f(U))$,
$f(f^{-1}(U))\subseteq U$
If $f$ is onto, $f(f^{-1}(U))= U$. If $f$ is one-to-one, then $U = f^{-1}(f(U))$.
A: I'm going to answer in less formal language, in case that is useful.
Let $f$ be a function from $X$ to $Y$.
If $U$ is a subset of $X$, then $f(U)$, the "image of $U$ in $Y$," is all the elements in $Y$ to which elements of $U$ get sent.  Then $f^{-1}(f(U))$ is everybody in $X$ that gets sent to any of those elements. Notice that this includes everybody in $U$, but it can be bigger. For example, let $X$ be a sphere floating above $Y$ which is a plane, and let $f$ be the projection of points straight down to the plane. Let $U$ be the bottom (southern) hemisphere of the sphere, including the equator. Then $f(U)$ is the image of all these points in the plane: it is the disc sitting below the sphere. Every point on the southern hemisphere projects down to one point in the disc and every point in the disc lies below some point in the southern hemisphere. But now $f^{-1}(f(U))$ is everybody in the sphere that gets projected down to the disc, and this is the whole sphere $X$! So $f^{-1}(f(U))$ is bigger than $U$.
(A good problem to think about: can you think of a condition on $f$ would rule out $f^{-1}(f(U))$ being any bigger than $U$?)
Notice that to apply $f$ to $U$ to get this whole process going, $U$ had to be inside $X$.
If $U$ is a subset of $Y$, on the other hand, $f(U)$ doesn't necessarily mean anything, because $f$ acts on elements of $X$ not $Y$. But $f^{-1}(U)$ is the set of elements of $X$ that get sent to elements of $U$. Then, $f(f^{-1}(U))$ is the set of elements in $Y$ to which they all get sent. This time, notice that $f(f^{-1}(U))$ is inside $U$, but it can be smaller. In the example above, suppose $U$ is a very large region of the plane $Y$ that includes the "shadow" of the sphere. Then $f^{-1}(U)$ is the set of all points of the sphere $X$ that get sent by $f$ to within this region. This is the whole sphere since I chose $U$ to include the sphere's whole shadow. Then $f(f^{-1}(U))$ is the image of all these points back in the plane. This is now only the shadow of the sphere, so it is much smaller than $U$.
(Good problem: can you think of a condition on $f$ that would rule out $f(f^{-1}(U))$ being any smaller than $U$?)
A: It might help to think in the context of a specific example - how about $f(x)=x^2$ and $U=\{4\}$.  Then,
$$f(f^{-1}(U) = f(\{-2,2\}) = \{4\},$$
but
$$f^{-1}(f(U)) = f^{-1}(\{16\} = \{-4,4\}.$$
While this doesn't prove the general case, it certainly sheds light on the situation and makes it clear that $f^{-1}(f(U))$ can be larger than $f(f^{-1}(U)$.
A: Let $X, Y$ be nonempty set and $f: X\rightarrow Y$ be mapping. In order to have the meaning of $f(U)$ and $f^{-1}(U)$ you must have $U\subset X\cap Y$.
We restate the definitions of $f(U)$ and $f^{-1}(U)$:
$$
f(U)=\{f(x): x\in U\}; \quad
f^{-1}(U)=\{x\in X: f(x)\in U\}
$$
We always have
$$
U\subset f^{-1}(f(U)); \quad
f(f^{-1}(U))\subset U.
$$
If $f$ is injective then
$
U= f^{-1}(f(U)).
$
If $f$ is surjective then
$
f(f^{-1}(U))= U.
$
If $f$ is bijective we have
$
U=f^{-1}(f(U))=f(f^{-1}(U)).
$
In the general case we do not have a relation.


*

*Let $X=\{1, -1\}, Y=\{1\}, f(x)=x^2, U=\{1\}$, we have $f$ is surjective but not injective and
$$
f^{-1}(f(U))=\{-1, 1\}\ne f(f^{-1}(U))=\{1\}
$$
and
$$
f^{-1}(f(U))\ne U.
$$

*Let $X\{-1\}, Y=\{1, -1\}, f(x)=x^2$ and $U=\{-1\}$, we have $f$ is injective but not surjective and
$$
f^{-1}(f(U))=\{-1\}\ne f(f^{-1}(U))=\emptyset
$$
and
$$
f(f^{-1}(U))\ne U.
$$
