Set Theory Calculator
Perform set operations including Union (A ∪ B), Intersection (A ∩ B), Difference (A − B), Symmetric Difference (A ∆ B), Cartesian Product (A × B), Power Set, and Complement. Visualize with interactive Venn diagrams.
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by going Premium (ad‑free + faster tools), or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade to Premium (ad‑free)
About Set Theory Calculator
What Is Set Theory?
Set theory is a branch of mathematical logic that studies collections of objects called sets. Founded by Georg Cantor in the 1870s, it has become the foundation of virtually all modern mathematics. A set is defined by its members — two sets are equal if and only if they have exactly the same elements.
- Discrete Mathematics — the basis for combinatorics, graph theory, and formal languages
- Computer Science — data structures (HashSet, TreeSet), database queries (JOIN = intersection, UNION = union), and type systems
- Probability — events are modeled as sets, with union and intersection corresponding to OR and AND events
- Logic — Venn diagrams visualize logical relationships; set operations mirror logical operators
How to Use This Set Theory Calculator
Enter the elements of each set separated by commas. You can use numbers, letters, words, or any text as elements. The calculator will automatically compute all major set operations and display interactive Venn diagrams.
- Type elements separated by commas — e.g.,
1, 2, 3, 4, 5orapple, banana, cherry - Use Set C (optional) for three-set operations and triple Venn diagrams
- Define a Universal Set to calculate complements (Aᶜ, Bᶜ)
- Click on the Venn diagram operation buttons to highlight different regions
- Use the Properties tab to check cardinality, subset relationships, and set equality
Set Operations Reference
| Operation | Notation | Description | Example |
|---|---|---|---|
| Union | A ∪ B | Elements in A or B (or both) | {1,2,3} ∪ {3,4,5} = {1,2,3,4,5} |
| Intersection | A ∩ B | Elements in both A and B | {1,2,3} ∩ {3,4,5} = {3} |
| Difference | A − B | Elements in A but not in B | {1,2,3} − {3,4,5} = {1,2} |
| Symmetric Difference | A ∆ B | Elements in A or B but not both | {1,2,3} ∆ {3,4,5} = {1,2,4,5} |
| Cartesian Product | A × B | All ordered pairs (a,b) where a∈A, b∈B | {1,2} × {a,b} = {(1,a),(1,b),(2,a),(2,b)} |
| Power Set | ℘(A) | All possible subsets of A | ℘({1,2}) = {∅,{1},{2},{1,2}} |
| Complement | Aᶜ | Elements in Universal set but not in A | If U={1,2,3,4,5}, A={1,2} → Aᶜ={3,4,5} |
| Is Subset | A ⊆ B | Whether every element of A is also in B | {1,2} ⊆ {1,2,3} = True |
Key Set Theory Laws
These fundamental laws govern how set operations interact, similar to the laws of algebra for numbers:
- Commutative: A ∪ B = B ∪ A and A ∩ B = B ∩ A
- Associative: (A ∪ B) ∪ C = A ∪ (B ∪ C) and (A ∩ B) ∩ C = A ∩ (B ∩ C)
- Distributive: A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
- De Morgan's Laws: (A ∪ B)ᶜ = Aᶜ ∩ Bᶜ and (A ∩ B)ᶜ = Aᶜ ∪ Bᶜ
- Identity: A ∪ ∅ = A and A ∩ U = A
- Complement: A ∪ Aᶜ = U and A ∩ Aᶜ = ∅
- Idempotent: A ∪ A = A and A ∩ A = A
Applications of Set Theory
Understanding set operations is crucial in many fields:
- SQL Databases —
UNION,INTERSECT,EXCEPTare set operations on query results - Python Programming — the
settype supports|(union),&(intersection),-(difference) - Probability Theory — P(A ∪ B) = P(A) + P(B) − P(A ∩ B) (inclusion-exclusion principle)
- Digital Logic — set operations correspond to logic gate operations (OR, AND, NOT)
- Data Analysis — comparing datasets, finding common records, identifying unique entries
Reference this content, page, or tool as:
"Set Theory Calculator" at https://MiniWebtool.com// from MiniWebtool, https://MiniWebtool.com/
Set Theory Calculator uses standard set theory definitions. For more information, see Set theory - Wikipedia.
You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.