There is an assignment which I need to complete for school and I have absolutely no clue on how to solve the following question.
If A and B are sets and $f: A \rightarrow B$, then for any subset $S$ of $A$ we define
$f(S) = \{ b \in B:b = f(a)$ for some $a \in S\}.$
Similarly, for any subset $T$ of $B$ we define the pre-image of $T$ as
$f^{-1} (T) = \{a \in A : f (a) \in T\}$
Note that $f^{-1} (T)$ is well defined even if $f$ does not have an inverse!
Now let $f: \mathbb{R} \rightarrow \mathbb{R}$ be defined as $f(x) = x^2$. Let $S_1$ denote the closed interval $[-2,1]$, that is all $x\in \mathbb{R}$ that satisfy $-2\le x\le1$, and let $S_2$ be the open interval $(-1,2)$, that is all $x\in \mathbb{R}$ that satisfy $-1 < x<2$. Also let $T_1 = S_1$ and $T_2 = S_2$.
Determine
$f(S_1\cup S_2)$, $f(S_1)\cup f(S_2)$, $f(S_1 \cap S_2)$, $f(S_1) \cap f(S_2)$,
and
$f^{-1} (T_1 \cup T_2)$, $f^{-1} (T_1) \cup f^{-1}(T_2)$, $f^{-1} (T_1 \cap T_2)$, and $f^{-1} (T_1) \cap f^{-1}(T_2)$