# Images and preimages of sets

This is probably very basic indeed, but I've just ran into a proof that seems to imply that letting $f:X\to Y$, $C\subseteq X$ and $P\subseteq Y$, $Q\subseteq Y$,

$$f(C)=P\cup Q\iff C=f^{-1}(P\cup Q),$$

which I can only understand to be true if f is bijective. Am I having a mental blackout?

Thanks,

Miguel

• You need that $f$ is injective and that $P\cup Q\subseteq \operatorname{im}(f)$. Bijectivity is strictly stronger than these conditions. It should be easy to come up with counterexamples when each of these conditions does not hold. – Michael Lee Sep 4 '17 at 17:52
• $P\cup Q\subseteq im(f)$ by assumption. I can see that $f$ must be injective for $\Rightarrow$. But musn't it be onto for $\Leftarrow$? The fact that C is the preimage of $P\cup Q$ does not imply that the image of C will be the whole of $P\cup Q$, does it? – Miguel Santana Sep 4 '17 at 18:02
• I assume you stumbled upon this problem in this proof: Continuous image of connected set is connected: Proof. – Martin Sleziak Sep 4 '17 at 22:14
• Yes, that is true. It seemed like a dead end without using this equivalence, but now I understood I don't actually need it; I just wanted to make sure I was thinking correctly in not using this equivalence. – Miguel Santana Sep 5 '17 at 8:48

So like you said, in order for $f(C)=P \cup Q \implies f^{-1} (P \cup Q) = C$, we would require $f$ to be injective or else this (for instance) is a counterexample:
For the assumption $f^{-1} (P \cup Q) = C \implies f(C)=P \cup Q$, we know that $f^{-1}|_{P \cup Q}$ must be injective, or else $f|_C$ wouldn't be a function. And since $f^{-1}|_{P \cup Q}$ is injective and we know that $\text{im } f^{-1}|_{P \cup Q} = C$, then that indeed implies $f(C)=P \cup Q$.
So you were correct in a way -- only $f|_C$ has to be surjective. In essence, $$f(C)=P\cup Q\iff C=f^{-1}(P\cup Q)$$ is true only if $f|_C$ is a bijection and $f$ is injective. If $C$ can be picked to be any set in $X$, then $f$ must be a bijection.
• Thanks a lot! I just don't understand why $f^{-1}$ must be injective. In the quadratic function you just mentioned, it is not injective but still $x^2$ is a function... – Miguel Santana Sep 4 '17 at 19:18
• @MiguelSantana Quick note, if we have a function $g: A \to B$ and that $X \subseteq A$, then writing $g|_X$ refers to the function $h:X \to B$ defined as $h(x)=g(x)$. – Andrew Tawfeek Sep 4 '17 at 19:29
• @MiguelSantana Anyways, assume for $y_i, y_k \in P \cup Q$ with $y_1\neq y_2$ that $f^{-1}(y_1) = f^{-1}(y_2)$. Then $\exists x_i\in C$ such that $x_i \mapsto y_1, y_2$. That is, it's mapped to two elements. As a result, $f$ isn't a function anymore. And furthermore, we would have $$f(C)=\{ f(x_1), f(x_2), \dots, f(x_i), \dots \} = \{ y_1, y_2, \dots , \{ y_i, y_k \}, \dots \} \neq P \cup Q.$$ – Andrew Tawfeek Sep 4 '17 at 19:30
• @MiguelSantana For the case of $f(x)=x^2$, when you look at it's inverse, you look at $\sqrt{x}$, right? That's not it's entire inverse. That's just the inverse of the positive portion of the function. $x^2$ doesn't have an inverse because it's not bijective. If a function has an inverse, then it's inverse needs to be injective (reasoning in previous comment). – Andrew Tawfeek Sep 4 '17 at 19:33
• A bit of a clarification: $f|_C$ can be a bijection, and the problem statement still may not hold if $f$ is not injective. I think your answer could be interpreted to imply this, but I wasn't entirely sure. – Michael Lee Sep 4 '17 at 20:30