Image of Set Difference under Mapping

Theorem
Let $f: S \to T$ be a mapping.

The image of the set difference of two subsets of $S$ is a subset of the set difference of the images.

That is:

Let $S_1$ and $S_2$ be subsets of $S$.

Then:
 * $f \left[{S_1}\right] \setminus f \left[{S_2}\right] \subseteq f \left[{S_1 \setminus S_2}\right]$

where $\setminus$ denotes set difference.

Proof
As $f$, being a mapping, is also a relation, we can apply Image of Set Difference under Relation:


 * $\mathcal R \left[{S_1}\right] \setminus \mathcal R \left[{S_2}\right] \subseteq \mathcal R \left[{S_1 \setminus S_2}\right]$

Note
Note that equality does not hold in general.

Let:
 * $S_1 = \left\{{x \in \Z: x \le 0}\right\}$
 * $S_2 = \left\{{x \in \Z: x \ge 0}\right\}$
 * $f: \Z \to \Z: \forall x \in \Z: f \left({x}\right) = x^2$

We have:
 * $S_1 \setminus S_2 = \left\{{-1, -2, -3, \ldots}\right\}$
 * $f \left[{S_1}\right] = \left\{{0, 1, 4, 9, 16, \ldots}\right\} = f \left[{S_2}\right]$

Then from Set Difference with Self is Empty Set:
 * $f \left[{S_1}\right] \setminus f \left[{S_2}\right] = \varnothing$

but:
 * $f \left[{S_1 \setminus S_2}\right] = f \left[{\left\{{x \in \Z: x > 0}\right\}}\right] = \left\{{1, 4, 9, 16, \ldots}\right\}$