# Sets and functions proof help needed

I have a quiz tomorrow and while I was studying, I saw these questions at the book. Could you please help me to find the proper ways to solve these?

Let $A$ and $B$ be sets, and let $f : A \to B$ be a function defined in $A$ with values in $B$.

1. Prove the formula $f(A\cup B) = f(A)\cup f(B)$.

2. Is it true that $f(A\setminus B) \subset f(A)\setminus f(B)$?

3. Is it true that $f(A\setminus B) \supset f(A)\setminus f(B)$?

Here is what I have done so far:

1. I could not find a point to start proof.

2. is wrong. If we take $f(x) = x^2$, then $f(2) = 4$ and it is not an element of $f(A)\setminus f(B)$.

3. is wrong. Because if we again take $f(x) = x^2$, $A = \{0, 1, 2, 3, \dots\}$, $f(A) = B = \{0, 1, 4, 9, 16, 25, 36, \dots\}$, $f(B) = \{0, 1, 16, 81, \dots\}$, $f(A\setminus B) = \{2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, \dots\}$, $f(A)\setminus f(B) = \{4, 9, \dots\}$. $9 \in f(A)\setminus f(B)$ but $9\notin f(A\setminus B)$ therefore $f(A)\setminus f(B)$ is not a subset of $f(A\setminus B)$.

Regards.

-
$f(A/B)$ is not $\{{2,3,4,5,6,7,8,10,\dots\}}$. –  Gerry Myerson Sep 30 '12 at 13:09
(c) is true: If $x\in f(A)\setminus f(B)$ then there is some $a\in A$ such that $f(a)=x$. Then $a\notin B$ since otherwise $f(a)=x$ would be in $f(B)$ which it is not (since we assumed that $x\notin f(B)$). Thus $a\in A\setminus B$ which implies that $x\in f(A\setminus B)$. –  Apostolos Sep 30 '12 at 13:17
@GerryMyerson ops you are right. I was not careful enough. –  Amadeus Bachmann Sep 30 '12 at 16:47
@Apostolos much appreciated! –  Amadeus Bachmann Sep 30 '12 at 16:49
The third part is answered here. –  Martin Sleziak Oct 2 '13 at 10:57

Hint for a:

To show $f(A)\cup f(B) \subset f(A\cup B)$:

Suppose that $x \in f(A)\cup f(B)$. Then $x \in f(A)$ or $x \in f(B)$. Suppose it lies in $f(A)$, what does that mean and how does it relate to $f(A\cup B)$?

To show $f(A)\cup f(B) \supset f(A\cup B)$:

If $x \in f(A\cup B)$, then that means that there exists some element in $A$ or $B$ that maps to $x$. How does that relate to $f(A)$ and $f(B)$.

-
@acryl thank you so much for you help! –  Amadeus Bachmann Sep 30 '12 at 16:39

For (a), start by writing down what $f(A\cup B)$ and $f(A)\cup f(B)$ mean. Then try to prove that if $x$ is in the one, then it's also in the other.

-
I really appreciate your help. –  Amadeus Bachmann Sep 30 '12 at 16:40

(a) Do you know the definition of $f(S)$ where $S$ is a set? How about a definition of $\cup$?

(b) It is wrong, but your proof is bad. It doesn't even consider and set differences. For a better proof, try working with a constant function.

-
so you say that take f(x)=2 and then, f(A)=2, B={2} and also f(B)=2. f(A\B)=2 and f(A)\f(B)=?? I am stuck at here. Could you please help me? –  Amadeus Bachmann Sep 30 '12 at 16:43
Take $f(x) = 2$, $A = \{1, 2\}$, $B = \{2\}$, then $f(A \setminus B) = f(\{1\}) = \{2\}$ but $f(A) \setminus f(B) = \{2\} \setminus \{2\} = \emptyset$. You seem to be forgetting that it is sets you are dealing with. –  Karolis Juodelė Sep 30 '12 at 17:12
you are right. at first I was kind of confused at the notation that while f(x)=2, why f(A)={2}. but then I read your reply again and noticed that I was really forgetting that I was dealing with sets. Thank you so much for your help! –  Amadeus Bachmann Sep 30 '12 at 21:32