In mathematics, the symmetric difference of two sets A and B is the set of elements which are in one of either set, but not in both. The most common notation used for symmetric difference is AΔB.


AΔB in Venn diagram

The symmetic difference is equivalent to the union of both complementss, that is:

AΔB = A\\BB\\A.

It is also the set-theoretic equivalent of the XOR operation in Boolean logic.