Set operations
Set Operations A set operation is an operation that takes two sets and combines them into a new set. There are four main set operations: Union (∪) : Th...
Set Operations A set operation is an operation that takes two sets and combines them into a new set. There are four main set operations: Union (∪) : Th...
Set Operations
A set operation is an operation that takes two sets and combines them into a new set. There are four main set operations:
Union (∪): The union of two sets is a new set containing all elements in either set. For example, the union of sets A and B would be the set of all elements in both A and B, such as {1, 2, 3, 4, 5}.
Intersection (∩): The intersection of two sets is a new set containing only elements that are in both sets. For example, the intersection of sets A and B would be the set of all elements that are in both A and B, such as {1, 2, 3}.
Complement ( complement): The complement of a set is a set containing all elements in the universe (S) that are not in the set. For example, the complement of set A would be the set of all elements in the universe that are not in A, such as {6, 7, 8, 9, 10}.
Difference (difference): The difference between two sets is a new set containing all elements in the first set that are not in the second set. For example, the difference between sets A and B would be the set of all elements in A that are not in B, such as {1, 3, 5} ∩ {2, 4, 6}.
These operations can be combined to create more complex sets. For example, the set of all elements in set A that are not in set B is equal to the difference between set A and set B.
Examples:
Union of sets A and B: {1, 2, 3, 4, 5} ∪ {2, 4, 6, 8, 10} = {1, 2, 3, 4, 5, 6, 8, 10}
Intersection of sets A and B: {1, 2, 3, 4, 5} ∩ {2, 4, 6, 8, 10} = {2, 4, 6}
Complement of the set A: {1, 3, 5} complement {2, 4, 6, 8, 10} = {3, 7, 9}
Difference between sets A and B: {1, 2, 3, 4, 5} ∩ {2, 4, 6, 8, 10} = {2}