The set of elements belonging to one but not both of two given sets. It is therefore the union of the complement
of
with respect to
and
with respect to
,
and corresponds to the XOR operation in Boolean logic. The
symmetric difference can be implemented in the Wolfram
Language as:
SymmetricDifference[a_, b_] :=
Union[Complement[a, b], Complement[b, a]]
The symmetric difference of sets and
is variously written as
,
,
(Borowski and Borwein 1991) or
(Harris and Stocker 1998, p. 3). All but the first
notation should probably be deprecated since each of the other symbols has a common
meaning in other areas of mathematics.
For example, for
and
,
,
since 2, 3, and 5 are each in one, but not both, sets.
See also
Complement Set, Difference, Set Difference, Union, XOR
Explore with Wolfram|Alpha
References
Borowski, E. J. and Borwein, J. M. (Eds.). The HarperCollins Dictionary of Mathematics. New York: HarperCollins, 1991.Harris, J. W. and Stocker, H. Handbook of Mathematics and Computational Science. New York: Springer-Verlag, 1998.
Referenced on Wolfram|Alpha
Cite this as:
Weisstein, Eric W. "Symmetric Difference." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/SymmetricDifference.html