Set Theory – Union, Intersection, Complement and Venn Diagram Problems
Quantitative Aptitude › Set Theory, Functions and Graphs · Topic 23.1
A set is a well-defined collection of objects. The union of two sets contains elements in either set, the intersection contains elements in both, and the complement contains elements of the universal set not in the set; Venn diagrams and the formula n(A ∪ B) = n(A) + n(B) - n(A ∩ B) solve counting problems.
6 min read · Quantitative Aptitude · Set Theory, Functions and Graphs
Quick Answer
A set is a well-defined collection of objects. The union of two sets contains elements in either set, the intersection contains elements in both, and the complement contains elements of the universal set not in the set; Venn diagrams and the formula n(A ∪ B) = n(A) + n(B) – n(A ∩ B) solve counting problems.
At a Glance
- Union Elements in A or B or both
- Intersection Elements in both A and B
- Complement Elements of U not in A
- Two-set formula n(A∪B) = n(A) + n(B) – n(A∩B)
- Neither n(U) – n(A∪B)
Where Does It Fit?
This is the first topic of the Set Theory macro. It is extended in Set Theory Problems Involving Three Overlapping Sets and De Morgan’s Laws Applied to Set Operations, and the counting idea reappears in Fundamental Principle of Counting (Addition and Multiplication Rules).
What Are the Basic Set Operations?
In short: a set is a collection of distinct objects, written in braces. The universal set U contains every element under discussion.
| Operation | Symbol | Meaning | Example for A = {1, 2, 3}, B = {3, 4} |
|---|---|---|---|
| Union | A ∪ B | In A or B or both | {1, 2, 3, 4} |
| Intersection | A ∩ B | In both A and B | {3} |
| Difference | A – B | In A but not in B | {1, 2} |
| Complement | A′ | In U but not in A | All elements of U other than 1, 2, 3 |
Two sets are disjoint when their intersection is empty. A is a subset of B when every element of A is in B.
What Is the Two-Set Venn Diagram Formula?
In short: a Venn diagram with two overlapping circles has four regions: only A, both, only B and neither. Adding n(A) and n(B) counts the overlap twice, so it is subtracted once.
Two-set formulas
- n(A ∪ B) = n(A) + n(B) – n(A ∩ B).
- Only A = n(A) – n(A ∩ B); only B = n(B) – n(A ∩ B).
- Exactly one of the two = n(A) + n(B) – 2 n(A ∩ B).
- Neither = n(U) – n(A ∪ B).
How Do You Solve a Survey Problem?
In short: fill the overlap first, then the single regions, then the outside.
- Step 1: write the total and the numbers for each set.
- Step 2: place the ‘both’ number in the overlap.
- Step 3: subtract it from each set to get ‘only’ values.
- Step 4: the remaining people are in ‘neither’.
When three sets are involved, the method becomes the one in Set Theory Problems Involving Three Overlapping Sets.
Solved Examples
Example 1
Question: In a class of 60, 35 like tea, 30 like coffee and 10 like both. How many like neither?
- n(A ∪ B) = 35 + 30 – 10 = 55.
- Neither = 60 – 55.
Answer: 5 students like neither.
Example 2
Question: If n(A ∪ B) = 50, n(A) = 30 and n(B) = 35, find n(A ∩ B).
- 50 = 30 + 35 – n(A ∩ B).
- n(A ∩ B) = 65 – 50.
Answer: n(A ∩ B) = 15.
Example 3
Question: In a survey of 200 people, 120 read newspaper X, 80 read Y and 40 read both. Find those who read only X, either paper and neither.
- Only X = 120 – 40 = 80.
- Either = 120 + 80 – 40 = 160.
- Neither = 200 – 160 = 40.
Answer: 80 read only X, 160 read at least one, and 40 read neither.
Example 4
Question: Of the numbers 1 to 20, A is the set of multiples of 3 and B is the set of multiples of 4. Find n(A ∪ B) and n(A′).
- A = {3, 6, 9, 12, 15, 18}, so n(A) = 6.
- B = {4, 8, 12, 16, 20}, so n(B) = 5, and A ∩ B = {12}, so n(A ∩ B) = 1.
- n(A ∪ B) = 6 + 5 – 1 = 10, and n(A′) = 20 – 6 = 14.
Answer: n(A ∪ B) = 10 and n(A′) = 14.
Example 5
Question: In a group, 30 speak English, 29 speak Hindi and 14 speak both. Everyone speaks at least one of the two. Find the group size and the number who speak exactly one language.
- Group size = 30 + 29 – 14 = 45.
- Exactly one = 30 + 29 – 2 × 14 = 31.
Answer: The group has 45 people, and 31 speak exactly one language.
Shortcuts and Tricks
- Always find the intersection first; every other region depends on it.
- Exactly one = n(A) + n(B) – 2 n(A ∩ B), which is the union minus the overlap.
- If everyone belongs to at least one set, n(A ∪ B) = n(U).
- For multiples, n(A ∩ B) is the multiples of the LCM.
- Check that the four regions add up to the total.
Common Mistakes
- Adding n(A) and n(B) without subtracting the overlap.
- Confusing ‘only A’ with ‘A’; ‘only A’ excludes the overlap.
- Treating ‘neither’ as the overlap.
- Using the union where the question asks for the number who like exactly one.
- Forgetting that the universal set is not always the whole population.
Practice Questions
- If n(A) = 25, n(B) = 18 and n(A ∩ B) = 7, find n(A ∪ B).
- For the same data, how many are in exactly one set?
- Of 100 people, 70 speak Hindi and 45 speak English, and all speak at least one. How many speak both?
- How many numbers from 1 to 50 are multiples of 2 or 5?
- If n(U) = 100 and n(A) = 64, find n(A′).
- If n(A) = 30 and n(A ∩ B) = 12, find n(A – B).
Answers: 1) 36; 2) 29; 3) 15; 4) 30; 5) 36; 6) 18.
Why Is This Topic Important?
- Foundation Set counting is used in data sufficiency and probability.
- Exam use Survey questions appear in SSC CGL and CAT.
- Link It leads to three-set problems in Set Theory Problems Involving Three Overlapping Sets.
What Comes Next?
The next topic is Set Theory Problems Involving Three Overlapping Sets, which extends the Venn diagram to three overlapping sets.
Key Terms and Formulas
- Set A well-defined collection of objects
- Universal set The set of all elements under discussion
- Disjoint sets Sets with no common element
- Subset A set contained inside another
Related Topics
- Set Theory Problems Involving Three Overlapping Sets
- Functions – Domain, Range and Types of Functions (One-One, Onto, Bijective)
- Composite Functions and Inverse Functions
- Graphs of Linear, Quadratic and Modulus Functions
Related Topics in Maarg Manthan
Study this topic together with these linked topics from other subjects.
- Two-Set and Three-Set Venn Diagram Problems (Reasoning)
- Numerical/Data-Based Venn Diagram Problems (Counting Elements in Regions) (Reasoning)
Exam Corner
Points to Remember
- n(A∪B) = n(A) + n(B) – n(A∩B).
- Neither = n(U) – n(A∪B).
- Only A = n(A) – n(A∩B).
- Exactly one = n(A) + n(B) – 2 n(A∩B).
Do Not Confuse With
- Union vs intersection Union means either or both; intersection means both.
- Only A vs A Only A excludes the overlap.
- Complement vs difference The complement uses the universal set; the difference uses another set.
Memory Hook
Add both, take away the overlap once, subtract from the total for neither.
GS Relevance
Frequently Asked Questions
What is the formula for the union of two sets?
The union of two sets has n(A union B) equal to n(A) plus n(B) minus n(A intersection B). The overlap is subtracted once because adding the two set sizes counts the common elements twice, and the result gives the number of elements in at least one of the sets.
What is a Venn diagram in set theory?
A Venn diagram draws each set as a circle inside a rectangle that stands for the universal set. Overlapping circles show common elements, and with two sets the diagram has four regions: only A, both, only B and neither, which helps solve counting problems.
How do you find the number of elements in neither set?
Subtract the size of the union from the size of the universal set. If 60 students are in a class and 55 like tea or coffee, then 60 minus 55 equals 5 students like neither. This is the region outside both circles of the Venn diagram.
What is the complement of a set?
The complement of a set A, written A prime, contains all elements of the universal set that are not in A. If the universal set has 20 numbers and A has 6 of them, the complement has 14 elements, since n(A prime) equals n(U) minus n(A).
How many people belong to exactly one of two sets?
The number is n(A) plus n(B) minus twice n(A intersection B). For n(A) equal to 25, n(B) equal to 18 and an overlap of 7, exactly one set contains 25 plus 18 minus 14, which is 29 people, found by removing the overlap from both circles.
PYQ Practice — Statement Analysis
1 n(A ∪ B) = n(A) + n(B) always.
The overlap must be subtracted unless the sets are disjoint.
2 If n(A) = 25, n(B) = 18 and n(A ∩ B) = 7, then n(A ∪ B) = 36.
25 + 18 - 7 = 36.
3 The number of elements in neither set is n(U) - n(A ∪ B).
It is the region outside both circles.
4 Two sets with an empty intersection are called disjoint.
They have no common element.
Related Topics
Browse the full Quantitative Aptitude index