Union of Sets — Definition, Symbol, and Formula

#Algebra
TL;DR
The union of two sets $A$ and $B$, written $A \cup B$, is the set of all elements that are in $A$, in $B$, or in both — with each element listed once. This article covers the symbol $\cup$, the set-builder definition, the cardinality formula $n(A \cup B) = n(A) + n(B) - n(A \cap B)$, the properties of union, and the mistakes that cost marks.
BT
Bhanzu TeamLast updated on June 29, 20268 min read

What Is The Union Of Sets?

The union of sets $A$ and $B$ is the set containing every element that belongs to $A$, to $B$, or to both. It is written $A \cup B$, and the symbol $\cup$ reads as "or" in the inclusive sense.

In set-builder notation:

$$A \cup B = {, x : x \in A \text{ or } x \in 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}, \quad B = {3, 4, 5, 6}$$ $$A \cup B = {1, 2, 3, 4, 5, 6}$$

The $3$ and $4$ 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 \cup B) = n(A) + n(B) - n(A \cap B)$$

Symbol

Meaning

$n(A)$

number of elements in set $A$

$n(B)$

number of elements in set $B$

$n(A \cap B)$

number of elements in both (the intersection)

$n(A \cup B)$

number of elements in the union

Why subtract the intersection? Add $n(A)$ and $n(B)$ and the shared elements get counted twice — once in each set's total. Subtracting $n(A \cap 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 \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)$$

Properties Of The Union Of Sets

  • Commutative: $A \cup B = B \cup A$. Order does not change the union.

  • Associative: $(A \cup B) \cup C = A \cup (B \cup C)$. Grouping does not matter.

  • Idempotent: $A \cup A = A$. Uniting a set with itself changes nothing.

  • Identity (empty set): $A \cup \varnothing = A$. The empty set is the neutral element for union, the way $0$ is for addition.

  • Universal set: $A \cup U = U$. Uniting with everything gives everything.

  • Subset rule: $A \subseteq (A \cup B)$ and $B \subseteq (A \cup B)$. Both starting sets sit inside their union.

Examples of Union of Sets

Example 1

Find $A \cup B$ for $A = {1, 3, 5}$ and $B = {2, 4, 6}$.

The sets share no elements, so the union is every element listed once.

$$A \cup B = {1, 2, 3, 4, 5, 6}$$

Final answer: ${1, 2, 3, 4, 5, 6}$.

Example 2 (where the first instinct goes wrong)

Find $A \cup B$ for $A = {1, 2, 3}$ and $B = {2, 3, 4}$.

The first instinct is to glue the lists end to end: ${1, 2, 3, 2, 3, 4}$. Look at what that says — it claims $2$ and $3$ 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 \cup B = {1, 2, 3, 4}$$

Final answer: ${1, 2, 3, 4}$. The "list once" rule is the entire point of union.

Example 3

Use the formula to find $n(A \cup B)$ when $n(A) = 12$, $n(B) = 9$, and $n(A \cap B) = 4$.

$$n(A \cup B) = n(A) + n(B) - n(A \cap B)$$ $$n(A \cup B) = 12 + 9 - 4 = 17$$

Final answer: $17$ elements.

Example 4

Find the union of the set of even numbers and the set of odd numbers from $1$ to $10$.

$$E = {2, 4, 6, 8, 10}, \quad O = {1, 3, 5, 7, 9}$$ $$E \cup O = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}$$

Every whole number from $1$ to $10$ is either even or odd, so the union is all ten. Final answer: ${1, 2, \dots, 10}$.

Example 5

A café surveys $50$ customers: $30$ order coffee, $25$ order tea, and $12$ order both. How many order coffee or tea?

This asks for $n(C \cup T)$.

$$n(C \cup T) = n(C) + n(T) - n(C \cap T)$$ $$n(C \cup T) = 30 + 25 - 12 = 43$$

Final answer: $43$ customers order coffee or tea. (The other $7$ ordered neither.)

Example 6

Three clubs have memberships $n(A) = 20$, $n(B) = 15$, $n(C) = 10$; pairwise overlaps $n(A \cap B) = 6$, $n(B \cap C) = 4$, $n(A \cap C) = 5$; and $n(A \cap B \cap C) = 2$. How many students are in at least one club?

Apply the three-set formula, one term per line:

$$n(A \cup B \cup C) = 20 + 15 + 10$$ $$\qquad - 6 - 4 - 5$$ $$\qquad + 2$$ $$n(A \cup B \cup C) = 45 - 15 + 2 = 32$$

Final answer: $32$ 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 UNION keyword 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 \cup B)$.

  • Probability of "A or B" is built on union: $P(A \cup B) = P(A) + P(B) - P(A \cap 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.

A search engine returning pages that match "cat" or "dog" is computing a union and stripping repeats in real time. The arithmetic is the same one you do by hand here.

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} \cup {2, 3, 4} = {1, 2, 3, 2, 3, 4}$.

The correct way: List each element once: ${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 \cup B = {3, 4}$ for $A = {1, 2, 3, 4}$, $B = {3, 4, 5, 6}$ (that is the intersection).

The correct way: Union ($\cup$, "or") collects everything: ${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 \cup B) = n(A) + n(B)$ when the sets share elements.

The correct way: Subtract the overlap: $n(A \cup B) = n(A) + n(B) - n(A \cap 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 \cap B)$ term is not optional.

Conclusion

  • The union of sets $A \cup B$ collects every element in $A$, $B$, 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 \cup B) = n(A) + n(B) - n(A \cap 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 UNION operation in databases.

Practice Questions on the Union of Sets

Try these, then check your answers below.

  1. Find ${a, b, c} \cup {c, d}$.

  2. Compute $n(A \cup B)$ when $n(A) = 18$, $n(B) = 14$, and $n(A \cap B) = 7$.

  3. Verify the absorption law $A \cup (A \cap B) = A$ for $A = {1, 2}$, $B = {2, 3}$.

  4. Find $A \cup B$ for $A = {2, 4, 6, 8}$ and $B = {1, 2, 3, 4}$.

  5. A club has $n(A) = 12$ swimmers and $n(B) = 9$ runners, with $5$ who do both. How many do at least one?

Answers

  1. ${a, b, c, d}$, where the shared $c$ is written once.

  2. $n(A \cup B) = 18 + 14 - 7 = 25$.

  3. $A \cap B = {2}$, so $A \cup (A \cap B) = {1, 2} \cup {2} = {1, 2} = A$. The law holds.

  4. ${1, 2, 3, 4, 6, 8}$, where the shared $2$ and $4$ appear once.

  5. $n(A \cup B) = 12 + 9 - 5 = 16$ members do at least one.

Keep Going With the Union of Sets

If you get stuck on the duplicate rule, come back to Example 2. To go further, compare it with intersection of sets, see how it fits among all operations on sets and the broader idea of sets, connect it to the complement of a set, and see it drawn in a Venn diagram. Want a live Bhanzu trainer to walk through more union of sets problems? Book a free demo class.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the symbol for the union of sets?
The union symbol is $\cup$, which reads as "or". $A \cup B$ is read "A union B".
Is the union of sets commutative?
Yes. $A \cup B = B \cup A$ — the order of the sets does not change the result. It is also associative.
What is the union of a set with the empty set?
$A \cup \varnothing = A$. Uniting any set with the empty set leaves it unchanged, because the empty set adds no elements.
What is the formula for the number of elements in a union?
$n(A \cup B) = n(A) + n(B) - n(A \cap B)$. Subtract the intersection so shared elements are not counted twice.
Can the union of two finite sets be smaller than one of them?
No. The union always contains every element of both sets, so $n(A \cup B)$ is at least as large as the bigger of $n(A)$ and $n(B)$.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →