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

easy CBSE JEE-MAIN 3 min read
Tags Sets

Question

Let U={1,2,3,4,5,6,7,8,9,10}U = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}, A={1,2,3,4,5}A = \{1, 2, 3, 4, 5\}, and B={3,4,5,6,7}B = \{3, 4, 5, 6, 7\}. Find: (a) ABA \cup B, (b) ABA \cap B, (c) ABA - B, (d) AA', (e) (AB)(A \cup B)', (f) Verify De Morgan’s law: (AB)=AB(A \cup B)' = A' \cap B'.


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\}

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

BB' = elements in U but not in B = {1,2,8,9,10}\{1, 2, 8, 9, 10\}

(AB)=U(AB)={8,9,10}(A \cup B)' = U - (A \cup B) = \{8, 9, 10\}

AB={6,7,8,9,10}{1,2,8,9,10}={8,9,10}A' \cap B' = \{6, 7, 8, 9, 10\} \cap \{1, 2, 8, 9, 10\} = \{8, 9, 10\}

Since (AB)={8,9,10}=AB(A \cup B)' = \{8, 9, 10\} = A' \cap B', De Morgan’s law is verified.


Why This Works

graph TD
    A["Set Operation"] --> B["Union A ∪ B"]
    A --> C["Intersection A ∩ B"]
    A --> D["Difference A - B"]
    A --> E["Complement A'"]
    B --> F["Everything in either set"]
    C --> G["Only what is common"]
    D --> H["In A but not in B"]
    E --> I["Everything in U not in A"]
    A --> J["De Morgan's Laws"]
    J --> K["A ∪ B complement = A' ∩ B'"]
    J --> L["A ∩ B complement = A' ∪ B'"]

Set operations are the foundation of mathematical logic. Union corresponds to “OR,” intersection to “AND,” and complement to “NOT.” De Morgan’s laws connect these operations — they say “not(A or B) = (not A) and (not B)” and “not(A and B) = (not A) or (not B).” These laws appear everywhere — in probability, logic gates, database queries, and programming.

The cardinal number formula is essential for problem solving: n(AB)=n(A)+n(B)n(AB)n(A \cup B) = n(A) + n(B) - n(A \cap B). We subtract the intersection because it was counted twice.


Alternative Method

For JEE problems involving three sets, use the inclusion-exclusion principle:

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)

Draw a Venn diagram with three overlapping circles and fill in values from the innermost region outward. Start with n(ABC)n(A \cap B \cap C), then fill the two-set-only regions, then single-set-only regions. This approach prevents double-counting errors.


Common Mistake

Confusing ABA - B with BAB - A. These are NOT the same unless A=BA = B. Here, AB={1,2}A - B = \{1, 2\} but BA={6,7}B - A = \{6, 7\}. Difference is not commutative. Also, students often forget that A=UAA' = U - A, not just “not A” — the complement depends on the universal set UU. Always check what UU is before computing complements.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next