Equality between two sets I need some help in the following exercise:
Let $X$, $Y$ be arbitrary sets and let $f : X \to Y$ be an arbitrary function. Prove
(1) $f \left(\bigcup A_i\right)= \bigcup f(A_i)$
(2) $f \left(\bigcap A_i\right) \subseteq \bigcap f(A_i)$
Can anyone give me a hint? 
 A: Note: Old habits die hard; I am using $\subset$ to denote what you
refer to as $\subseteq$.
As I mentioned in the comments, if $A\subset X$,
$$
f\left(A\right)\equiv\left\{ y\in Y\mid y=f\left(x\right)\text{ for some }x\in A\right\} .
$$
(1) To show that two sets are equal (i.e. to show that, for example,
$f\left(\bigcup A_{i}\right)=\bigcup f\left(A_{i}\right)$), you can
show that they one is a subset of the other, and vice versa (i.e.
$f\left(\bigcup A_{i}\right)\subset\bigcup f\left(A_{i}\right)$ and
$\bigcup f\left(A_{i}\right)\subset f\left(\bigcup A_{i}\right)$).
Suppose $y\in f\left(\bigcup A_{i}\right)$. Then, there exists some
$x\in\bigcup A_{i}$ s.t. $f\left(x\right)=y$. Since $x\in\bigcup A_{i}$,
it must be in one of the sets $A_{i}$ for some particular $i$. Therefore,
$y\in f\left(A_{i}\right)$ and hence $y\in\bigcup f\left(A_{i}\right)$.
This proves that $f\left(\bigcup A_{i}\right)\subset\bigcup f\left(A_{i}\right)$.
Now you just need to finish the other direction (i.e. $\bigcup f\left(A_{i}\right)\subset f\left(\bigcup A_{i}\right)$).
Start by assuming $y\in\bigcup f\left(A_{i}\right)$ and continue
as above.
(2) This is essentially the same idea except it's even easier than
(1) because you only need to do one of the ``directions.''
Answer to your second question:
Let $y\in f\left(\bigcap A_{i}\right)$. Then there exists some $x\in\bigcap A_{i}$
s.t. $f\left(x\right)=y$. That is, for each $i$, $x\in A_{i}$.
In other words, $y\in f\left(A_{i}\right)$ for each $i$, and hence
$y\in\bigcap f\left(A_{i}\right)$. This proves (2). Suppose now that
$y\in\bigcap f\left(A_{i}\right)$. Then for each $i$, $y\in f\left(A_{i}\right)$.
Then, for each $i$, there exists some $x_{i}\in A_{i}$ s.t. $f\left(x_{i}\right)=y$.
However, it is not necessarily true that $\bigcap A_{i}$ contains
any of these $x_{i}$!
This suggests that when the function $f$ is injective (i.e. for all
$x,x^{\prime}\in X$, $f\left(x\right)=f\left(y\right)\iff x=x^{\prime}$),
we have equality. So all you need to think of is a function that is
not injective. Take for example $f\colon\mathbb{R}\rightarrow\mathbb{R}$,
$f\left(x\right)=x^{2}$. Consider $A_{1}=\left\{ 1\right\} $ and
$A_{2}=\left\{ -1\right\} $. Then $\bigcap A_{i}=\emptyset$ and
hence $f\left(\bigcap A_{i}\right)=f\left(\left\{ 1\right\} \bigcap\left\{ -1\right\} \right)=f\left(\emptyset\right)=\emptyset$.
However, $\bigcap f\left(A_{i}\right)=f\left(A_{1}\right)\bigcap f\left(A_{2}\right)=\left\{ 1\right\} \bigcap\left\{ 1\right\} =\left\{ 1\right\} \supset\emptyset=f\left(\bigcap A_{i}\right).$
