functional equality of unions/intersections 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?
 A: 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(y)=x$, 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)$. Viceversa 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\}.$ 
A: 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)$.
A: 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!
