A little context. A clearer answer.
When this calculator is useful
Keep every distinct element for union, common members for intersection and one-sided members for differences. Symmetric difference combines the two one-sided parts. Cartesian product contains ordered pairs with the first entry from A and the second from B. Display order follows first occurrence. For a related calculation, try Boolean logic, truth table and Karnaugh map calculator.
What to enter
| Input | What it means | Example value |
|---|---|---|
| A | A: Separate list items with semicolons; decimal commas are allowed. Follow the item limit shown for the field. | 1;3;5;7;9 |
| B | B: Separate list items with semicolons; decimal commas are allowed. Follow the item limit shown for the field. | 2;3;5;7 |
| Mode | Mode: A∪B / A∩B / A∖B / B∖A / A△B / A×B | A∪B |
How the calculation works
- Change the inputs to explore your own scenario. A: Separate list items with semicolons; decimal commas are allowed. Follow the item limit shown for the field.; B: Separate list items with semicolons; decimal commas are allowed. Follow the item limit shown for the field.; Mode: A∪B / A∩B / A∖B / B∖A / A△B / A×B.
- A∪B; A∩B; A∖B; B∖A; A△B; A×B={(a,b): a∈A,b∈B}
- Separate textual elements with semicolons or new lines, without braces. Blank input means the empty set. Duplicates are removed after trimming outer spaces; comparison is case sensitive and treats 1 and 01 as different text. Maximum 50 entries per input and 60 characters per element. No infinite sets, expression evaluation or implicit numeric conversion.
A∪B; A∩B; A∖B; B∖A; A△B; A×B={(a,b): a∈A,b∈B}A worked example
In the OpenStax example, A contains 1, 3, 5, 7, 9 and B contains 2, 3, 5, 7. Their common elements are 3, 5 and 7. Only 1 and 9 are in A alone. The union contains six distinct elements and the Cartesian product has 5 × 4 = 20 ordered pairs. Empty B to see both the intersection and product become empty while the union stays equal to A.
Example you can load
What to enterThis is a fixed example; changing the form above does not change these numbers.
Assumptions & limits
Separate textual elements with semicolons or new lines, without braces. Blank input means the empty set. Duplicates are removed after trimming outer spaces; comparison is case sensitive and treats 1 and 01 as different text. Maximum 50 entries per input and 60 characters per element. No infinite sets, expression evaluation or implicit numeric conversion.
Frequently asked questions
Are repeated values counted twice?
No. A set contains each distinct trimmed text element once.
Are 1 and 01 equal here?
No. Elements are compared as text, with case preserved.
Is A×B the same as B×A?
The number of pairs is equal, but their order matters: (a, b) is different from (b, a) in general.