Do we have always $f(A \cap B) = f(A) \cap f(B)$? [closed]

I find a Venn diagram helpful.

venn

The set $f(A\cap B)$ is the purple on the RHS, whereas $f(A)$ is the union of purple and red and $f(B)$ is the union of purple and blue on the right. In order for $f(A\cap B)=f(A)\cap f(B)$, the red and blue regions in the codomain (the right) must be disjoint. However, it should be clear that, at least with sets, this is not generally the case, because all three regions on the right can be controlled for independently by controlling the function $f$ as one wishes. (This aid also helps with OJ's exercise.)


Consider the case where $f$ is constant and $A$ and $B$ are disjoint.


No, they are not equal in general, but you might be able to prove that one side is a subset of the other. Try it out.

Added later: I would also recommend trying to see what you can prove if you look at unions instead of intersections ... and then see what you can find out if you use $f^{-1}$ instead of $f$ - mathematics can be (even) more fun when you try to find things out for yourself!


Let $y \in f(A\cap B)$. So there is an $x \in A\cap B$, so $f(x) = y \in f(A\cap B)$. Then obviously $x \in A$, so $y = f(x) \in f(A)$. Also $x \in B$, so $y = f(x) \in f(B)$. This proves that $f(A\cap B) \subseteq f(A) \cap f(B)$.

Now for the other way: as an example, say that $f: \mathbb{R} \to \mathbb{R}$ and $A = [0,1]$ and $B = [2,3]$, can you find both sides for a simple example of $f$?