In this lesson, you will learn about the set operations, their usages, and examples to better understand the topic.
There are four main set’s operations:
The union of two set A and B is set that contains all elements from both A and B. For example:
A = {1,2} and B ={2,3}, C={5,6,8}, then
A ∪ B = {1,2,3}
A ∪ C = {1,2,5,6,8}
A ∪ C ∪ B = {1,2,3,5,6,8}
venn diagram
The Intersection of two sets A and B is set that all elements that exist in both Sets. For example:
Consider the three sets A = {1,2} and B ={2,3}, C={5,6,8}, then
A ∩ B = {2}
B ∩ C = ∅
A ∩ B ∩ C = ∅
The complement of a set A is the set of all elements in the universal set, but not in Set A. For Example:
Consider the two sets A = { 1, 2} and U = { 1, 2, 3, 4}, find complement of A.
The Complement of set A contains the elements present in the universal U set but not in set A.
\overline{A} = { 3,4}.
graph
The difference of sets A and B, donated by A – B, is set containing all elements in A but not in B. For Example:
If A = {1, 2,5,6} and B = { 1, 2, 3, 4}
Then A – B = {5,6}
Let A={1,3,5,7,9,12}, B={3,4,5,6,7} and C={2,4,6,8,10}, find
A∪B, A∩B, A∩C, A-B, |A∪B|, |A∩C|
Set identities
Below is the list of most used set identities that relate to the various set operations.
The sets A, B, and C below are subsets of a universal set U.
table in the notepad++ file a)