# Proving functions a formal proof

Let $A$ and $B$ be arbitary sets. Let $S_1$ and $S_2$ be arbitrary subsets of A, and let $T_1$ and $T_2$ be arbitrary subsets of $B$. For each of the following state whether it is True or False. If True then give a proof. If False then give a counterexample: $f(n) = n^2$

1. $f(S_1 ∩ S_2) = f(S_1) ∩ f(S_2)$
2. $f^{-1}(T_1 ∩ T_2) = f^{-1}(T_1) ∩ f^{-1}(T_2)$

Well I know that the first is true but I'm not sure how to give a formal proof. As for the second, I'm not entirely sure how to proceed. Would $f^{-1}$ be $\sqrt n$?

• The first is false. Can you make the right side non-empty while $S_1\cap S_2=\emptyset$ (and thus $f(S_1\cap S_2)$ is empty) ? – Stefan Hamcke Nov 6 '13 at 18:58

The first is not true, and the squaring function gives a way to disprove it. Take $S_1$ to be the set of negative integers and $S_2$ to be the set of positive integers. What is $f(S_1\cap S_2)$? What is $f(S_1)\cap f(S_2)$?
For the second, we are not dealing with the inverse of a function, but rather with a preimage. Namely, if $f:A\to B$ and $T\subseteq B,$ then $$f^{-1}(T):=\{a\in A\mid f(a)\in T\}.$$ Observe that $b\in T_1\cap T_2$ if and only if $b\in T_1$ and $b\in T_2$. Can you use the definition of a preimage, and take it from there?
• I see how the first is false. As for the preimage, let's say I have $S_1 = \{−2, −1, 0, 1\}$ and for $S_2 = \{−1, 0, 1, 2\}$. Based on the given function, how do the negative integers come in play? – Dimitri Nov 6 '13 at 19:09
• Well, if $S_1=\{-2,-1,0,1\}$ and $S_2=\{-1,0,1,2\}$ and $f(n)=n^2,$ then $$f(S_1)\cap f(S_2)=\{0,1,4\}\cap\{0,1,4\}=\{0,1,4\},$$ but $$f(S_1\cap S_2)=f\bigl(\{-1,0,1\}\bigr)=\{0,1\},$$ so that gives you another counterexample. Regarding the pre-image, though, we do not want to use a specific function if we're to prove it. Certainly we can't use $f(n)=n^2,$ since what would the square of an element of an arbitrary set $A$ look like? What we must do is suppose that $f$ is some function from an arbitrary set $A$ to an arbitrary set $B$, and take arbitrary subsets $T_1,T_2\subseteq B.$ – Cameron Buie Nov 6 '13 at 19:29
• Then, we must use the definition of preimage to show that $$f^{-1}(T_1\cap T_2)=f^{-1}(T_1)\cap f^{-1}(T_2).$$ – Cameron Buie Nov 6 '13 at 19:30
• I think I'm confusing the inverse portion and the definition. So if $f(a) \in T$ that would mean that $f^{-1}(T) = \{1,0,4\}$ for $A = \{ -1,0,1,2 \}$ correct? – Dimitri Nov 6 '13 at 19:53
• In fact I don't think that is right at all. If I were to take $f^{-1}(\{0,1\})$ would that give the empty set? I do apologize for this... – Dimitri Nov 6 '13 at 20:15