Proof of the union of two indicator functions

3.8k Views Asked by At

How do I prove that

$$1_{A∪B} = 1_A + 1_B - 1 _{A∩B}$$ ?

For the proof of intersection I found on mathexchange that:

\begin{align}1_A(x)1_B(x)&=\begin{cases} 1& x\in A\\ 0& x\in A^C \end{cases}\begin{cases} 1& x\in B\\ 0& x\in B^C \end{cases}\\&=\begin{cases} 1& x\in A \cap x\in B\\ 0\cdot 1& x\in A^C\cap B\\ 1\cdot 0& x\in A \cap B^C\\ 0\cdot 0& x\in A^C \cap B^C\\ \end{cases}\\&=\begin{cases} 1& x\in A \cap B\\ 0& x\in \underbrace{(A^C\cap B)\cup(A \cap B^C )\cup(A^C \cap B^C)}_{=(A\cap B)^C}\\ \end{cases}\\&=1_{A\cap B}(x)\end{align}

I tried to do the same thing as in writing $ 1_A + 1_B - 1 _{A∩B}$ out like that but ended up getting really confused and can't seem to be able to prove this.

\begin{align}1_A(x)+1_B(x)-1_A(x)1_B(x)&=\begin{cases}...+\begin{cases}...-\begin{cases} \end{cases}\end{cases}\end{cases}...\end{align}

3

There are 3 best solutions below

1
On BEST ANSWER

Distinguish between the following cases:

  1. $x\in A\setminus B$,
  2. $x\in B\setminus A$,
  3. $x\in A\cap B$.

These are all disjoint cases and $A\cup B= (A\setminus B) \cup (B\setminus A) \cup (A\cap B)$. Now, if $1_{A\cup B}(x)=1$ then only one of the above holds. You can then verify that both sides are equal in $1_{A\cup B}= 1_A+1_B-1_{A\cap B}$ for each of these three cases and you are done since then the functions have equal values for all $x$ (trivially if the left hand side is zero then the right hand side is also).

0
On

It's simple:

  • on the complementary set of $A\cup B$, $1_A, 1_B$ and $1_{A\cap B}$ are all $0$;
  • on $A\setminus B$ only $1_A$ is one. Similarly, on $B\setminus A$, only $1_B$ is $1$;
  • on $A\cap B$, $1_A, 1_B$ and $1_{A\cap B}$ are all $1$.
0
On

Use that if you have disjoint sets, such as $A$ and $A^\complement\cap B$, then the indicator for the union equals the sum of the indicators for the disjoint sets. $$\mathbf 1_{A\cup (A^\complement\cap B)}=\mathbf 1_{A}+\mathbf 1_{A^\complement\cap B}$$

Because an element cannot be in both sets, by definition of disjoint, so if $\mathbf 1_A=1$ then $\mathbf 1_{A^\complement\cap B}=0$ and vice versa, therefore their sum is $\mathbf 1_{A\cup(A^\complement\cap B)}$


Now simply note that $A\cup B$ equals $(A\cap B^\complement)\cup(A\cap B)\cup(A^\complement \cap B)$ which is a union of disjoint sets.