Set operations
A set is a well-defined collection of distinct elements.
Union
The union of two sets A and B is a new set containing all the elements present in either set A, B or both. It is represented as:
Example
If set
Then,
Intersection
The intersection of two sets A and B is a set that contains all the elements common to both set A and set B.
It is represented as
Example
If set
Then,
Difference
The difference between two sets A and B is a set that contains all the elements of set A that are not present in set B.
It is represented as
Example
If set
Then,
Complement
The complement of a set A is a set that contains all the elements that are not present in set A but exist in the universal set
It is represented as
Example
If set
Then,
Cartesian product
Given two sets A and B, the cartesian product is the set of all possible ordered pairs
Example
If set
Then,
Conclusion
Set operations are fundamental mathematical concepts that allow us to combine, compare, and manipulate sets, providing valuable data organization and analysis tools.
What is the result of the union of two sets A = {1, 2, 3} and B = {3, 4, 5}?
{1, 2, 3, 4, 5}
{1, 2, 3}
{1, 2, 3, 3, 4, 5}
Free Resources