2.3: Set Difference and Set Complement
- Page ID
- 112166
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\ket}[1]{\left| #1 \right>}\)
\(\newcommand{\bra}[1]{\left< #1 \right|}\)
\(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
\(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
\(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
\(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
\(\newcommand{\expect}[1]{\langle #1 \rangle}\)
\(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)
Set Difference
Definition 1
Let A and B be sets. A - B is the set that consists of all the elements in A but not in B.
A-B can also be written as
Example
Let A = {2, - 5, 1, 6, 10, 0, 4} and B = {3, 5, 4, -2, 5, 11, 8, 6}, then A - B = {2, -5, 1, 10, 0}
Let's also use a Venn Diagram to show the set A - B:
The green area of the set A represents the set A - B, which means that everything falls in the green area is an element in set A - B.
In above Venn Diagram, there are four areas which are color coded by gray, green, army green, and red. We will talk about the area color coded by gray later.
- The green area represents the set A - B;
- The army green area represents the set A
B;
- The red area represents the set of B - A;
- The green area plus the army green area represents the set A;
- The army green area plus red area represents the set B
- The green area + the army green area + the red area represents the set A
B
To use areas to represent sets in a Venn Diagram is very helpful for understanding some of the properties of sets
Example
Let A and B be sets. One of the properties of sets says A = (A - B) (A
B). This is very useful property because it can be used to simplify the complex set expression (A - B)
(A
B) to a single set expression A. But how do we know this is correct? Let's take a look at the following Venn Diagram:
The set A - B is represented by the green area and A B is represented by the army green area. it is very clear that (A - B)
(A
B) is represented by the areas of green area combined with army green area which is the same area that represents the set A.
Using a Venn Diagram is a very effective method for helping us to understand various set properties.
Complement Set
Let A be a set. In Lecture 2.1, we have introduced the notation . We define
as a set that consists of all the elements except the ones that are in the set A. Here the phrase "all the elements" is not quite clear.
What do you mean by "all the elements"? All the elements of what?
When we say "All the elements" we really need to mention the set that we are talking about in this conversation. In other words, we will need to specify the set that all the elements belong to. Normally, the set we are referring to when we are saying "All the elements" is a set that contains all the elements that are in the concern. For example, "All the elements" could mean all the students that are currently enrolled in Fresno City College or could mean all the students that are in computer science major. "All the elements" could also mean all the numbers in a specific set and so on. The set that contains all the elements that are in the concern is called a Universal Set or Universes. Therefore, the definition of is depends on what universal set that we are referring to. For example, let A = {4, 5, 6}, then
= {0, 2, 3, 7, 8, 9} if the universal set U is {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, while
would be {x | x
except 4, 5, 6} if we use
(the set of all integers) as the universal set.
As being discussed above, we have following more precise definition for complement set:
Definition 2
Let U be a universal set and A be a subset of U. The complement set of A, denoted by is a set that contains all the elements in U except those in A. In other words,
In the following Venn Diagram, the gray area represents
With a Venn Diagram, we can easily understand following two equations:
=
=
For equation 1:
In above Venn Diagram, the gray area represents the set on the left side of the equation:
Now, let's take a look the area that represents the set on the right side of the equation:
is represented by the gray area + red area (anything that is outside of circle A)
is represented by the gray area + green area (anything that is outside of circle B)
According to the definition of the intersection
should be presented by the area that represents both
and
and that is gray area.
Conclusion: Since both and
are represented by the same piece of area in the Venn Diagram, they are the same set.
Similarly, we can use above Venn Diagram to verify the second equation. Those equations are the famous DeMorgan's Laws for set equality.
Please complete following exercises:


