Set theory $|A\cup B|=|A|+|B|-|A\cap B|$ I am utterly confused on how to solve this problem. I found a lemma that says $|A\cup B|=|A|+|B|$ is true if the two sets are disjoint which makes sense, but how do I prove the entire statement. 
 A: If the sets are not disjoint, in the right-hand side  $\lvert A\rvert+\lvert B\rvert$, formula, the elements of $A\cap B$ are counted twice.
A: Write the disjoint unions and use your original result. That is:

$$\begin{cases}A\cup B=A\setminus B\cup B\setminus A \cup A\cap B \\ A = A\setminus B \cup A\cap B\\ B=B\setminus A\cup A\cap B\end{cases}.$$

Since you know that these are all disjoint, you can use the original result to write your proof as

$$|A\cup B|=|A\setminus B|+|B\setminus A|+|A\cap B|=(|A\setminus B|+|A\cap B|)+(|B\setminus A|+|A\cap B|)-|A\cap B|.$$

A: $|A|+|B|$ contains twice those elements that are contained in both sets. So, if you want to calculate the true number of elements of $A\cup B$, $|A\cup B|$ then you have to subtract the number of elements that are taken into account twice, that is, you have to subtract $|A\cap B|$ form $|A|+|B|$. As a result
$$|A\cup B|=|A|+|B|-|A\cap B|.$$
A: suppose $x\in A\cup B$ then in left hand you have considered it 1 time. what a bout in right hand 2 event may happen, if $x\notin A\cap B$ then in right hand you count it one time, just in A or B, but if $x\in A\cap B$ then $\color{red}{1=1+1-1}$
A: Consider the function $f:A\cup  B\to A\sqcup \{0\}$ and $g:A\cup B\to B\sqcup\{0\}$ given by $f(x)=x$ if $x\in A$ and $f(x)=0$ in other case; $g(y)=y$ if $y\in B$ and $g(0)=0$ in other case. 
These functions are surjective. Then, $|A\cup B|\leq |A|$ and $|A\cup B|\leq |B|$, and therefore $|A\cup B|\leq |A|+|B|$. 
Since $A$ and $B$ can be included into $A\cup B$ via inclusions with disjoint images (since $A$ and $B$ are disjoint) you also have that $|A|+|B|\leq |A\cup B|$.
