Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We were ask to prove that $|A \cup B| = |A| + |B| - |A \cap B|‫‪$. It was easy to prove it using a Venn diagram, but I think we might be expected to do if more formally. Is there a formal way?

share|cite|improve this question
What does $|A|$ mean? Is $|\cdot|$ a measure? Or maybe the sets are finite? – Jeff Nov 14 '11 at 16:44
just observe that if you do $|A|+|B|$ you count twice the elements in $A\cap B$. – Valerio Capraro Nov 14 '11 at 16:48
Suppose that you want to give a dollar to everyone in $A\cup B$. If you give a dollar to everyone in $A$, and then give a dollar to everyone in $B, \dots$. – André Nicolas Nov 14 '11 at 17:21
I am fairly certain that this question appeared here perhaps infinitely many times before. I cannot find it though... – Asaf Karagila Nov 14 '11 at 18:22
up vote 7 down vote accepted

$A\cup B = (A\setminus B) \cup (B\setminus A) \cup (A\cap B)$. These three sets are disjoint, so $$ |A\cup B| = |A\setminus B| + |B\setminus A| + |(A\cap B)| $$ But $A\setminus B = A\setminus(A\cap B)$, so $|A\setminus B|=|A|-|A\cap B|$. A similar equality holds for $|B \setminus A|$. Substitution of these into the displayed equation above yields your result.

Of course, one might need to formally show that $|A\setminus (A\cap B)| = |A|-|A\cap B|$. I can't decide if this is any less obvious than the original proposition...

share|cite|improve this answer
I have seen $A \setminus B$, $A \smallsetminus B$ and $A - B$ used to denote set difference, but not $A / B$. Do you normally use that notation? =) – Srivatsan Nov 14 '11 at 16:59
Is using a forward slash for set difference standard notation? – Henning Makholm Nov 14 '11 at 17:00
bleech... I'm left/right backslash challenged...I got points taken off for doing that on a topology test once. – David Mitra Nov 14 '11 at 17:00
@David Mitra: The forward slashes were bothersome, so I was changing things to setminus, and in the middle they changed to backslash. Not thinking, I continued. Can turn them to backslash if you wish. – André Nicolas Nov 14 '11 at 17:40
Thanks. \setminus is better of course. I'm not sure if \backslash is a mathop... – David Mitra Nov 14 '11 at 17:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.