[Math] the set with characteristic function $\chi_A(x) + \chi_B(x)-\chi_A(x)\chi_B(x)$

characteristic-functionselementary-set-theoryproof-verification

Suppose that $A$ and $B$ are subsets of $X$

Find the subset $C$ whose characteristic function is given by:

$\chi_C(x)=\chi_A(x) + \chi_B(x)-\chi_A(x)\chi_B(x)$

The answer given is $C=(A\cup B) – (A \cap B)$

My answer is $A \cup B$ because:

$\begin{align}
x\in A \cup B & \Rightarrow & x \in A \text{ or } x\in B \\
& \Rightarrow & \chi_A(x)=1 \text { or } \chi_B(x)=1 \\
& \Rightarrow & \chi_C(x)=1\\
\end{align}
$

$\begin{align}
x\notin A \cup B & \Rightarrow & x \in (A^c \cap B^c) \\
& \Rightarrow & x \notin A \text { and } x \notin B \\
& \Rightarrow & \chi_A(x)=0 \text { and } \chi_B(x)=0 \\
& \Rightarrow & \chi_C(x)=0
\end{align}$

What is wrong with my answer and how to I get the correct answer?

Best Answer

Your reasoning is perfectly valid. The given answer is wrong and your answer is correct. One easily checks that if $x\in A\cap B$ then $\chi_C(x)=1+1-1=1$, so $A\cap B\subseteq C$ contrary to what the given answer suggests. Indeed, the characteristic function of $A\triangle B$ is

$$\begin{array}{ll} \chi_{A\triangle B}(x) & =\chi_A(x)\left(1-\chi_B(x)\right)+\chi_B(x)\left(1-\chi_A(x)\right) \\ & =\chi_A(x)+\chi_B(x)-\color{Red}{2}\chi_A(x)\chi_B(x). \end{array} $$

(The symmetric difference is defined by $A\triangle B=(A\cup B)-(A\cap B)$.)

Related Question