Symmetric Difference
The symmetric difference contains the elements that belong to exactly one of the two sets. It corresponds to exclusive or (XOR) in logic and is used to compare sets, find changes between lists and in Boolean algebra.
LaTeX
A\,\triangle\,B=(A\setminus B)\cup(B\setminus A),\qquad |A\,\triangle\,B|=|A|+|B|-2|A\cap B|Variables
- sets
- symmetric difference
Example
, . Find .
- , .
- Size check: .
Answer: .