Operations on sets
Just as numbers can be added, subtracted, or combined, sets can be combined too — using union, intersection, and difference, the three basic operations that build new sets out of old ones. A gym roster and a swim roster overlap in exactly the people who do both sports; the "or" list and the "and" list are different sets, built by different rules, and mixing them up is the most common mistake in this topic. Once the three operations and a handful of algebraic properties are fixed, a single counting formula — — turns messy "how many students play at least one game" word problems into a two-line calculation. This section builds the operations from their definitions, proves why the counting formula must subtract the overlap, and works through both a roster-form example and a survey word problem end to end.
Union collects every element in or , intersection keeps only elements in both, difference keeps elements of that are not in , and for finite sets corrects for double-counting the overlap.
The core idea
For sets and , both subsets of some universal set , three operations combine them into new sets.
Union. collects every element that belongs to or (or both) — think of it as the merged, "either list" set:
where: ranges over the universal set , and "or" is inclusive — an element that is in both sets still belongs to the union only once, since a set never lists a member twice.
Intersection. keeps only elements that belong to both and — the "shared, and list" set:
If (the empty set), and have nothing in common and are called disjoint.
Difference. (also written ) keeps elements that are in but not in — everything left after removing the overlap from :
Crucially, in general: removing 's elements from is not the same operation as removing 's elements from , so each must be computed separately from its own definition. These three operations obey algebraic properties that follow directly from the definitions and are easy to check by shading a Venn diagram: union and intersection are commutative (, ); combining with the empty set gives and ; combining with the universal set gives and ; both operations are idempotent, and ; and if , then and , since already contains everything has to offer.
Worked example
Let and . Find , , , and , and confirm that .
Step 1 — Union. Combine all elements from both sets, listing each only once: .
Step 2 — Intersection. Scan for elements appearing in both lists: and appear in both, so .
Step 3 — Difference . Remove from any element also in : from , drop and , leaving .
Step 4 — Difference . Remove from any element also in : from , drop and , leaving .
Result: while — the two sets are completely different, confirming set difference is not commutative.
Competitive stretch
The same two sets can also verify the union-cardinality formula developed below: , , , so should equal . Counting directly gives exactly elements — the formula and the direct listing agree, which is a fast way to self-check any union computation.
The goal is to show, by carefully tracking how each element of gets counted when the sizes and are simply added together, that subtracting is not an arbitrary correction but the exact fix needed to count every element of precisely once.
Step 1. Split into three disjoint pieces that together account for every element exactly once: elements only in (that is, ), elements only in (that is, ), and elements in both (that is, ). Since these three pieces share no elements with each other, .
Step 2. Now look at alone. Every element of is either only in or also in , so itself splits into and , giving . Similarly, .
Step 3. Add these two equations: .
Step 4. The bracketed term is exactly from Step 1, so . Rearranging gives the counting formula:
where: and are the number of elements in and , and is the number of elements common to both — subtracted because simply adding counts every shared element twice, once inside each set. When (disjoint sets), and the formula reduces to the plain sum .
Worked example (word problem)
In a class of 50 students, 30 play cricket, 20 play football, and 10 play both. Using set notation, find how many students play at least one of the two games, and how many play neither.
Step 1. Let = students who play cricket and = students who play football, with , , , and universal set = all students in the class, so .
Step 2. "At least one of the two games" is exactly the set . Apply the union-cardinality formula proved above:
Step 3. Students playing neither game are those in but outside , i.e. : .
40 students play at least one game, and 10 students play neither.
Common traps
- Adding directly for a union without subtracting — this double-counts every element common to both sets.
- Assuming — set difference is not symmetric; compute each one separately from its own definition, as the worked example shows.
- Confusing union ("or", combine everything) with intersection ("and", keep only what's shared) when translating a word problem into set notation.
- Forgetting to check disjointness before applying the union formula — if the formula still works but simplifies to a plain sum, and skipping this check can lead to needlessly subtracting a nonzero overlap that was never verified.
Ask the tutor: if a survey word problem (like hobbies or subjects students take) feels confusing to translate into set operations, ask the AI tutor to work through it step by step with you.
Why is A minus B not the same as the complement of B?
only removes 's elements from within — it never contains anything outside to begin with. The complement of (everything in the universal set that is not in ) can include elements that are not in at all. In fact , where is the complement of : you are intersecting with "everything not in ," which happens to stay inside automatically.
How do I know when a word problem wants union versus intersection?
Look for the connecting word in the question. "At least one," "either," or "any of these" point to a union, since you want everyone who qualifies under any listed condition. "Both," "all of these," or "every one of the following" point to an intersection, since you want only the people who satisfy every condition simultaneously. Rewriting the question in your own words with "or" versus "and" usually makes the correct operation obvious before you touch any numbers.
Do I always need to draw a Venn diagram to solve these problems?
No, but it helps catch errors. The union-cardinality formula can be applied directly once you have identified , , and from the problem statement, as in the cricket-football example. A quick Venn sketch is most useful when the problem gives you or "neither" counts and asks you to work backwards for an unknown intersection or individual set size — the diagram makes it obvious which region each given number refers to.