Proper inclusion for $A \subseteq f^{-1}(f(A))$

elementary-set-theoryfunctions

I'm trying to answer the following question:
"Suppose that $f: D \subseteq \mathbb{R} \to \mathbb{R}$ is a function and $A \subseteq D$. Prove that $A \subseteq f^{-1}(f(A))$ and give an example of when the inclusion is proper."

The proof for $A \subseteq f^{-1}(f(A))$ is rather trivial: "If $x \in A$, then $f(x) \in f(A)$, and $x \in f^{-1}(f(A))$. Thus, $A \subseteq f^{-1}(f(A))$."

The thing I'm struggling with is finding a specific example. Any tips?

Best Answer

You need a function that is not injective.

Take $D=\mathbb R$, $f(x)=x^2$, $A=\{2\}$. Then $f(A)=\{4\}$ and $f^{-1}(f(A))=\{-2,2\} \supsetneq A$.