# Symmetric difference

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*.

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

*A*Δ*B* = *A*\\*B* ∪ *B*\\*A*.

It is also the set-theoretic equivalent of the

XOR operation in

Boolean logic.