Set Union
Calculator for computing set unions with comprehensive formulas and examples
Set Union Calculator
What is calculated?
The union A ∪ B contains all elements that are in at least one of the two sets A or B. It forms the "total" of both sets without duplicates.
Set Union Info
Properties
Set Union A ∪ B:
- Commutative: A ∪ B = B ∪ A
- Associative: (A ∪ B) ∪ C = A ∪ (B ∪ C)
- Idempotent: A ∪ A = A
- A ⊆ (A ∪ B) and B ⊆ (A ∪ B)
Venn diagram of set union
Memory aid: "All elements that are in at least one of the two sets."
Inclusion-Exclusion Principle
Number of elements in the union
Examples
{1,2,3} ∪ {2,3,4} = {1,2,3,4}
{1,2} ∪ {3,4} = {1,2,3,4}
{1,2} ∪ {1,2,3} = {1,2,3}
Related Operations
Set Union Formulas
Basic Definition
Commutative Law
Associative Law
Distributive Laws
Idempotence
Neutral/Absorbing Elements
Detailed Calculation Example
Example: A = {1,2,3,4,5,6}, B = {4,5,6,7,8,9}
Given:
- A = {1, 2, 3, 4, 5, 6}
- B = {4, 5, 6, 7, 8, 9}
Step 1 - Collect all elements:
Step 2 - Remove duplicates:
Verification with cardinality:
Interpretation: The union contains all distinct elements from both sets, with common elements counted only once.
Inclusion-Exclusion Principle
The fundamental principle for calculating cardinalities
For two sets:
Reason: Common elements would otherwise be counted twice
For three sets:
- |A ∩ B| - |A ∩ C| - |B ∩ C|
+ |A ∩ B ∩ C|
Practical Example
Survey in a class of 30 students:
Soccer: 18 students
Basketball: 12 students
Both sports: 8 students
At least one sport:
|S ∪ B| = 18 + 12 - 8 = 22 students
Result: 22 out of 30 students play at least one of the two sports.
Set Union Laws
Fundamental laws of set theory
Absorption Law
Absorption of intersection
De Morgan 1
Complement of union
Distributive Law
Distribution over intersection
Monotonicity
Monotonicity property
Example for Absorption Law
Given: A = {1,2,3}, B = {2,3,4}
A ∪ (A ∩ B) = {1,2,3} ∪ {2,3} = {1,2,3} = A ✓
Mathematical Properties
Basic Properties
- Upper bound: A ⊆ (A ∪ B) and B ⊆ (A ∪ B)
- Commutativity: A ∪ B = B ∪ A
- Associativity: (A ∪ B) ∪ C = A ∪ (B ∪ C)
- Idempotence: A ∪ A = A
Special Properties
- Neutral element: A ∪ ∅ = A
- Absorbing element: A ∪ U = U
- Complement: A ∪ Ac = U
- Least upper bound: A ∪ B is the smallest set containing A and B
Important Notes
Size relationship: |A ∪ B| ≥ max(|A|, |B|)
Supremum: A ∪ B is the supremum (least upper bound) of A and B
Practical Applications
Databases
- SQL UNION operations
- Merging datasets
- Aggregated queries
- Master data management
Social Networks
- Combining friend lists
- Interest groups
- Recommendation systems
- Community building
Data Analysis
- Creating total populations
- Combining categories
- Survey evaluations
- Market research