Union of Sets Calculator – Find A ∪ B Online
Calculate the union of any two or more sets with our free online union calculator. Returns all unique elements combined from each set with clear set notation.
How the Union of Sets Calculator Works
In set theory, the union of two or more sets combines all elements from each set into a single set. The union is denoted by the symbol ∪. The key rule: each element appears exactly once in the union, even if it appears in multiple input sets.
Mathematically, for sets A and B:
This means the union contains every element that belongs to A, or B, or both. The calculator automatically removes duplicates and sorts the result for easy reading.
The union operation is commutative (A ∪ B = B ∪ A) and associative ((A ∪ B) ∪ C = A ∪ (B ∪ C)), so the order of sets doesn't matter.
Example Union Calculations
Basic Number Sets
Find A ∪ B where A = {1, 2, 3, 4} and B = {3, 4, 5, 6}
A = {1, 2, 3, 4}
B = {3, 4, 5, 6}
A ∪ B = {1, 2, 3, 4, 5, 6}
Note: 3 and 4 appear only once (duplicates removed)
Three-Set Union
Find A ∪ B ∪ C where:
A = {1, 2, 3}
B = {2, 3, 4, 5}
C = {4, 5, 6, 7}
A ∪ B ∪ C = {1, 2, 3, 4, 5, 6, 7}
Total: 7 unique elements
Text/String Sets
Union works with any type of elements:
A = {"apple", "banana", "cherry"}
B = {"banana", "date", "elderberry"}
A ∪ B = {"apple", "banana", "cherry", "date", "elderberry"}
Disjoint Sets
When sets have no common elements (disjoint):
A = {1, 2, 3}
B = {7, 8, 9}
A ∪ B = {1, 2, 3, 7, 8, 9}
|A ∪ B| = |A| + |B| = 6 (no overlap)
Quick Fact: Set Theory's Revolutionary Impact
Georg Cantor (1845-1918) founded set theory in the 1870s while studying trigonometric series. His work was initially controversial—mathematician Leopold Kronecker called Cantor a "scientific charlatan" and attacked his ideas about infinity. Cantor proved that some infinities are larger than others (the set of real numbers is "more infinite" than the set of integers), which seemed paradoxical at the time. Today, set theory is the foundation of all modern mathematics. Every mathematical object—from numbers to functions to spaces—can be defined in terms of sets. The union operation (∪) is one of the fundamental building blocks of this framework.
Frequently Asked Questions
What is the union of two sets?
The union of sets A and B contains all elements that are in A, in B, or in both. It's like combining two groups and removing duplicate members. For example, if A = {1, 2} and B = {2, 3}, then A ∪ B = {1, 2, 3}.
What's the difference between union and intersection?
Union (∪) combines all elements from both sets. Intersection (∩) keeps only elements that appear in both sets. Using A = {1, 2, 3} and B = {2, 3, 4}: A ∪ B = {1, 2, 3, 4} but A ∩ B = {2, 3}.
What happens if one set is empty?
The union of any set A with the empty set ∅ equals A itself: A ∪ ∅ = A. The empty set contributes no elements, so the union is unchanged. This makes the empty set the "identity element" for union, similar to how 0 is the identity for addition.
How do I calculate the size of a union?
For two sets: |A ∪ B| = |A| + |B| - |A ∩ B|. You add the sizes, then subtract the overlap (elements counted twice). For A = {1,2,3} and B = {3,4,5}: |A ∪ B| = 3 + 3 - 1 = 5.
Can I union sets with different types of elements?
Yes! Sets can contain numbers, strings, or any objects. The union simply combines all unique elements. However, mixing types might not be mathematically meaningful in some contexts, so use judgment based on your application.
What is the complement of a set?
The complement of set A (written A' or Aᶜ) contains everything not in A, relative to a universal set U. For example, if U = {1,2,3,4,5} and A = {1,2}, then A' = {3,4,5}. De Morgan's Laws relate complement to union: (A ∪ B)' = A' ∩ B'.
Where is set union used in real applications?
Set union appears in database queries (SQL UNION), programming (combining arrays or lists), probability (P(A or B)), search engines (combining result sets), and data analysis (merging datasets). It's a fundamental operation in any field that handles collections of data.
Other Free Tools
Intersection of Sets Calculator – Find A ∩ B Online
Find the intersection of any two or more sets with our free online intersection calculator. Identifies all common elements shared between sets with clear notation.
Set Difference Calculator – Find A − B Online
Calculate the difference between any two sets with our free online set difference calculator. Find all elements that are in set A but not in set B instantly.
Complement of a Set Calculator – Find Set Complement Online
Find the complement of any set with respect to a universal set using our free online complement calculator. Get all elements in the universal set not present in the given set.
Subset Checker – Check if A is a Subset of B Online
Check whether a set is a subset or proper subset of another set with our free online subset checker. Instantly verify set containment relationships with clear explanations.
Power Set Generator – Find All Subsets of a Set Online
Generate the complete power set (all subsets) of any set with our free online power set generator. Lists every possible subset from empty set to the complete set.
Cartesian Product Calculator – Find A × B Online
Calculate the Cartesian product of any two sets with our free online calculator. Lists all ordered pairs in A × B for set theory, relations, and combinatorics applications.
Venn Diagram Tool – Create 2 & 3 Set Venn Diagrams Online
Create interactive Venn diagrams for 2 or 3 sets with our free online tool. Visualize union, intersection, and set differences with customizable labels and shading.
Probability Calculator – Calculate Probability of Events Online
Calculate the probability of any event with our free online probability calculator. Find simple, complementary, and conditional probabilities with formula explanations.