In set theory, the symmetric difference of two sets A and B is the set of elements either in A or in B but not in both.