Revision as of 14:07, 7 December 2008 by imported>Richard Pinch
In set theory, the symmetric difference of two sets is the set of elements that belong to exactly one (that is either one or the other but not both) of the sets.
Formally, we define
![{\displaystyle A\bigtriangleup B=\{x\in A\cup B:(x\in A\wedge x\not \in B)\vee (x\not \in A\wedge x\in B)\}.\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b9d25a66351dd742d02c54ebc0d64daac307dd5a)
It can also be expressed as the union of the relative complements
![{\displaystyle A\bigtriangleup B=(A\setminus B)\cup (B\setminus A).\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6135d99d9e568fafc3010f820e83474f3437c279)
The notations
and
are also seen.
In terms of the characteristic function we have
![{\displaystyle \chi _{A\bigtriangleup B}=\chi _{A}+\chi _{B}{\pmod {2}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f6b35f66c6b539535c013b5ddd472406de8d18db)