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

I am trying to figure out the word/operation to what is not in the intersection of two sets but is in their union.

How I am going about this now is $$(A \cup B) - (A \cap B)$$

Is there a better way to go about this?

share|cite|improve this question
B is the intersection? You mean &? Do you mean A,B as sets or as singletons? – Asaf Karagila Jun 27 '11 at 19:03
This is called the symmetric difference, BTW. But that's just a name. It's not clear from your question what "better" means, what kinds of sets you're working with, what kinds of operations you can do efficiently, etc. – ShreevatsaR Jun 27 '11 at 19:04
Are you sure you mean $\{A\}\cup\{B\}$ and $\{A\}\cap\{B\}$, and not $A\cup B$ and $A\cap B$? If you mean what you wrote, then you get either $\emptyset$ if $A=B$, and $\{A,B\}$ if $A\neq B$. If you did not mean to have the curly brackets, you want the symmetric difference, which is often denoted by $A\Delta B$. – Arturo Magidin Jun 27 '11 at 19:14
There are many alternative ways of writing the symmetric difference (when you don't have those curly brackets). E.g., for any two sets $A$ and $B$, $$(A\cup B)-(A\cap B) = (A-B)\cup(B-A) = (A\cap B^c)\cup (B\cap A^c).$$ – Arturo Magidin Jun 27 '11 at 20:50
up vote 5 down vote accepted

$$(A \cup B) - (A \cap B)$$ Is called the symmetric difference and is often denoted by $$ A \Delta B $$

It is analogous to the logical "exclusive or" operation (as union is analogous to "or" and intersection is analogous to "and").

share|cite|improve this answer
It's frequently shortened to xor (or XOR). – jd.r Jun 28 '11 at 1:00

$(A \cap B^c)\cup (B\cap A^c)$

share|cite|improve this answer

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.