Quantitative Aptitude · Sets, Relations and Functions, Limits and Continuity
Set Operations and Venn Diagrams for CA Foundation
Updated 1 October 2026 · Fact-checked
Set operations combine or compare sets: union (A ∪ B), intersection (A ∩ B), difference (A − B) and complement (A′). Venn diagrams show them as overlapping circles. For word problems, use n(A ∪ B) = n(A) + n(B) − n(A ∩ B), fill the diagram from the innermost overlap outward, and read off the answer.
Understand Set Operations and Venn Diagrams
A set is a well-defined collection of objects. Each object is an element. The universal set U holds everything under discussion. Every other set in the problem is a part of U.
Four operations matter. The union A ∪ B holds elements in A, or in B, or in both. The intersection A ∩ B holds only elements in both. The difference A − B holds elements in A that are not in B. The complement A′ holds everything in U that is not in A, so A′ = U − A.
A Venn diagram draws U as a rectangle and each set as a circle. Two overlapping circles make four regions: only A, only B, both, and neither. The region outside all circles is the 'neither' part. Almost every word problem is a task of finding the number in one region.
De Morgan's laws tell you how a complement acts on a union or intersection. The complement of a union is the intersection of the complements. The complement of an intersection is the union of the complements. In words: 'not (A or B)' means 'not A and not B'. 'Not (A and B)' means 'not A or not B'.
Why De Morgan works: an element is outside A ∪ B only if it is outside A and also outside B. That gives (A ∪ B)′ = A′ ∩ B′. The second law follows the same way.
Key formulas to remember
- Union of two sets
- n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
- Subtract the overlap because it is counted twice.
- Disjoint sets
- If A ∩ B = ∅, then n(A ∪ B) = n(A) + n(B)
- A special case when there is no overlap.
- Difference
- n(A − B) = n(A) − n(A ∩ B)
- This is the 'only A' region.
- Complement
- n(A′) = n(U) − n(A)
- U is the universal set.
- Neither A nor B
- n(A′ ∩ B′) = n(U) − n(A ∪ B)
- Uses De Morgan: A′ ∩ B′ = (A ∪ B)′.
- De Morgan's laws
- (A ∪ B)′ = A′ ∩ B′ and (A ∩ B)′ = A′ ∪ B′
- Complement is taken within the same universal set U.
- Exactly one of A or B
- n(A) + n(B) − 2n(A ∩ B)
- This is the symmetric difference: only A plus only B.
- Union of three sets
- n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(B ∩ C) − n(A ∩ C) + n(A ∩ B ∩ C)
- Add singles, subtract pairs, add the triple.
How to solve Set Operations and Venn Diagrams questions
Use this method for any set word problem. It works for two or three sets.
- 1Name the sets clearly. Write what A, B and C stand for, and note the total n(U) if given.
- 2Translate each phrase. 'Both' means ∩, 'at least one' or 'either' means ∪, 'only A' means A − B, 'neither' means outside all circles.
- 3Draw the circles. Always overlap them so every region exists.
- 4Fill the innermost region first, which is the intersection (the triple overlap for three sets).
- 5Work outward. Only-A = n(A) − overlap. Do the same for B and C, then the 'neither' region as n(U) minus the union.
- 6Check that all regions add to n(U). Then read off the region the question asks for.
- 7Match your answer to the options and check that it is not a leftover from another region.
Quickest way: Formula-first with option check
When to use it: Use it for two-set problems with an MCQ, where you want the answer in under a minute.
- Write n(A ∪ B) = n(A) + n(B) − n(A ∩ B) and put in the known values.
- Solve for the unknown. If the total is given, use n(A ∪ B) = n(U) − n(neither).
- For 'only one' type questions, subtract the overlap from each set separately.
- For three-set problems, skip the long formula and draw the diagram from the centre outward.
- Put your answer back into the data to check. Skip a long three-set question if your first pass gives a negative region, then return to it later.
Common mistakes in Set Operations and Venn Diagrams
Forgetting to subtract the overlap in n(A ∪ B).
Adding n(A) and n(B) feels natural, so the double count is missed.
Fix: Always write the full formula first. Ask whether anyone is in both.
Treating 'only A' as n(A).
n(A) includes the people who are also in B.
Fix: Use n(A) − n(A ∩ B) for only A.
Writing De Morgan with no change of sign, such as (A ∪ B)′ = A′ ∪ B′.
Students push the complement inside but keep the same operation.
Fix: Remember that the complement flips ∪ to ∩ and ∩ to ∪.
Ignoring the 'neither' group when the total is given.
Students treat the union as the whole population.
Fix: Use n(U) = n(A ∪ B) + n(neither).
Filling the outer regions first in a three-set diagram.
The numbers for single sets are given first, so students use them first.
Fix: Fill the triple overlap, then the pair-only regions (pair minus triple), then the single-only regions.
Confusing A − B with B − A.
Both are set differences, but the order matters.
Fix: Read A − B as 'in A but not in B'. It is not usually equal to B − A.
Worked examples
Example 1
In a group of 100 students, 60 like tea, 45 like coffee and 20 like both. How many like neither? (A) 10 (B) 15 (C) 20 (D) 25
Show the solution
- n(U) = 100, n(T) = 60, n(C) = 45, n(T ∩ C) = 20.
- n(T ∪ C) = 60 + 45 − 20 = 85.
- Neither = n(U) − n(T ∪ C) = 100 − 85 = 15.
Answer: (B) 15
Example 2
In a class, 40 students study Maths, 30 study Statistics and 15 study both. How many study exactly one of the two subjects? (A) 40 (B) 45 (C) 55 (D) 70
Show the solution
- Only Maths = 40 − 15 = 25.
- Only Statistics = 30 − 15 = 15.
- Exactly one = 25 + 15 = 40.
- Check with the formula: 40 + 30 − 2 × 15 = 40.
Answer: (A) 40
Example 3
Let U = {1, 2, 3, 4, 5, 6, 7, 8}, A = {1, 2, 3, 4} and B = {3, 4, 5, 6}. What is n((A ∪ B)′)? (A) 2 (B) 3 (C) 4 (D) 6
Show the solution
- A ∪ B = {1, 2, 3, 4, 5, 6}, so n(A ∪ B) = 6.
- (A ∪ B)′ = U − (A ∪ B) = {7, 8}.
- Check with De Morgan: A′ = {5, 6, 7, 8} and B′ = {1, 2, 7, 8}. A′ ∩ B′ = {7, 8}, which has 2 elements.
Answer: (A) 2
Exam tips
- Read the wording carefully. 'Either A or B' may mean at least one, and 'only' means the overlap must be removed.
- If the numbers cannot be placed without a negative region, the data is inconsistent. Recheck your reading rather than force an answer.
- For set-listing questions, write out the actual elements. Do not trust mental work. Paper 3 (Quantitative Aptitude) has negative marking of 0.25 per wrong answer, so careless errors cost marks.
- Use complement and De Morgan to simplify 'not' questions. It is faster to count the union and subtract it from the total.
- In three-set problems, many MCQs give the triple overlap or the total. Start the diagram from the given overlap.
Practice questions from Sets, Relations and Functions, Limits and Continuity
- The function f is defined by f(x) = (x² − 9)/(x − 3) for x ≠ 3 and f(3) = k. For what value of k is f continuous at x = 3?
- Let f(x) = 2x + 3 and g(x) = x². What is the value of (g∘f)(2), that is g(f(2))?
- Consider the function f(x) = (x² - 9)/(x - 3) for x ≠ 3. What is the limit of f(x) as x approaches 3?
- The domain of the real function f(x) = (2x − 3)/(x² − 5x + 6) is:
- A relation R is defined on the set of natural numbers as R = {(x, y) : x divides y}. Which of the following ordered pairs does NOT belong to…
Set Operations and Venn Diagrams: frequently asked questions
What is the formula for n(A ∪ B)?
n(A ∪ B) = n(A) + n(B) − n(A ∩ B). The overlap is counted in both n(A) and n(B), so you subtract it once. If the sets are disjoint, the overlap is zero and you simply add.
How do I prove De Morgan's law?
Take any element x in (A ∪ B)′. It is not in A ∪ B, so it is not in A and not in B. That means x is in A′ ∩ B′. The steps also work in reverse, so the two sets are equal. The second law is proved the same way.
How do I find the number of people in only one set?
Subtract the overlap from the set total. For two sets, only A = n(A) − n(A ∩ B). For three sets, only A = n(A) − n(A ∩ B) − n(A ∩ C) + n(A ∩ B ∩ C).
Is A − B the same as A ∩ B′?
Yes. A − B holds elements in A that are not in B, and B′ is everything not in B. So A ∩ B′ gives the same elements. This is often useful when simplifying set expressions.