1

I came across a statement which said that if we have a function $f:X\rightarrow Y$ where $A\subset X$ and $B\subset X$, then its true that $f(A\cup B)=f(A)\cup f(B)$, however its false that $f(A\cap B)=f(A)\cap f(B)$. I do not understand how this is so. Any help?

Asaf Karagila
  • 393,674

3 Answers3

7

Well, to prove the first note that if $y\in f(A\cup B)$ then there exists $x\in A\cup B$ such that $f(x)=y$, but then it may happen that $x\in A$, and in this case $y\in f(A)$ or $x\in B$, and so $y\in f(B)$, in any case $y\in f(A)\cup f(B)$. Vice versa, let $y\in f(A)\cup f(B)$. Then $y$ is in either $f(A)$ or in $f(B)$. Then there exists $x\in A\cup B$ such that $y=f(x)$ and so $y\in f(A\cup B)$.

To prove the other statement, note first that if $y\in f(A\cap B)$, then there exists $x\in A\cap B$, such that $y=f(x).$ Hence $y\in f(a)$ and $y\in f(B)$ so that $f(A\cap B)\subseteq f(A)\cap f(B)$.

To prove that the converse may not hold, consider $A=\{1\}$, $B=\{2\}$ and define $f(1)=f(2)=\{3\}.$ Then $f(A\cap B)=\emptyset$ while $f(A)\cap f(B)=\{3\}.$

mat09
  • 145
uforoboa
  • 7,074
4

Remember that $A=B$ if and only if $x\in A\iff x\in B$, so to verify an equality of sets we need to see that the elements are on both sets, and to show that two sets are different we can just point out an element in one and not in the other.

To see that $f(A\cup B)=f(A)\cup f(B)$, note that:

$$\begin{align} f(x)\in f(A\cup B) &\iff x\in A\cup B\\ &\iff x\in A\text{ or } x\in B\\ &\iff f(x)\in f(A)\text{ or } f(x)\in f(B)\\ &\iff f(x)\in f(A)\cup f(B) \end{align}$$

On the other hand, if $f(x)\in f(A)\cap f(B)$ it just means that for some $a\in A$ we have $f(a)=f(x)$ and for some $b\in B$ we have $f(b)=f(x)$. We can use this to show that this is not the same set.

That is, we can find a function $f\colon X\to Y$, and two sets $A,B\subseteq X$ with some $x\in A$ and $x\notin B$, and $y\in B$ for which $y\notin A$ such that $f(x)=f(y)$. Now try to see why $f(A\cap B)\neq f(A)\cap f(B)$.

Asaf Karagila
  • 393,674
  • @Srivatsan: Of course! Many thanks for catching that mistake! :-) – Asaf Karagila Oct 24 '11 at 00:36
  • 5
    It is not necessarily the case that $f(x)\in f(A) \implies x\in A$. For example here we could have $x$ coming from some other set $C$ which happens to satisfy $f(C)=f(A)=f(B)$. Therefore to prove $f(x)\in f(A)\cup f(B) \implies f(x)\in f(A\cup B)$ we should argue (wlog) $y\in f(A) \implies$ there exists $x\in A$ with $f(x)=y$. This $x$ certainly is in $A\cup B$. Hence $y=f(x)\in f(A\cup B)$. – massy255 Jul 03 '15 at 04:43
3

It should be easy for you to construct an example of sets $A$ and $B$, and a function $f$, such that $f(A\cap B)\ne f(A)\cap f(B)$. You can do it with $A$ and $B$ having 2 elements each, one in common. Try it!

Gerry Myerson
  • 179,216