An example of why $f(f^{-1}(B))\neq B$ Let $f:X\rightarrow Y$ be a function and $B\subseteq Y$ a subset of $Y$. I know (and have proven) that $f(f^{-1}(B))\subseteq B$. I've also found an example where $f(f^{-1}(B))\neq B$ for $B= \mathbb{R}$. I want to find another example, because I find my example very silly. Any help?

Let $X=Y=\Bbb R$, $f(x)=x^2$ and $B=(-1,\infty)$.
Now,
$$f(f^{-1}(B))=f(\Bbb R)=[0,\infty)\subsetneq (-1,\infty).$$
