Set operations — union, intersection, complement, difference with Venn diagrams

easy CBSE JEE-MAIN 3 min read
Tags Sets

Question

If A={1,2,3,4,5}A = \{1, 2, 3, 4, 5\}, B={3,4,5,6,7}B = \{3, 4, 5, 6, 7\}, and the universal set U={1,2,3,4,5,6,7,8,9,10}U = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}, find ABA \cup B, ABA \cap B, ABA - B, BAB - A, AA', and verify n(AB)=n(A)+n(B)n(AB)n(A \cup B) = n(A) + n(B) - n(A \cap B).

(CBSE 11 & JEE Main — sets chapter)


Solution — Step by Step

ABA \cup B = all elements in A or B (or both): {1,2,3,4,5,6,7}\{1, 2, 3, 4, 5, 6, 7\}

ABA \cap B = elements in both A and B: {3,4,5}\{3, 4, 5\}

ABA - B = elements in A but not in B: {1,2}\{1, 2\}

BAB - A = elements in B but not in A: {6,7}\{6, 7\}

A=UAA' = U - A = elements in U but not in A: {6,7,8,9,10}\{6, 7, 8, 9, 10\}

n(A)=5n(A) = 5, n(B)=5n(B) = 5, n(AB)=3n(A \cap B) = 3, n(AB)=7n(A \cup B) = 7

n(A)+n(B)n(AB)=5+53=7=n(AB)n(A) + n(B) - n(A \cap B) = 5 + 5 - 3 = 7 = n(A \cup B) \checkmark

Why This Works

Set operations correspond to logical operations: union = OR, intersection = AND, complement = NOT. The formula n(AB)=n(A)+n(B)n(AB)n(A \cup B) = n(A) + n(B) - n(A \cap B) corrects for double-counting — elements in both sets get counted twice when we add n(A)n(A) and n(B)n(B), so we subtract the intersection once.

graph TD
    A["Set Operation Problem"] --> B{"What's asked?"}
    B -->|"Elements in A OR B"| C["Union: A ∪ B<br/>Combine all elements"]
    B -->|"Elements in A AND B"| D["Intersection: A ∩ B<br/>Common elements only"]
    B -->|"Elements in A but NOT B"| E["Difference: A - B"]
    B -->|"Elements NOT in A"| F["Complement: A'<br/>= U - A"]
    B -->|"Count of union"| G["n(A∪B) = n(A) + n(B)<br/>- n(A∩B)"]
    G --> H{"Three sets?"}
    H -->|"Yes"| I["Add/subtract using<br/>inclusion-exclusion principle"]

Alternative Method — Venn Diagram Approach

Draw two overlapping circles inside a rectangle (universal set). Fill in the intersection first ({3,4,5}\{3, 4, 5\}), then the remaining parts of each circle ({1,2}\{1, 2\} for A-only, {6,7}\{6, 7\} for B-only), then the outside ({8,9,10}\{8, 9, 10\}). Read any operation directly from the diagram.

For JEE word problems: when the question says ”nn students play cricket, mm play football, kk play both,” directly apply n(AB)=n+mkn(A \cup B) = n + m - k. For three activities, use inclusion-exclusion: n(ABC)=n(A)+n(B)+n(C)n(AB)n(BC)n(AC)+n(ABC)n(A \cup B \cup C) = n(A) + n(B) + n(C) - n(A \cap B) - n(B \cap C) - n(A \cap C) + n(A \cap B \cap C).


Common Mistake

Students write AB=BAA - B = B - A. These are NOT equal (set difference is not commutative). In our example, AB={1,2}A - B = \{1, 2\} while BA={6,7}B - A = \{6, 7\}. The symmetric difference AΔB=(AB)(BA)={1,2,6,7}A \Delta B = (A - B) \cup (B - A) = \{1, 2, 6, 7\} is the operation that IS commutative. CBSE boards test this distinction explicitly.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next