Set Operations
Set Operations
Union of Sets
For two given sets A and B, A∪B (read as A union B) is the set of distinct
elements that belong to set A and set B or both. The number of elements in A
∪ B is given by n(A∪B) = n(A) + n(B) − n(A∩B), where n(X) is the number of
elements in set X. To understand this set operation of the union of sets better,
let us consider an example: If A = {1, 2, 3, 4} and B = {4, 5, 6, 7}, then the
union of A and B is given by A ∪ B = {1, 2, 3, 4, 5, 6, 7}.
Intersection of Sets
For two given sets A and B, A∩B (read as A intersection B) is the set of
common elements that belong to set A and B. The number of elements in
A∩B is given by n(A∩B) = n(A)+n(B)−n(A∪B), where n(X) is the number of
elements in set X. To understand this set operation of the intersection of
sets better, let us consider an example: If A = {1, 2, 3, 4} and B = {3, 4, 5, 7},
then the intersection of A and B is given by A ∩ B = {3, 4}.
Set Difference
The set operation difference between sets implies subtracting the elements
from a set which is similar to the concept of the difference between numbers.
The difference between sets A and set B denoted as A − B lists all the
elements that are in set A but not in set B. To understand this set operation of
set difference better, let us consider an example: If A = {1, 2, 3, 4} and B = {3,
4, 5, 7}, then the difference between sets A and B is given by A - B = {1, 2}.
Complement of Sets
The complement of a set A denoted as A′ or Ac (read as A complement) is
defined as the set of all the elements in the given universal set(U) that are not
present in set A. To understand this set operation of complement of sets
better, let us consider an example: If U = {1, 2, 3, 4, 5, 6, 7, 8, 9} and A = {1,
2, 3, 4}, then the complement of set A is given by A' = {5, 6, 7, 8, 9}.
The above image shows various set operations with the help of Venn
diagrams. When the elements of one set B completely lie in the other set A,
then B is said to be a proper subset of A. When two sets have no elements in
common, then they are said to be disjoint sets. Now, let us explore the
properties of the set operations.
• Commutative Law - For any two given sets A and B, the commutative property is
defined as,
A∪B=B∪A
This means that the set operation of union of two sets is commutative.
A∩B=B∩A
This means that the set operation of intersection of two sets is commutative.
• Associative Law - For any three given sets A, B and C the associative property is
defined as,
(A ∪ B) ∪ C = A ∪ (B ∪ C)
This means the set operation of union of sets is associative.
(A ∩ B) ∩ C = A ∩ (B ∩ C)
This means the set operation of intersection of sets is associative.
• De-Morgan's Law - The De Morgan's law states that for any two sets A and B, we
have (A ∪ B)' = A' ∩ B' and (A ∩ B)' = A' ∪ B'
• A∪A=A
• A∩A=A
• A∩∅=∅
• A∪∅=A
• A∩B⊆A
• A⊆A∪B
• Set operation formula for union of sets is n(A∪B) = n(A) + n(B) − n(A∩B) and set
operation formula for intersection of sets is n(A∩B) = n(A)+n(B)−n(A∪B).
• The union of any set with the universal set gives the universal set and the intersection
of any set A with the universal set gives the set A.
• Union, intersection, difference, and complement are the various operations on sets.
• The complement of a universal set is an empty set U′ = ϕ. The complement of an empty
set is a universal set ϕ′ = U.