Simple question about the pre-image of a set

Define the pre-image of a set $S \subseteq Y$ under $f$ where $f:X \to Y$ by $f^{-1}(S) = \{ x \in X : f(x) \in S \}$

Let $A = \{ 0 , 1\}, B = \{ 0,1,2,3 \}$. Define $f:A \to B$ by $f:x \mapsto x + 1$.

According to this definition, is $f^{-1}( \{ 1, 3 \} ) = \{ 0 \} = f^{-1}(\{ 1 \})$ ?

Or is $f^{-1}( \{ 1, 3 \} ) = \emptyset$ ?

-
Is $0$ such that $0\in A$ and $f(0)\in \{1,3\}$? –  Git Gud Mar 27 '14 at 10:46

$f^{-1}(\{1,3\})=\{0\}$ since, according to definition, $f^{-1}(\{1,3\})=\{x\in A:f(x)\in\{1,3\}\}=\{0\}$.

If $f^{-1}(\{1,3\})=\emptyset$, then there would be no $x\in A$ such that $f(x)\in\{1,3\}$, but $f(0)=1\in\{1,3\}$.

-

We have $$f(0)=1\quad;\quad \underbrace{f(2)}_{\text{not defined since}\; 2\not\in A}=3$$ so the only $x\in A$ such that $f(x)\in\{1,3\}$ is $x=0$ so $$f^{-1}(\{1,3\})=\{0,2\}\cap A=\{0\}$$

-

$f^{-1}(\{1,3\})=\{x\in \{0,1\}:x+1\in \{1,3\}\}=\{0\}$

-

It is generally true that if $f:A\rightarrow B$ and $S\subset B$, then $$f^{-1}(S)=\bigcup_{s\in S}f^{-1}(s)$$ and $$b\in B\setminus f(A)\implies f^{-1}(b)=\varnothing.$$ So, as you have correctly stated, $$f^{-1}(\{1,3\})=f^{-1}(1)\cup f^{-1}(3)=\{0\}\cup\varnothing =\boxed{\{0\}}.$$

-