# Characteristic function of union of two sets formula and intuition

Is there an easier proof or way to calculate $1[A \cup B]$? I loathe this because you need a trick to see $1[A \cup B] = 1 - 1[A \cup B]^C$
$= 1 - 1[A^C \cap B^C] = 1 - 1[A1 - I[A^C]I[B^C]$ $= 1 - (1 - I[A])(1 - I[B])$
And is there some intuition behind this?

$P(A \cup B) = P(A) + P(B) - P( A \cap B)$ lead me to try $1[A \cup B] = 1[A] + 1[B] - 1[A \cap B]$. I didn't get anywhere. I don't know if this is true.

-

Look here for a generalization of the inclusion-exclusion principle:

http://www.compsci.hunter.cuny.edu/~sweiss/resources/inclusion_exclusion.pdf

What you are looking for follows from that.

-

If you go backwards it is like $A \cup B = (A^c \cap B^c)^c$.

Another way: We obviously have $A \cup B = (A \setminus B) \cup (B \setminus A) \cup (A \cap B)$. This is a disjoint union and we obtain. $$1_{A \cup B} = \underbrace{1_{A \setminus B}}_{1_A - 1_{A \cap B}} + \underbrace{1_{B \setminus A}}_{1_B - 1_{A \cap B}} + 1_{A \cap B}.$$ Using $1_{A \cap B} = 1_A 1_B$ yields $$1_{A \cup B} = 1_A + 1_B - 1_A 1_B = 1 - 1 + 1_A + 1_B - 1_A1_B = 1 - (1 - 1_A)(1 - 1_B).$$

-