2. Set operations: Union
ïŹ Formal definition for the union of two sets:
A U B = { x | x â A or x â B } or
A U B = { x â U| x â A or x â B }
ïŹ Further examples
ï§ {1, 2, 3} âȘ {3, 4, 5} = {1, 2, 3, 4, 5}
ï§ {a, b} âȘ {3, 4} = {a, b, 3, 4}
ï§ {1, 2} âȘ â = {1, 2}
ïŹ Properties of the union operation
ï§ AâȘâ =A Identity law
ï§ AâȘU=U Domination law
ï§ AâȘA=A Idempotent law
ï§ AâȘB=BâȘA Commutative law
ï§ A âȘ (B âȘ C) = (A âȘ B) âȘ C Associative law
7. Disjoint sets
ïŹ Formal definition for disjoint sets:
two sets are disjoint if their intersection is the
empty set
ïŹ Further examples
ï§ {1, 2, 3} and {3, 4, 5} are not disjoint
ï§ {a, b} and {3, 4} are disjoint
ï§ {1, 2} and â are disjoint
âą Their intersection is the empty set
ï§ â and â are disjoint!
âą Because their intersection is the empty set
8. Set operations: Difference
ïŹ Formal definition for the difference of two sets:
A - B = { x | x â A and x â B }
ïŹ Further examples
ï§ {1, 2, 3} - {3, 4, 5} = {1, 2}
ï§ {a, b} - {3, 4} = {a, b}
ï§ {1, 2} - â = {1, 2}
âą The difference of any set S with the empty set will be the
set S