Union of Sets — Definition, Symbol, and Formula
Union of Sets — Definition, Symbol, and Formula
What Is The Union Of Sets?
The union of sets AAA and BBB is the set containing every element that belongs to AAA, to BBB, or to both. It is written A∪BA \cup BA∪B, and the symbol ∪\cup∪ reads as "or" in the inclusive sense.
In set-builder notation:
A∪B=,x:x∈A or x∈B,A \cup B = {, x : x \in A \text{ or } x \in B ,}A∪B=,x:x∈A or x∈B,
The key rule: a set never repeats an element, so anything sitting in both sets appears once in the union. The union is the largest of the standard combinations — it never has fewer elements than the bigger of the two starting sets.
How do you find the union of two sets?
List every element of the first set, then add any element of the second set that is not already written down.
A=1,2,3,4,B=3,4,5,6A = {1, 2, 3, 4}, \quad B = {3, 4, 5, 6}A=1,2,3,4,B=3,4,5,6A∪B=1,2,3,4,5,6A \cup B = {1, 2, 3, 4, 5, 6}A∪B=1,2,3,4,5,6
The 333 and 444 live in both sets, so they appear once. That single rule, writing shared elements once, is the whole skill.
The Union Formula And Cardinality
When you only need the count of elements in a union, not the listing, use the cardinality formula:
n(A∪B)=n(A)+n(B)−n(A∩B)n(A \cup B) = n(A) + n(B) - n(A \cap B)n(A∪B)=n(A)+n(B)−n(A∩B)
| Symbol | Meaning |
|---|---|
| n(A)n(A)n(A) | number of elements in set AAA |
| n(B)n(B)n(B) | number of elements in set BBB |
| n(A∩B)n(A \cap B)n(A∩B) | number of elements in both (the intersection) |
| n(A∪B)n(A \cup B)n(A∪B) | number of elements in the union |
| Why subtract the intersection? Add n(A)n(A)n(A) and n(B)n(B)n(B) and the shared elements get counted twice — once in each set's total. Subtracting n(A∩B)n(A \cap B)n(A∩B) removes the double-count, leaving each element counted exactly once. This is the two-set form of the inclusion-exclusion principle. | |
| For three sets the same logic extends: | |
| n(A∪B∪C)=n(A)+n(B)+n(C)−n(A∩B)−n(B∩C)−n(A∩C)+n(A∩B∩C)n(A \cup B \cup C) = n(A) + n(B) + n(C) - n(A \cap B) - n(B \cap C) - n(A \cap C) + n(A \cap B \cap C)n(A∪B∪C)=n(A)+n(B)+n(C)−n(A∩B)−n(B∩C)−n(A∩C)+n(A∩B∩C) |
Properties Of The Union Of Sets
- Commutative: A∪B=B∪AA \cup B = B \cup AA∪B=B∪A. Order does not change the union.
- Associative: (A∪B)∪C=A∪(B∪C)(A \cup B) \cup C = A \cup (B \cup C)(A∪B)∪C=A∪(B∪C). Grouping does not matter.
- Idempotent: A∪A=AA \cup A = AA∪A=A. Uniting a set with itself changes nothing.
- Identity (empty set): A∪∅=AA \cup \varnothing = AA∪∅=A. The empty set is the neutral element for union, the way 000 is for addition.
- Universal set: A∪U=UA \cup U = UA∪U=U. Uniting with everything gives everything.
- Subset rule: A⊆(A∪B)A \subseteq (A \cup B)A⊆(A∪B) and B⊆(A∪B)B \subseteq (A \cup B)B⊆(A∪B). Both starting sets sit inside their union.
Examples of Union of Sets
Example 1
Find A∪BA \cup BA∪B for A=1,3,5A = {1, 3, 5}A=1,3,5 and B=2,4,6B = {2, 4, 6}B=2,4,6.
The sets share no elements, so the union is every element listed once.
A∪B=1,2,3,4,5,6A \cup B = {1, 2, 3, 4, 5, 6}A∪B=1,2,3,4,5,6
Final answer: 1,2,3,4,5,6{1, 2, 3, 4, 5, 6}1,2,3,4,5,6.
Example 2 (where the first instinct goes wrong)
Find A∪BA \cup BA∪B for A=1,2,3A = {1, 2, 3}A=1,2,3 and B=2,3,4B = {2, 3, 4}B=2,3,4.
The first instinct is to glue the lists end to end: 1,2,3,2,3,4{1, 2, 3, 2, 3, 4}1,2,3∪2,3,4=1,2,3,2,3,4. Look at what that says — it claims 222 and 333 are each in the set twice. A set cannot hold the same element more than once; repetition is meaningless in set notation.
Drop the duplicates:
A∪B=1,2,3,4A \cup B = {1, 2, 3, 4}A∪B=1,2,3,4
Final answer: 1,2,3,4{1, 2, 3, 4}1,2,3,4. The "list once" rule is the entire point of union.
Example 3
Use the formula to find n(A∪B)n(A \cup B)n(A∪B) when n(A)=12n(A) = 12n(A)=12, n(B)=9n(B) = 9n(B)=9, and n(A∩B)=4n(A \cap B) = 4n(A∩B)=4.
n(A∪B)=n(A)+n(B)−n(A∩B)n(A \cup B) = n(A) + n(B) - n(A \cap B)n(A∪B)=n(A)+n(B)−n(A∩B)n(A∪B)=12+9−4=17n(A \cup B) = 12 + 9 - 4 = 17n(A∪B)=12+9−4=17
Final answer: 171717 elements.
Example 4
Find the union of the set of even numbers and the set of odd numbers from 111 to 101010.
E=2,4,6,8,10,O=1,3,5,7,9E = {2, 4, 6, 8, 10}, \quad O = {1, 3, 5, 7, 9}E=2,4,6,8,10,O=1,3,5,7,9E∪O=1,2,3,4,5,6,7,8,9,10E \cup O = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}E∪O=1,2,3,4,5,6,7,8,9,10
Every whole number from 111 to 101010 is either even or odd, so the union is all ten. Final answer: 1,2,…,10{1, 2, \dots, 10}1,2,…,10.
Example 5
A café surveys 505050 customers: 303030 order coffee, 252525 order tea, and 121212 order both. How many order coffee or tea?
This asks for n(C∪T)n(C \cup T)n(C∪T).
n(C∪T)=n(C)+n(T)−n(C∩T)n(C \cup T) = n(C) + n(T) - n(C \cap T)n(C∪T)=n(C)+n(T)−n(C∩T)n(C∪T)=30+25−12=43n(C \cup T) = 30 + 25 - 12 = 43n(C∪T)=30+25−12=43
Final answer: 434343 customers order coffee or tea. (The other 777 ordered neither.)
Example 6
Three clubs have memberships n(A)=20n(A) = 20n(A)=20, n(B)=15n(B) = 15n(B)=15, n(C)=10n(C) = 10n(C)=10; pairwise overlaps n(A∩B)=6n(A \cap B) = 6n(A∩B)=6, n(B∩C)=4n(B \cap C) = 4n(B∩C)=4, n(A∩C)=5n(A \cap C) = 5n(A∩C)=5; and n(A∩B∩C)=2n(A \cap B \cap C) = 2n(A∩B∩C)=2. How many students are in at least one club?
Apply the three-set formula, one term per line:
n(A∪B∪C)=20+15+10n(A \cup B \cup C) = 20 + 15 + 10n(A∪B∪C)=20+15+10−6−4−5+2n(A∪B∪C)=45−15+2=32n(A \cup B \cup C) = 45 - 15 + 2 = 32n(A∪B∪C)=45−15+2=32
Final answer: 323232 students belong to at least one club.
Why the union of sets matters
The union answers "everything in either group" — and that question runs under more systems than it first appears.
- Merging without duplicates is the core of database queries (the SQL
UNIONkeyword does exactly this) and of de-duplicating mailing lists. - Counting combined groups uses the cardinality formula directly — surveys, audience overlap, and probability all lean on n(A∪B)n(A \cup B)n(A∪B).
- Probability of "A or B" is built on union: P(A∪B)=P(A)+P(B)−P(A∩B)P(A \cup B) = P(A) + P(B) - P(A \cap B)P(A∪B)=P(A)+P(B)−P(A∩B) is the same inclusion-exclusion idea, now with probabilities instead of counts. That is the destination — the union you learn here becomes the addition rule of probability later.
Where Students Lose Marks On The Union Of Sets
Mistake 1: Writing duplicate elements
Where it slips in: Whenever the two sets share elements.
Don't do this: 1,2,3∪2,3,4{1, 2, 3} \cup {2, 3, 4}1,2,3∪2,3,4=1,2,3,2,3,4. Look at what that says — it claims 222 and 333 are each in the set twice. A set cannot hold the same element more than once; repetition is meaningless in set notation.
The correct way: List each element once: 1,2,3,4{1, 2, 3, 4}1,2,3,4. A set has no repeated members. The first instinct on overlapping sets is to concatenate the lists; the fix is to scan the second set and add only what is new.
Mistake 2: Confusing union with intersection
Where it slips in: Reading the symbol fast — ∪\cup∪ versus ∩\cap∩ — under time pressure.
Don't do this: Answering A∪B=3,4A \cup B = {3, 4}A∪B=3,4 for A=1,2,3,4A = {1, 2, 3, 4}A=1,2,3,4, B=3,4,5,6B = {3, 4, 5, 6}B=3,4,5,6 (that is the intersection).
The correct way: Union (∪\cup∪, "or") collects everything: 1,2,3,4,5,6{1, 2, 3, 4, 5, 6}1,2,3,4,5,6. The memorizer who pairs "∪\cup∪ = cup = holds more" with "∩\cap∩ = cap = the small lid on top" stops swapping them. Intersection is the small shared part; union is the whole.
Mistake 3: Forgetting to subtract the intersection in the count
Where it slips in: Counting problems where the sets overlap.
Don't do this: n(A∪B)=n(A)+n(B)n(A \cup B) = n(A) + n(B)n(A∪B)=n(A)+n(B) when the sets share elements.
The correct way: Subtract the overlap: n(A∪B)=n(A)+n(B)−n(A∩B)n(A \cup B) = n(A) + n(B) - n(A \cap B)n(A∪B)=n(A)+n(B)−n(A∩B). Adding alone double-counts everyone in both groups. The habit that fixes this is to ask "do these sets overlap?" before adding — if yes, the −,n(A∩B)-,n(A \cap B)−,n(A∩B) term is not optional.
Conclusion
- The union of sets A∪BA \cup BA∪B collects every element in AAA, BBB, or both, with each element listed once.
- The symbol is ∪\cup∪ ("or"), and union is commutative, associative, and idempotent.
- The cardinality formula is n(A∪B)=n(A)+n(B)−n(A∩B)n(A \cup B) = n(A) + n(B) - n(A \cap B)n(A∪B)=n(A)+n(B)−n(A∩B) — subtract the overlap to avoid double-counting.
- The most common mistakes are writing duplicate elements, swapping union with intersection, and forgetting to subtract the intersection in counts.
- Union becomes the addition rule of probability and the
UNIONoperation in databases.
Practice Questions on the Union of Sets
Try these, then check your answers below.
- Find a,b,c∪c,d{a, b, c} \cup {c, d}a,b,c∪c,d.
- Compute n(A∪B)n(A \cup B)n(A∪B) when n(A)=18n(A) = 18n(A)=18, n(B)=14n(B) = 14n(B)=14, and n(A∩B)=7n(A \cap B) = 7n(A∩B)=7.
- Verify the absorption law A∪(A∩B)=AA \cup (A \cap B) = AA∪(A∩B)=A for A=1,2A = {1, 2}A=1,2, B=2,3B = {2, 3}B=2,3.
- Find A∪BA \cup BA∪B for A=2,4,6,8A = {2, 4, 6, 8}A=2,4,6,8 and B=1,2,3,4B = {1, 2, 3, 4}B=1,2,3,4.
- A club has n(A)=12n(A) = 12n(A)=12 swimmers and n(B)=9n(B) = 9n(B)=9 runners, with 555 who do both. How many do at least one?
Answers - a,b,c,d{a, b, c, d}{1, 2, 3, 4}.
- n(A∪B)=18+14−7=25n(A \cup B) = 18 + 14 - 7 = 25n(A∪B)=18+14−7=25.
- A∩B=2A \cap B = {2}A∩B=2, so A∪(A∩B)=1,2∪2=1,2=AA \cup (A \cap B) = {1, 2} \cup {2} = {1, 2} = AA∪(A∩B)=1,2∪2=1,2=A. The law holds.
- 1,2,3,4,6,8{1, 2, 3, 4, 6, 8}, where the shared 222 and 444 appear once.
- n(A∪B)=12+9−5=16n(A \cup B) = 12 + 9 - 5 = 16n(A∪B)=12+9−5=16 members do at least one.