# When is the preimage of codomain not equal to domain?

I need to show that
For every $X\subseteq A$, $X \subseteq f^{-1}(f(X))$, where $f: A\to B$.
I think I understand why this is true. However, under what circumstances are they not equal? When is $f^{-1}(f(X)) \not= X$

• – pjs36 May 16 '16 at 17:06
• Oh, did not find that in my search. That does clear it up for me though, thanks! – jessicajjensen May 16 '16 at 17:16

They are different when the function is not injective. For example: $$A=\{0;1\},\quad f:A\rightarrow A,\quad f(0)=f(1)=0,\quad f^{-1}(f(\{0\}))=f^{-1}(\{0\})=\{0;1\}\neq\{0\}.$$