# Set theory function injection/surjection proof

$f:A \to B$ is a function and let $A_1,A_2 \subset A$ and $B_1,B_2 \subset B$.

Prove that

(a) If $f$ is injective then $f(A_1)=f(A_2)$ implies $A_1=A_2$.

(b) If $f$ is surjective then $f^{-1}(B_1)=f^{-1}(B_2)$ implies $B_1=B_2$.

For (a) I know that the definition of injectivity is

$f(x_1)=f(x_2)$ implies $x_1=x_2$. But I have no idea how this can be related to the subsets. Any help would be much appreciated.

• What do you mean by $f(A_1)$? – AsafHaas Apr 17 '17 at 18:05
• Hint (for a): Suppose $A_1\neq A_2$. Then either we can find $x\in A_1,x\notin A_2$ or $x\in A_2,x\notin A_1$. Show that $f(x)$ is in one of $f(A_1),f(A_2)$ but not the other. – lulu Apr 17 '17 at 18:11

## 2 Answers

** hint for (a) **

to prove that $A_1=A_2$,

we will show that

$A_1\subset A_2$ and $A_2\subset A_1$.

let $a\in A_1$.

$a\in A_1\implies f(a)\in f (A_1)$

$f (A_1)=f (A_2)\implies f (a)\in f (A_2)$

$\implies \exists b\in A_2:\;f (a)=f (b)$

but $f$ is injective thus $a=b\in A_2$

which proves that $A_1\subset A_2$

by the same we get the others.

Hint for (b):

We always have $f(f^{-1}(B)\subseteq B$. If moreover $f$ is surjective then $f(f^{-1}(B))=B$.

• Thank you for the help. But could you help me get started. Do I take an arbitrary element out of $f^{-1}(B_1)$ and show that $B_1 \subset B_2$ and vice versa? – Cruso James Apr 18 '17 at 8:47
• If you have no problems with the hint I gave you (is that the case?), then you are ready: $f^{-1}(B_1)=f^{-1}(B_2)\implies f(f^{-1}(B_1))=f(f^{-1}(B_2))$ where (according to the hint) the LHS equals $B_1$ and the RHS equals $B_2$. – drhab Apr 18 '17 at 8:51
• Oh that made it clear for me ! Thank you very much! – Cruso James Apr 18 '17 at 8:54
• You are welcome – drhab Apr 18 '17 at 8:55