STEP-BY-STEP LEARNING

Learn Set Theory · Mathematics

Learn Set Theory in Mathematics step by step with concepts, examples, quick checks and revision for government exams.

—Due now
—Next revision
—Mastered
—Study streak
Text size
Complete Topic Lesson

Set Theory for Competitive Exams: Complete Concept, Shortcuts & Solved Problems

Master set theory from basic definitions to exam-level problems. Learn formulas, Venn diagram techniques, reverse problems, and shortcuts with proofs, plus common mistakes and a revision checklist.

On this page
  1. What is a Set? Basic Definitions
  2. Types of Sets and Subsets
  3. Set Operations: Union, Intersection, Difference, Complement
  4. Cardinality Formulas for Two Sets
  5. Cardinality Formulas for Three Sets
  6. Venn Diagrams: The Visual Tool
  7. Shortcuts and Faster Methods
  8. Reverse Problems: Finding Missing Values
  9. Edge Cases and Special Situations
  10. Common Mistakes to Avoid
  11. Revision Checklist
  12. Worked examples
  13. Common mistakes
  14. Frequently asked questions

Set theory is the language of mathematics and a favourite of competitive exams because it tests logical reasoning, counting, and formula application. This lesson builds from the ground up: definitions, operations, cardinality formulas, Venn diagrams, and advanced shortcuts. You will learn not just what to do but why it works, so you can handle twisted questions confidently.

Key Set Theory Formulas
Two-set unionn(A ∪ B) = n(A) + n(B) − n(A ∩ B)
Two-set intersectionn(A ∩ B) = n(A) + n(B) − n(A ∪ B)
Three-set unionn(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(B ∩ C) − n(C ∩ A) + n(A ∩ B ∩ C)
Exactly twon(A ∩ B) + n(B ∩ C) + n(C ∩ A) − 3n(A ∩ B ∩ C)
Exactly onen(A) + n(B) + n(C) − 2[sum of pairs] + 3n(A ∩ B ∩ C)
Complementn(A') = n(U) − n(A)
SubsetsNumber of subsets = 2^n; proper = 2^n − 1
ConceptFormulaWhen to Use
Union of two setsn(A ∪ B) = n(A) + n(B) − n(A ∩ B)When both sets and intersection are known
Intersection of two setsn(A ∩ B) = n(A) + n(B) − n(A ∪ B)When both sets and union are known
Exactly one of twon(A ∪ B) − n(A ∩ B)When asked for elements in only one set
Union of three setsn(A ∪ B ∪ C) = sum singles − sum pairs + tripleWhen three sets and all intersections are known
Exactly two of threesum of pairs − 3 × tripleWhen asked for elements in exactly two sets
Neithern(U) − n(A ∪ B ∪ C)When total and union are known
1Read the problem and identify the sets involved.
2List the given values: n(A), n(B), n(C), intersections, union, total.
3Choose the appropriate formula or draw a Venn diagram.
4If using Venn, start filling from the triple intersection, then pairs, then singles.
5Solve for the unknown using algebra.
6Verify the answer by checking logical constraints (e.g., intersection ≤ each set).

What is a Set? Basic Definitions

A set is a well-defined collection of distinct objects, called elements. 'Well-defined' means it is clear whether any given object belongs to the set. For example, 'the set of prime numbers less than 10' is well-defined; 'the set of good students' is not. Sets are usually denoted by capital letters and elements by small letters. If x is an element of set A, we write x ∈ A; otherwise x ∉ A. The number of elements in a set is its cardinality, denoted n(A) or |A|. A set with no elements is the empty set, denoted ∅ or {}. A set with exactly one element is a singleton. Sets can be represented in roster form (listing elements) or set-builder form (rule).

  • Roster form: A = {1, 2, 3, 4}
  • Set-builder form: A = {x : x is a natural number less than 5}
  • Cardinality: n(A) = number of elements in A
  • Empty set: ∅ = {} has n(∅) = 0
  • Singleton: {5} has n = 1
n(A) = |A| = number of distinct elements in A

Types of Sets and Subsets

A set A is a subset of B if every element of A is also in B, written A ⊆ B. If A ⊆ B and A ≠ B, then A is a proper subset of B, written A ⊂ B. The total number of subsets of a set with n elements is 2^n. Why? For each element, you have two choices: include it or exclude it. So n elements give 2 × 2 × ... × 2 (n times) = 2^n subsets. The number of proper subsets is 2^n − 1 (excluding the set itself). The number of non-empty subsets is 2^n − 1. The power set P(A) is the set of all subsets of A, and its cardinality is 2^n. Important special sets: universal set U contains all elements under consideration; equal sets have exactly the same elements; equivalent sets have the same cardinality but not necessarily the same elements.

  • A ⊆ B means every element of A is in B
  • A ⊂ B means A is a proper subset of B
  • Number of subsets of an n-element set = 2^n
  • Number of proper subsets = 2^n − 1
  • Power set P(A) has 2^n elements
Number of subsets = 2^n; proper subsets = 2^n − 1

Set Operations: Union, Intersection, Difference, Complement

The union A ∪ B is the set of elements in A or B (or both). The intersection A ∩ B is the set of elements in both A and B. The difference A − B (or A \ B) is the set of elements in A but not in B. The complement A' or A^c is the set of elements in the universal set U but not in A. These operations obey several laws: commutative (A ∪ B = B ∪ A), associative ((A ∪ B) ∪ C = A ∪ (B ∪ C)), distributive (A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)), and De Morgan's laws: (A ∪ B)' = A' ∩ B' and (A ∩ B)' = A' ∪ B'. De Morgan's laws are powerful for simplifying expressions and are frequently tested.

  • A ∪ B = {x : x ∈ A or x ∈ B}
  • A ∩ B = {x : x ∈ A and x ∈ B}
  • A − B = {x : x ∈ A and x ∉ B}
  • A' = {x : x ∈ U and x ∉ A}
  • De Morgan: (A ∪ B)' = A' ∩ B'; (A ∩ B)' = A' ∪ B'
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)

Cardinality Formulas for Two Sets

For two sets A and B, the number of elements in their union is n(A ∪ B) = n(A) + n(B) − n(A ∩ B). This formula works because when we add n(A) and n(B), the elements in the intersection are counted twice, so we subtract them once. Rearranging gives n(A ∩ B) = n(A) + n(B) − n(A ∪ B). Also, n(A − B) = n(A) − n(A ∩ B) and n(B − A) = n(B) − n(A ∩ B). The number of elements in exactly one of the two sets is n(A − B) + n(B − A) = n(A ∪ B) − n(A ∩ B). These formulas are the backbone of most Venn diagram problems.

  • n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
  • n(A ∩ B) = n(A) + n(B) − n(A ∪ B)
  • n(A − B) = n(A) − n(A ∩ B)
  • n(B − A) = n(B) − n(A ∩ B)
  • Exactly one = n(A ∪ B) − n(A ∩ B)
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)

Cardinality Formulas for Three Sets

For three sets A, B, C, the union formula extends: n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(B ∩ C) − n(C ∩ A) + n(A ∩ B ∩ C). The logic: add individual counts, subtract pairwise intersections (which were double-counted), then add back the triple intersection (which was subtracted one time too many). This inclusion-exclusion principle generalizes to any number of sets. For exactly two of the three sets, use: exactly two = n(A ∩ B) + n(B ∩ C) + n(C ∩ A) − 3n(A ∩ B ∩ C). For exactly one set, use: exactly one = n(A) + n(B) + n(C) − 2[n(A ∩ B) + n(B ∩ C) + n(C ∩ A)] + 3n(A ∩ B ∩ C).

  • n(A ∪ B ∪ C) = sum of singles − sum of pairs + triple
  • Exactly two = sum of pairs − 3 × triple
  • Exactly one = sum of singles − 2 × sum of pairs + 3 × triple
  • At least one = n(A ∪ B ∪ C)
  • None = n(U) − n(A ∪ B ∪ C)
n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(B ∩ C) − n(C ∩ A) + n(A ∩ B ∩ C)

Venn Diagrams: The Visual Tool

A Venn diagram represents sets as circles inside a rectangle (the universal set). Overlapping regions show intersections. For two sets, there are four regions: only A, only B, both A and B, and neither. For three sets, there are eight regions. Always start filling from the innermost intersection (the triple intersection) and work outward. This prevents double-counting. Venn diagrams are especially useful when the problem gives relationships rather than exact numbers. They also help verify formula-based answers. In exams, a quick sketch can save time and reduce errors.

  • Rectangle = universal set U
  • Circles = sets A, B, C
  • Overlap = intersection
  • Fill triple intersection first, then pairs, then singles
  • Outside all circles = none of the sets
For two sets: regions are A only, B only, A∩B, neither

Shortcuts and Faster Methods

Many set theory problems can be solved faster with shortcuts. For two sets, if you know n(A), n(B), and n(A ∪ B), then n(A ∩ B) = n(A) + n(B) − n(A ∪ B). If you know n(A), n(B), and n(A ∩ B), then n(A ∪ B) = n(A) + n(B) − n(A ∩ B). For 'exactly one' problems, use n(A ∪ B) − n(A ∩ B). For three sets, if the problem gives 'exactly two' instead of pairwise intersections, use the exactly-two formula. Another shortcut: when all elements belong to at least one set, n(U) = n(A ∪ B ∪ C). When some belong to none, subtract from n(U). Also, remember that n(A') = n(U) − n(A). Practice these until they become automatic.

  • Find intersection: n(A ∩ B) = n(A) + n(B) − n(A ∪ B)
  • Find union: n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
  • Exactly one: n(A ∪ B) − n(A ∩ B)
  • Complement: n(A') = n(U) − n(A)
  • None: n(U) − n(A ∪ B ∪ C)
n(A ∩ B) = n(A) + n(B) − n(A ∪ B)

Reverse Problems: Finding Missing Values

Reverse problems give the union or intersection and ask for an individual set or the universal set. For example, if n(A) = 20, n(B) = 15, n(A ∪ B) = 30, find n(A ∩ B). Use n(A ∩ B) = 20 + 15 − 30 = 5. If n(A) = 25, n(A ∩ B) = 10, n(A ∪ B) = 40, find n(B). Rearrange: n(B) = n(A ∪ B) − n(A) + n(A ∩ B) = 40 − 25 + 10 = 25. For three sets, if n(A ∪ B ∪ C) is given along with some pairwise and triple intersections, solve for the missing single set. Always write the formula, substitute knowns, and solve algebraically. Check if the answer makes sense (e.g., intersection cannot exceed either set).

  • Given union and both sets, find intersection
  • Given union, one set, and intersection, find other set
  • Given total and none, find union
  • Use algebra to isolate the unknown
  • Verify: n(A ∩ B) ≤ min(n(A), n(B))
n(B) = n(A ∪ B) − n(A) + n(A ∩ B)

Edge Cases and Special Situations

Watch for these edge cases: (1) Disjoint sets: A ∩ B = ∅, so n(A ∪ B) = n(A) + n(B). (2) One set contained in another: if A ⊆ B, then A ∪ B = B and A ∩ B = A. (3) Equal sets: A = B, so n(A ∪ B) = n(A ∩ B) = n(A). (4) Empty set: n(∅) = 0, and ∅ is a subset of every set. (5) Universal set: A ∪ U = U, A ∩ U = A. (6) Complement of complement: (A')' = A. (7) De Morgan's laws with three sets: (A ∪ B ∪ C)' = A' ∩ B' ∩ C'. Recognizing these patterns can turn a complex problem into a one-step solution.

  • Disjoint: n(A ∪ B) = n(A) + n(B)
  • Subset: if A ⊆ B, n(A ∪ B) = n(B), n(A ∩ B) = n(A)
  • Equal: n(A ∪ B) = n(A ∩ B) = n(A)
  • Empty set is subset of every set
  • De Morgan for three: (A ∪ B ∪ C)' = A' ∩ B' ∩ C'
If A ⊆ B, then n(A ∪ B) = n(B) and n(A ∩ B) = n(A)

Common Mistakes to Avoid

Students often make these errors: (1) Forgetting to subtract the intersection when finding union. (2) Double-counting elements in Venn diagrams by not starting from the triple intersection. (3) Confusing 'exactly two' with 'at least two'. (4) Assuming all elements belong to at least one set when 'none' is possible. (5) Misapplying De Morgan's laws by not changing union to intersection. (6) Using n(A ∪ B) = n(A) + n(B) when sets are not disjoint. (7) Forgetting that n(A') = n(U) − n(A). (8) In three-set problems, mixing up pairwise intersections with exactly-two counts. Always read the question carefully and define what each number represents.

  • Do not forget to subtract intersection in union formula
  • Start Venn diagrams from the innermost region
  • Distinguish 'exactly two' from 'at least two'
  • Check if 'none' category exists
  • Apply De Morgan correctly: change operation
  • Do not add sets directly unless disjoint
n(A ∪ B) ≠ n(A) + n(B) unless A ∩ B = ∅

Revision Checklist

Before the exam, ensure you can: (1) Define set, subset, power set, and cardinality. (2) Write the formulas for two and three sets. (3) Draw and fill Venn diagrams correctly. (4) Solve reverse problems for missing values. (5) Apply De Morgan's laws. (6) Handle edge cases like disjoint, subset, and equal sets. (7) Distinguish between 'exactly one', 'exactly two', and 'at least one'. (8) Use shortcuts to save time. (9) Avoid common mistakes. (10) Verify answers for logical consistency. Practice at least 20 mixed problems to build speed and accuracy.

  • Memorize union and intersection formulas
  • Practice Venn diagram filling
  • Solve reverse problems
  • Apply De Morgan's laws
  • Check edge cases
  • Time yourself on mixed problems
n(A ∪ B ∪ C) = sum singles − sum pairs + triple

Worked examples

If n(A) = 12, n(B) = 18, and n(A ∩ B) = 5, find n(A ∪ B).
Show solution

Use the formula n(A ∪ B) = n(A) + n(B) − n(A ∩ B).

Substitute: n(A ∪ B) = 12 + 18 − 5 = 25.

25
In a class of 40 students, 25 play cricket, 20 play football, and 10 play both. How many play at least one game?
Show solution

At least one means union. n(C ∪ F) = n(C) + n(F) − n(C ∩ F) = 25 + 20 − 10 = 35.

35
If n(A) = 30, n(B) = 25, and n(A ∪ B) = 45, find n(A ∩ B).
Show solution

Rearrange: n(A ∩ B) = n(A) + n(B) − n(A ∪ B) = 30 + 25 − 45 = 10.

10
In a survey of 100 people, 60 read newspaper A, 50 read newspaper B, and 30 read both. How many read neither?
Show solution

n(A ∪ B) = 60 + 50 − 30 = 80. Neither = n(U) − n(A ∪ B) = 100 − 80 = 20.

20
If n(A) = 20, n(B) = 15, n(C) = 25, n(A ∩ B) = 5, n(B ∩ C) = 7, n(C ∩ A) = 6, and n(A ∩ B ∩ C) = 2, find n(A ∪ B ∪ C).
Show solution

Use three-set formula: n(A ∪ B ∪ C) = 20 + 15 + 25 − 5 − 7 − 6 + 2 = 44.

44
In a group of 50 people, 30 like tea, 25 like coffee, and 10 like both. How many like exactly one of the two?
Show solution

Exactly one = n(T ∪ C) − n(T ∩ C). n(T ∪ C) = 30 + 25 − 10 = 45. Exactly one = 45 − 10 = 35.

35
If n(U) = 80, n(A) = 35, n(B) = 40, n(A ∩ B) = 15, and n(A ∪ B ∪ C) = 70, find n(C) if C is disjoint from A and B.
Show solution

Since C is disjoint from A and B, n(A ∪ B ∪ C) = n(A ∪ B) + n(C). n(A ∪ B) = 35 + 40 − 15 = 60. So n(C) = 70 − 60 = 10.

10
In a class, 40 students play cricket, 30 play hockey, and 20 play both. If every student plays at least one game, find the total number of students.
Show solution

Total = n(C ∪ H) = 40 + 30 − 20 = 50.

50
If A has 4 elements, how many subsets does A have? How many proper subsets?
Show solution

Number of subsets = 2^4 = 16. Proper subsets = 2^4 − 1 = 15.

16 subsets, 15 proper subsets
In a survey, 70% read magazine A, 60% read magazine B, and 40% read both. What percentage read neither?
Show solution

n(A ∪ B) = 70 + 60 − 40 = 90%. Neither = 100% − 90% = 10%.

10%

Common mistakes

  • Forgetting to subtract the intersection when calculating union.
  • In Venn diagrams, not starting from the triple intersection, leading to double-counting.
  • Confusing 'exactly two' with 'at least two' in three-set problems.
  • Assuming all elements belong to at least one set when 'none' is possible.
  • Misapplying De Morgan's laws by not changing the operation (union to intersection).
  • Using n(A ∪ B) = n(A) + n(B) when sets are not disjoint.
  • Forgetting that n(A') = n(U) − n(A).
  • In three-set problems, mixing pairwise intersections with exactly-two counts.

Frequently asked questions

What is the difference between a subset and a proper subset?

A subset A ⊆ B means every element of A is in B. A proper subset A ⊂ B means A is a subset of B but A is not equal to B. The set itself is a subset but not a proper subset of itself.

How many subsets does a set with n elements have?

A set with n elements has 2^n subsets. This is because each element can either be included or excluded, giving 2 choices per element, so 2^n total combinations.

What is the formula for the union of two sets?

n(A ∪ B) = n(A) + n(B) − n(A ∩ B). We subtract the intersection because those elements are counted twice when we add n(A) and n(B).

How do you find the number of elements in exactly one of two sets?

Exactly one = n(A ∪ B) − n(A ∩ B). Alternatively, it is n(A − B) + n(B − A).

What is De Morgan's law?

De Morgan's laws state that (A ∪ B)' = A' ∩ B' and (A ∩ B)' = A' ∪ B'. The complement of a union is the intersection of complements, and vice versa.

How do you handle three-set problems with 'exactly two'?

Use the formula: exactly two = n(A ∩ B) + n(B ∩ C) + n(C ∩ A) − 3n(A ∩ B ∩ C). This subtracts the triple intersection three times because it was counted in each pairwise intersection.

What is the universal set?

The universal set U contains all elements under consideration in a given problem. The complement of a set A, denoted A', is the set of elements in U that are not in A.

Can the intersection of two sets be larger than either set?

No, the intersection A ∩ B is a subset of both A and B, so n(A ∩ B) ≤ min(n(A), n(B)). If you get a larger value, you have made an error.

What is the empty set?

The empty set, denoted ∅ or {}, is a set with no elements. Its cardinality is 0, and it is a subset of every set.

How do you find the number of elements in neither of two sets?

Neither = n(U) − n(A ∪ B). First find the union using the formula, then subtract from the total number of elements in the universal set.

Practice this lesson ↓

Loading…