[Math] Symmetric difference and indicator function

elementary-set-theory

Associativity of symmetric difference of sets

In that post it said the symmetric difference is $$1_{A\mathbin{\Delta} B} = 1_A + 1_B – 1_{A\cap B}$$

Why is it not $$1_{A\mathbin{\Delta} B}=1_A+1_B-2(1_{A\cap B})$$

I can't really see why.

Best Answer

You are correct.

On $A\cap B$, the idicator function of $A\mathbin\Delta B$ should be $0$. However, the function $1_A + 1_B - 1_{A\cap B}$ has the value $1 + 1 - 1 = 1$ on $A\cap B$ and is the indicator function of $A\cup B$.

Another way to see $1_{A\mathbin\Delta B}= 1_A + 1_B - 2(1_{A \cap B})$ is to realize that $$1_{A\setminus B} = 1_A - 1_{A\cap B}$$ and $$1_{B \setminus A} =1_B - 1_{B \cap A}.$$

Since $A\mathbin\Delta B = (A\setminus B) \cup (B \setminus A)$ and this union is disjoint, you can write $1_{A \Delta B}$ as the sum of these.

Related Question