Operations on Sets — Union, Intersection, Complement

#Algebra
TL;DR
Operations on sets are the rules that combine or compare sets — union $\cup$, intersection $\cap$, difference $-$, and complement $'$ — each producing a new set. This article defines all four with their symbols and Venn diagrams, lists the key properties (commutative, associative, distributive, De Morgan's laws), gives the cardinality formula, and works through common mistakes.
BT
Bhanzu TeamLast updated on June 29, 20268 min read

What Are Operations On Sets?

Operations on sets are rules that take one or more sets and return a new set. The four core operations are union, intersection, difference, and complement. A set is a well-defined collection of objects, and these operations let us combine and compare those collections without listing every element by hand.

Throughout, take a universal set $U$ — the full collection everything is drawn from — and two sets inside it:

$$U = {1, 2, 3, 4, 5, 6, 7, 8}$$ $$A = {1, 2, 3, 4}$$ $$B = {3, 4, 5, 6}$$

These three sets run through every operation below, so you can watch one example deepen.

Union — combining everything

The union $A \cup B$ is the set of elements in $A$, in $B$, or in both. The symbol $\cup$ reads "or".

$$A \cup B = {, x : x \in A \text{ or } x \in B ,}$$ $$A \cup B = {1, 2, 3, 4, 5, 6}$$

Shared elements are listed once — a set never repeats a member.

Intersection — keeping only the shared

The intersection $A \cap B$ is the set of elements in both $A$ and $B$. The symbol $\cap$ reads "and".

$$A \cap B = {, x : x \in A \text{ and } x \in B ,}$$ $$A \cap B = {3, 4}$$

When two sets share nothing, the intersection is the empty set, and the sets are called disjoint.

Difference — what one has that the other lacks

The difference $A - B$ (also written $A \setminus B$) is the set of elements in $A$ but not in $B$. Order matters here.

$$A - B = {1, 2}, \qquad B - A = {5, 6}$$

$A - B$ and $B - A$ are different sets — a clue that difference is not commutative.

Complement — everything outside

The complement $A'$ (also written $A^c$ or $\bar{A}$) is the set of elements in the universal set $U$ but not in $A$.

$$A' = {, x \in U : x \notin A ,}$$ $$A' = {5, 6, 7, 8}$$

Complement only makes sense once a universal set is fixed; without $U$, "everything outside $A$" has no boundary.

Symmetric difference — in one or the other, not both

The symmetric difference $A \triangle B$ collects elements in exactly one of the two sets.

$$A \triangle B = (A - B) \cup (B - A) = {1, 2, 5, 6}$$

It is the union minus the intersection — useful when "either but not both" is the real question.

Properties Of Operations On Sets

The operations obey laws that mirror, but do not copy, the laws of arithmetic. Keep them straight and most set problems collapse to one line.

  • Commutative: $A \cup B = B \cup A$ and $A \cap B = B \cap A$. (Difference is not commutative.)

  • Associative: $(A \cup B) \cup C = A \cup (B \cup C)$, and the same for $\cap$.

  • Distributive: $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$, and the dual with $\cup$ over $\cap$.

  • Identity: $A \cup \varnothing = A$ and $A \cap U = A$.

  • De Morgan's laws: $(A \cup B)' = A' \cap B'$ and $(A \cap B)' = A' \cup B'$. The complement of a union is the intersection of complements; flip the operation when you flip outside.

The cardinality of a union ties three counts together:

$$n(A \cup B) = n(A) + n(B) - n(A \cap B)$$

You subtract the intersection because adding $n(A)$ and $n(B)$ counts the shared elements twice.

Examples of Operations on Sets

Example 1

With $A = {2, 4, 6}$ and $B = {4, 6, 8}$, find $A \cup B$ and $A \cap B$.

$$A \cup B = {2, 4, 6, 8}$$ $$A \cap B = {4, 6}$$

Final answer: $A \cup B = {2, 4, 6, 8}$, $A \cap B = {4, 6}$.

Example 2 (where the first instinct goes wrong)

Given $U = {1, 2, 3, 4, 5}$, $A = {1, 2, 3}$, $B = {2, 3, 4}$, find $(A \cup B)'$.

The first instinct is to complement each set and union them: $A' = {4, 5}$, $B' = {1, 5}$, then $A' \cup B' = {1, 4, 5}$. Test it against the direct route.

Direct: $A \cup B = {1, 2, 3, 4}$, so $(A \cup B)' = {5}$.

The two answers disagree, so the shortcut is wrong. De Morgan's law says the complement of a union equals the intersection of complements, not the union:

$$(A \cup B)' = A' \cap B' = {4, 5} \cap {1, 5} = {5}$$

Final answer: ${5}$. Flip the operation when you complement.

Example 3

With $A = {a, b, c, d}$ and $B = {c, d, e}$, find $A - B$ and $B - A$.

$$A - B = {a, b}$$ $$B - A = {e}$$

The two are unequal, confirming difference depends on order. Final answer: $A - B = {a, b}$, $B - A = {e}$.

Example 4

Verify the distributive law for $A = {1, 2}$, $B = {2, 3}$, $C = {1, 3}$: is $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$?

Left side: $B \cup C = {1, 2, 3}$, so $A \cap (B \cup C) = {1, 2}$.

Right side: $A \cap B = {2}$, $A \cap C = {1}$, so $(A \cap B) \cup (A \cap C) = {1, 2}$.

Both sides equal ${1, 2}$. Final answer: the law holds.

Example 5

In a group of $40$ people, $25$ like tea and $20$ like coffee; $10$ like both. How many like at least one?

Use the union count formula:

$$n(T \cup C) = n(T) + n(C) - n(T \cap C)$$ $$n(T \cup C) = 25 + 20 - 10 = 35$$

Final answer: $35$ people like at least one drink. (The remaining $5$ sit in the complement — they like neither.)

Example 6

With the same group, how many like exactly one of the two drinks?

That is the symmetric difference. Subtract the "both" count from each single count and add:

$$n(T \triangle C) = \big(n(T) - n(T \cap C)\big) + \big(n(C) - n(T \cap C)\big)$$ $$n(T \triangle C) = (25 - 10) + (20 - 10) = 15 + 10 = 25$$

Final answer: $25$ people like exactly one drink.

Where Operations On Sets Go Sideways

Mistake 1: Misapplying De Morgan's laws

Where it slips in: Any time a complement sits on top of a union or intersection.

Don't do this: Writing $(A \cap B)' = A' \cap B'$.

The correct way: $(A \cap B)' = A' \cup B'$ — the complement of an intersection is the union of complements. The single most common slip here is leaving the operation unchanged while complementing; the operation must flip ($\cap \leftrightarrow \cup$) every time you take the complement of a combined set.

Mistake 2: Treating set difference as commutative

Where it slips in: Problems that ask for "what is in A but not B" when the student reads it as a symmetric "what is not shared".

Don't do this: Assuming $A - B = B - A$.

The correct way: Difference depends on order. $A - B$ keeps elements of $A$ only; $B - A$ keeps elements of $B$ only. The rusher who treats it like subtraction of numbers (where order also matters, but the result is just sign-flipped) forgets that sets give two genuinely different collections, not a sign change.

Mistake 3: Forgetting the universal set for complement

Where it slips in: Computing $A'$ without a stated $U$.

Don't do this: Listing $A'$ as "all numbers not in $A$".

The correct way: Complement is always relative to a fixed universal set $U$. With $U = {1, \dots, 10}$ and $A = {1, 2}$, the complement is ${3, 4, \dots, 10}$ — not the infinite "everything else". Define $U$ first, every time.

Conclusion

  • The four core operations on sets are union, intersection, difference, and complement, each returning a new set.

  • Union ($\cup$) means "or", intersection ($\cap$) means "and", difference keeps what one set has that another lacks, and complement keeps everything outside a set within $U$.

  • De Morgan's laws flip the operation when you complement a union or intersection.

  • The union count formula is $n(A \cup B) = n(A) + n(B) - n(A \cap B)$.

  • The most common mistakes are misapplying De Morgan's laws, treating difference as commutative, and forgetting the universal set.

Practice Questions on Operations on Sets

Use $U = {1, 2, 3, 4, 5, 6, 7, 8, 9}$, $A = {1, 3, 5, 7}$, and $B = {2, 3, 5, 8}$. Work each out, then check below.

  1. Find $A \cup B$.

  2. Find $A \cap B$.

  3. Find $A - B$.

  4. Find $A'$.

  5. Find $(A \cap B)'$ two ways — directly, and by De Morgan's law.

Answers

  1. $A \cup B = {1, 2, 3, 5, 7, 8}$.

  2. $A \cap B = {3, 5}$.

  3. $A - B = {1, 7}$, the elements in $A$ but not $B$.

  4. $A' = {2, 4, 6, 8, 9}$, everything in $U$ outside $A$.

  5. Direct: $A \cap B = {3, 5}$, so $(A \cap B)' = {1, 2, 4, 6, 7, 8, 9}$. By De Morgan: $(A \cap B)' = A' \cup B'$, where $A' = {2, 4, 6, 8, 9}$ and $B' = {1, 4, 6, 7, 9}$, giving ${1, 2, 4, 6, 7, 8, 9}$. Both agree.

Keep Going With Operations on Sets

If you get stuck on the complement steps, come back to Example 2. From here, see how each operation works on its own in intersection of sets and complement of a set, how it all fits under sets, and how these regions are drawn in a Venn diagram. Want a live Bhanzu trainer to walk through more operations on sets problems? Book a free demo class.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What are the four basic operations on sets?
Union ($\cup$), intersection ($\cap$), difference ($-$), and complement ($'$). Symmetric difference ($\triangle$) is a fifth, built from the first three.
What is the difference between union and intersection?
Union collects every element from either set ("or"); intersection keeps only the elements common to both ("and"). Union is usually larger; intersection is usually smaller.
Are operations on sets commutative?
Union and intersection are commutative ($A \cup B = B \cup A$). Difference is not — $A - B$ rarely equals $B - A$.
What is De Morgan's law in set theory?
$(A \cup B)' = A' \cap B'$ and $(A \cap B)' = A' \cup B'$. Complementing a combined set flips union to intersection and vice versa.
Why do we subtract the intersection in the union count formula?
Because $n(A) + n(B)$ counts the shared elements twice. Subtracting $n(A \cap B)$ corrects the double-count.
✍️ 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 →