How this calculator works
A union takes all members that appear at least once, and an intersection takes only members present in every input set. Repeated finite entries count once. Finite entries are compared as case-sensitive text, so 01 and 1 are different labels; commas separate members. Interval mode treats endpoints as real numbers. Square brackets include a finite boundary and round parentheses exclude it. Two touching intervals merge when at least one includes their shared endpoint. An isolated shared point is written [a, a].
Formula
A union B = {x: x is in A or B}. A intersection B = {x: x is in both A and B}. The same rules extend to three sets.
Worked example
For A = {1,2,2,3} and B = {3,4}, the union is {1,2,3,4} and the intersection is {3}. For intervals [0,2] and [2,5), the union is [0,5) and the intersection is the single point [2,2].
Advertisement
Frequently asked questions
Can a union consist of separate intervals?
Yes. Disjoint pieces are joined with U. For example, (-inf,0) and (0,inf) remain separate because neither contains zero.
How do I enter infinity?
Use inf, +inf or -inf at the appropriate endpoint, with round parentheses. Infinity is not itself a member of the real-number interval.
How do empty sets behave?
An empty set adds nothing to a union and makes an intersection empty. Enter {} or leave a set field blank.