Characteristic Function of Symmetric Difference

Theorem
Let $A, B \subseteq S$.

Then:


 * $\chi_{A * B} = \chi_A + \chi_B - 2 \chi_{A \cap B}$

where $\chi$ denotes characteristic function, and $*$ denotes symmetric difference.

Proof
By definition of symmetric difference:
 * $A * B = \left({A \cup B}\right) \setminus \left({A \cap B}\right)$

Thus:
 * $\chi_{A * B} = \chi_{A \cup B} - \chi_{\left({A \cup B}\right) \cap \left({A \cap B}\right)}$

by Characteristic Function of Set Difference.

But by Intersection Subset Union and Intersection with Subset is Subset:
 * $\left({A \cup B}\right) \cap \left({A \cap B}\right) = A \cap B$

Hence it follows that:


 * $\chi_{A * B} = \chi_{A \cup B} - \chi_{A \cap B}$

which by Characteristic Function of Union: $(2)$ becomes:


 * $\chi_{A * B} = \chi_A + \chi_B - 2 \chi_{A \cap B}$

as desired.