Union, Intersection, and Difference of Sets

Union

If \(A\) and \(B\) are sets, the union \(C\) of \(A\) and \(B\), written \(C=A\cup B\), is the set of elements of either \(A\) or \(B\) or both.

\[ A\cup B=\{x: x\in A \mathrm{\ or\ } x\in B\}. \]

\[\{1,2,3\}\cup\{3,5,6\}=\{1,2,3,5,6\}\]

Intersection

If \(A\) and \(B\) are sets, the intersection \(C\) of \(A\) and \(B\), written \(C=A\cap B\), is the set of elements in both \(A\) and \(B\).

\[ A\cap B = \{x: x\in A \mathrm{\ and\ } x\in B\}. \]

\[\{1,2,3\}\cap\{3,5,6\}=\{3\}\]

Difference

If \(A\) and \(B\) are sets, the difference \(C\) of \(A\) and \(B\), written \(C=A-B\), is the set of elements in \(A\) but not in \(B\).

\[ A-B=\{x:x\in A \mathrm{\ and\ } x\not\in B\}. \]

\[\{1,2,3\} - \{3,5,6\} = \{1,2\}\]

Example

\(A=\{0,1\}\) and \(B=\{1,2\}\). What is \((A\times B)\cap (B\times B)\)?

Example

Let \(X=[1,3]\times [1,3]\) and \(Y=[2,4]\times [2,4]\) in \(\mathbb{R}^{2}\). Sketch the sets

  • \(X\cup Y\)
  • \(X\cap Y\)
  • \(X-Y\)
  • \(Y-X\)