Operations on Sets — Arithmetic for Collections

Just as addition and multiplication take two numbers and produce a number, set operations take two sets and produce a set. There are four to master: union, intersection, difference and complement. From here on, all our sets are subsets of some universal set U.

Union: ABA \cup B

Key Point (Definition): The union of A and B is the set of all elements which are in A or in B (including those in both): AB={x:xA or xB}A \cup B = \{x : x \in A \text{ or } x \in B\}.

Example: A = {2, 4, 6, 8} and B = {6, 8, 10, 12} give ABA \cup B = {2, 4, 6, 8, 10, 12} — the common elements 6 and 8 are taken only once.

The "or" here is the inclusive or of mathematics: x may be in A, in B, or in both.

If BAB \subset A, then AB=AA \cup B = A — pouring a subset back into its parent adds nothing.

Properties of union:

  • AB=BAA \cup B = B \cup A (commutative law)
  • (AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C) (associative law)
  • Aϕ=AA \cup \phi = A (identity law — ϕ\phi is the identity of \cup)
  • AA=AA \cup A = A (idempotent law)
  • UA=UU \cup A = U (law of U)

Intersection and Disjoint Sets

Key Point (Definition): The intersection of A and B is the set of all elements common to both: AB={x:xA and xB}A \cap B = \{x : x \in A \text{ and } x \in B\}.

Example: with A = {2, 4, 6, 8} and B = {6, 8, 10, 12}, ABA \cap B = {6, 8}.

If BAB \subset A, then AB=BA \cap B = B — intersecting with a parent returns the subset.

Venn diagrams shading union of A and B and intersection of A and B

Disjoint sets

If AB=ϕA \cap B = \phi — no common element at all — then A and B are called disjoint sets. Example: {2, 4, 6, 8} and {1, 3, 5, 7} are disjoint. In a Venn diagram, disjoint sets are drawn as non-overlapping circles.

Properties of intersection:

  • AB=BAA \cap B = B \cap A (commutative law)
  • (AB)C=A(BC)(A \cap B) \cap C = A \cap (B \cap C) (associative law)
  • ϕA=ϕ\phi \cap A = \phi, UA=AU \cap A = A (laws of ϕ\phi and U)
  • AA=AA \cap A = A (idempotent law)
  • A(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C) (distributive law\cap distributes over \cup)

The dual distributive law also holds: A(BC)=(AB)(AC)A \cup (B \cap C) = (A \cup B) \cap (A \cup C).

[JEE Tip] The distributive laws work exactly like a(b+c)=ab+aca(b + c) = ab + ac in algebra — but in sets, BOTH distributions are valid, which has no arithmetic analogue (a+bc(a+b)(a+c)a + bc \neq (a+b)(a+c) for numbers!). Verifying either law by shading two Venn diagrams is a classic 3-mark question.

Difference of Sets

Key Point (Definition): The difference ABA - B (read "A minus B") is the set of elements which belong to A but not to B: AB={x:xA and xB}A - B = \{x : x \in A \text{ and } x \notin B\}.

Example: A = {1, 2, 3, 4, 5, 6}, B = {2, 4, 6, 8}:

  • ABA - B = {1, 3, 5} — in A, not in B.
  • BAB - A = {8} — in B, not in A.

Notice immediately: ABBAA - B \neq B - A. The difference of sets is not commutative — order matters, exactly as with subtraction of numbers.

Venn diagram of A minus B, the intersection, and B minus A

The picture shows something worth memorising: the three sets ABA - B, ABA \cap B and BAB - A are mutually disjoint, and together they tile the whole of ABA \cup B:

AB=(AB)(AB)(BA)A \cup B = (A - B) \cup (A \cap B) \cup (B - A)

Also useful: A=(AB)(AB)A = (A - B) \cup (A \cap B) — a set splits cleanly into "private part" and "shared part".

A famous instance: RQ\mathbb{R} - \mathbb{Q} = the set of irrational numbers T. The difference operation defines the irrationals.

[Board Important] When computing ABA - B in roster form, walk through A's elements one at a time and strike out those appearing in B. Do not touch B's extra elements — they are irrelevant to ABA - B.

Complement of a Set

Fix a universal set U. For a subset A of U:

Key Point (Definition): The complement of A is the set of all elements of U which are not elements of A: A={x:xU and xA}A' = \{x : x \in U \text{ and } x \notin A\}. Clearly A=UAA' = U - A.

Example: U = {1, 2, …, 10}, A = {1, 3, 5, 7, 9} gives A' = {2, 4, 6, 8, 10}.

Example: U = all students of Class XI, A = the girls; then A' = the boys.

Taking complement twice returns the original set: (A)=A(A')' = A — flipping membership two times restores it.

Shaded complement of A in universal rectangle with property list

The laws of complement

  1. Complement laws: AA=UA \cup A' = U and AA=ϕA \cap A' = \phi — a set and its complement tile U with no overlap.
  2. De Morgan's laws: (AB)=AB(A \cup B)' = A' \cap B' and (AB)=AB(A \cap B)' = A' \cup B'.
  3. Double complementation: (A)=A(A')' = A.
  4. Laws of ϕ\phi and U: ϕ=U\phi' = U and U=ϕU' = \phi.

De Morgan in words: the complement of a union is the intersection of the complements; the complement of an intersection is the union of the complements. Priming flips \cup and \cap.

Quick verification with U = {1, 2, 3, 4, 5, 6}, A = {2, 3}, B = {3, 4, 5}: ABA \cup B = {2, 3, 4, 5}, so (AB)(A \cup B)' = {1, 6}. Separately A' = {1, 4, 5, 6} and B' = {1, 2, 6}, whose intersection is {1, 6}. Match! ✓

[JEE Tip] De Morgan's laws are the single most examined fact of this chapter in MCQs. An everyday translation helps: "NOT (rich or famous)" means "not rich AND not famous". The negation of an or is an and of negations.

Solved Examples

Example 1. Let A = {2, 4, 6, 8} and B = {6, 8, 10, 12}. Find ABA \cup B.

Solution.

Step 1 — pool every element of both sets. From A: 2, 4, 6, 8. From B: 6, 8, 10, 12.

Step 2 — drop duplicates. 6 and 8 appear in both lists; a set records each element once.

Step 3 — write the union. AB={2,4,6,8,10,12}A \cup B = \{2, 4, 6, 8, 10, 12\}.

Step 4 — sanity check. n(AB)=6=4+42n(A \cup B) = 6 = 4 + 4 - 2: total minus the 2 shared elements — exactly the counting rule n(A)+n(B)n(AB)n(A) + n(B) - n(A \cap B).

Takeaway: union merges lists; shared elements appear once, never twice.


Example 2. Let A = {a, e, i, o, u} and B = {a, i, u}. Show that AB=AA \cup B = A.

Solution.

Step 1 — observe the subset relation. Every element of B (a, i, u) already lies in A, so BAB \subset A.

Step 2 — compute the union. Pooling contributes nothing new from B: AB={a,e,i,o,u}=AA \cup B = \{a, e, i, o, u\} = A.

Step 3 — extract the general rule. Whenever BAB \subset A, we get AB=AA \cup B = A — pouring a subset back into its parent changes nothing.

Takeaway: with a subset, union just picks the bigger set — a rule you may quote directly in exams.


Example 3. X = {Ram, Geeta, Akbar} is the hockey team and Y = {Geeta, David, Ashok} the football team. Find XYX \cup Y and XYX \cap Y, and interpret.

Solution.

Step 1 — the union. Pool both teams, listing Geeta once: XYX \cup Y = {Ram, Geeta, Akbar, David, Ashok}. Interpretation: students who play hockey OR football (or both).

Step 2 — the intersection. Scan for names on BOTH lists: only Geeta. XYX \cap Y = {Geeta}. Interpretation: students who play both games.

Step 3 — read the sizes. 5=3+315 = 3 + 3 - 1: the one double-counted player (Geeta) is subtracted once ✓.

Takeaway: in real-world language, union = "atleast one of the two", intersection = "both".

Example 4. Let A = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} and B = {2, 3, 5, 7}. Find ABA \cap B and show that AB=BA \cap B = B.

Solution.

Step 1 — find the common elements. Check B's elements against A: 2 ✓, 3 ✓, 5 ✓, 7 ✓ — every element of B lies in A.

Step 2 — write the intersection. AB={2,3,5,7}A \cap B = \{2, 3, 5, 7\}, which is exactly B.

Step 3 — extract the general rule. Since BAB \subset A, intersecting with the parent returns the subset: AB=BA \cap B = B.

Takeaway: the companion of Example 2 — with a subset, union picks the bigger set and intersection picks the smaller.


Example 5. If A = {3, 5, 7, 9, 11}, B = {7, 9, 11, 13}, C = {11, 13, 15} and D = {15, 17}, find: (i) ABA \cap B (ii) BCB \cap C (iii) ACDA \cap C \cap D (iv) A(BC)A \cap (B \cup C) (v) (AD)(BC)(A \cup D) \cap (B \cup C).

Solution.

Step 1 — work strictly inside-out: brackets first.

(i) Step 2. Common to A and B: 7, 9, 11 → AB={7,9,11}A \cap B = \{7, 9, 11\}.

(ii) Step 3. Common to B and C: 11, 13 → BC={11,13}B \cap C = \{11, 13\}.

(iii) Step 4. First AC={11}A \cap C = \{11\}; then intersect with D = {15, 17}: 11 is absent → ACD=ϕA \cap C \cap D = \phi.

(iv) Step 5. Inner bracket: BC={7,9,11,13,15}B \cup C = \{7, 9, 11, 13, 15\}. Intersect with A: keep 7, 9, 11 → {7,9,11}\{7, 9, 11\}.

(v) Step 6. AD={3,5,7,9,11,15,17}A \cup D = \{3, 5, 7, 9, 11, 15, 17\} and BC={7,9,11,13,15}B \cup C = \{7, 9, 11, 13, 15\}; the common elements are 7, 9, 11, 15 → {7,9,11,15}\{7, 9, 11, 15\}.

Step 7 — check (iv) against the distributive law. (AB)(AC)={7,9,11}{11}={7,9,11}(A \cap B) \cup (A \cap C) = \{7, 9, 11\} \cup \{11\} = \{7, 9, 11\} ✓ — matches the bracket-first computation.

Takeaway: never distribute mentally in one go — compute the inner bracket, then apply the outer operation.


Example 6. With A = naturals, B = even naturals, C = odd naturals, D = primes, find ABA \cap B, ACA \cap C, ADA \cap D, BCB \cap C, BDB \cap D, CDC \cap D.

Solution.

Step 1 — intersections with the parent set. B, C, D are all subsets of A, so intersecting with A returns each unchanged: AB=BA \cap B = B, AC=CA \cap C = C, AD=DA \cap D = D.

Step 2 — BCB \cap C. A number even AND odd would leave remainders 0 and 1 on division by 2 simultaneously — impossible: BC=ϕB \cap C = \phi.

Step 3 — BDB \cap D. An even prime is divisible by 2, and primality then forces it to BE 2: BD={2}B \cap D = \{2\}.

Step 4 — CDC \cap D. The odd primes: every prime except 2, i.e. {x:x is prime and x2}={3,5,7,11,}\{x : x \text{ is prime and } x \neq 2\} = \{3, 5, 7, 11, \ldots\}.

Takeaway: BD={2}B \cap D = \{2\} — the lone even prime — is the most quoted intersection in mathematics; it decides dozens of empty-set questions.

Example 7. Let V = {a, e, i, o, u} and B = {a, i, k, u}. Find V − B and B − V.

Solution.

Step 1 — V − B: walk through V, striking anything found in B. a ∈ B strike; e stays; i ∈ B strike; o stays; u ∈ B strike. Result: VB={e,o}V - B = \{e, o\}.

Step 2 — B − V: walk through B, striking anything found in V. a strike; i strike; k stays; u strike. Result: BV={k}B - V = \{k\}.

Step 3 — compare. {e,o}{k}\{e, o\} \neq \{k\}: the two differences are different sets, even of different sizes.

Takeaway: difference is NOT commutative — each difference is computed from its own left-hand set, and the shared elements (a, i, u) vanish from both answers.


Example 8. If A = {3, 6, 9, 12, 15, 18, 21}, B = {4, 8, 12, 16, 20}, C = {2, 4, 6, 8, 10, 12, 14, 16}, find (i) A − B (ii) B − C (iii) C − A (iv) B − A.

Solution.

Step 1 — identify each pair's overlap first (the elements that will be struck). AB={12}A \cap B = \{12\}; BC={4,8,12,16}B \cap C = \{4, 8, 12, 16\}; CA={6,12}C \cap A = \{6, 12\}.

(i) Step 2. Strike 12 from A: AB={3,6,9,15,18,21}A - B = \{3, 6, 9, 15, 18, 21\}.

(ii) Step 3. Strike 4, 8, 12, 16 from B: BC={20}B - C = \{20\}.

(iii) Step 4. Strike 6, 12 from C: CA={2,4,8,10,14,16}C - A = \{2, 4, 8, 10, 14, 16\}.

(iv) Step 5. Strike 12 from B: BA={4,8,16,20}B - A = \{4, 8, 16, 20\}.

Step 6 — observe. The overlap AB={12}A \cap B = \{12\} appears in NEITHER ABA - B nor BAB - A — shared elements never survive a difference.

Takeaway: compute the intersection first; the difference is then a clean strike-out with no second-guessing.


Example 9. If R\mathbb{R} is the set of real numbers and Q\mathbb{Q} the set of rational numbers, what is RQ\mathbb{R} - \mathbb{Q}?

Solution.

Step 1 — apply the definition of difference. RQ={x:xR and xQ}\mathbb{R} - \mathbb{Q} = \{x : x \in \mathbb{R} \text{ and } x \notin \mathbb{Q}\}: the reals that are not rational.

Step 2 — recognise the set. Real-but-not-rational is precisely the definition of an IRRATIONAL number, so RQ=T\mathbb{R} - \mathbb{Q} = T, the set of irrationals — home of 2\sqrt{2}, 5\sqrt{5}, π\pi, e.

Takeaway: the irrationals are not defined by a property of their own — they are literally a set difference. A one-line question that appears year after year.

Example 10. Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9}, A = {1, 2, 3, 4}, B = {2, 4, 6, 8} and C = {3, 4, 5, 6}. Find (i) A' (ii) B' (iii) (AC)(A \cup C)' (iv) (AB)(A \cup B)' (v) (A')' (vi) (BC)(B - C)'.

Solution.

Step 1 — the method: every complement is U minus the set. Compute the inner set first, then strike its elements from U.

(i) Step 2. A=UA={5,6,7,8,9}A' = U - A = \{5, 6, 7, 8, 9\}.

(ii) Step 3. B=UB={1,3,5,7,9}B' = U - B = \{1, 3, 5, 7, 9\}.

(iii) Step 4. Inner set: AC={1,2,3,4,5,6}A \cup C = \{1, 2, 3, 4, 5, 6\}. Complement: {7,8,9}\{7, 8, 9\}.

(iv) Step 5. Inner set: AB={1,2,3,4,6,8}A \cup B = \{1, 2, 3, 4, 6, 8\}. Complement: {5,7,9}\{5, 7, 9\}.

(v) Step 6. (A)=U{5,6,7,8,9}={1,2,3,4}=A(A')' = U - \{5, 6, 7, 8, 9\} = \{1, 2, 3, 4\} = A ✓ — double complementation restores the set.

(vi) Step 7. Inner set: BC={2,8}B - C = \{2, 8\} (strike 4, 6 from B). Complement: {1,3,4,5,6,7,9}\{1, 3, 4, 5, 6, 7, 9\}.

Takeaway: always resolve the inner operation to an explicit roster before priming — complements of unevaluated expressions invite errors.


Example 11. Let U = {1, 2, 3, 4, 5, 6}, A = {2, 3} and B = {3, 4, 5}. Verify that (AB)=AB(A \cup B)' = A' \cap B'.

Solution.

Step 1 — compute the left side. AB={2,3,4,5}A \cup B = \{2, 3, 4, 5\}, so (AB)=U{2,3,4,5}={1,6}(A \cup B)' = U - \{2, 3, 4, 5\} = \{1, 6\}.

Step 2 — compute the right side independently. A={1,4,5,6}A' = \{1, 4, 5, 6\} and B={1,2,6}B' = \{1, 2, 6\}. Their common elements: 1 and 6 → AB={1,6}A' \cap B' = \{1, 6\}.

Step 3 — compare. Both sides equal {1,6}\{1, 6\} ✓ — De Morgan's first law verified for this data.

Takeaway: the verification template is always: compute each side separately, then match. The same three steps verify the twin law (AB)=AB(A \cap B)' = A' \cup B'.


Example 12. Taking N\mathbb{N} as the universal set, write the complements of: (i) {x:x is an even natural number}\{x : x \text{ is an even natural number}\} (ii) {x:xN and 2x+1>10}\{x : x \in \mathbb{N} \text{ and } 2x + 1 > 10\} (iii) {x:x is a perfect square}\{x : x \text{ is a perfect square}\}.

Solution.

Step 1 — the method for infinite universes. Listing is impossible; instead NEGATE the defining condition.

(i) Step 2. Not even (within N\mathbb{N}) = odd: complement ={x:x is an odd natural number}= \{x : x \text{ is an odd natural number}\}.

(ii) Step 3. Solve the inequality first: 2x+1>10x>922x + 1 > 10 \Rightarrow x > \frac{9}{2}, so the set is {5, 6, 7, …}. Negate: x92x \leq \frac{9}{2} within N\mathbb{N} gives {1,2,3,4}\{1, 2, 3, 4\} — here the complement happens to be listable.

(iii) Step 4. Complement ={x:xN and x is not a perfect square}={2,3,5,6,7,8,10,}= \{x : x \in \mathbb{N} \text{ and } x \text{ is not a perfect square}\} = \{2, 3, 5, 6, 7, 8, 10, \ldots\}.

Takeaway: in an infinite universe, the complement is described by negating the condition — solve inequalities BEFORE negating to avoid sign slips.

Example 13. Using properties of sets, show that A(AB)=AA \cup (A \cap B) = A.

Solution.

Step 1 — plan a two-way containment. Set equality is proved by showing each side contains the other.

Step 2 — easy direction. AA(AB)A \subset A \cup (A \cap B): any set sits inside its union with anything.

Step 3 — other direction. The union has two parts: A itself, and ABA \cap B. But ABAA \cap B \subset A, so BOTH parts lie inside A, hence A(AB)AA \cup (A \cap B) \subset A.

Step 4 — conclude. Containment both ways gives A(AB)=AA \cup (A \cap B) = A. ∎ The twin identity A(AB)=AA \cap (A \cup B) = A is proved the same way.

Takeaway: these are the absorption laws — a set absorbs its union or intersection with anything built from it, and the proof is pure containment-chasing.


Example 14. Show that AB=ABA \cup B = A \cap B implies A = B.

Solution.

Step 1 — recall the squeeze. For any sets, ABAABA \cap B \subset A \subset A \cup B — every set sits between the intersection and the union.

Step 2 — show ABA \subset B. Take aAa \in A. Then aABa \in A \cup B. Using the hypothesis AB=ABA \cup B = A \cap B: aABa \in A \cap B, and in particular aBa \in B.

Step 3 — show BAB \subset A. Symmetric: bBbAB=ABbAb \in B \Rightarrow b \in A \cup B = A \cap B \Rightarrow b \in A.

Step 4 — conclude. Both containments hold, so A = B. ∎

Takeaway: when the two ends of the squeeze ABA,BABA \cap B \subset A, B \subset A \cup B coincide, everything trapped between them collapses to equality.


Example 15. Show that for any sets A and B: A=(AB)(AB)A = (A \cap B) \cup (A - B).

Solution.

Step 1 — show every element of A lands in the right side. Take xAx \in A. Exactly one of two cases holds: xBx \in B, putting xABx \in A \cap B; or xBx \notin B, putting xABx \in A - B. Either way xx belongs to the union: A(AB)(AB)A \subset (A \cap B) \cup (A - B).

Step 2 — show the right side stays inside A. ABAA \cap B \subset A ✓ and ABAA - B \subset A ✓, so their union is contained in A.

Step 3 — conclude. Equality holds: A splits as shared part \cup private part, and the two parts are disjoint. ∎

Takeaway: "shared plus private rebuilds the set" — this disjoint split is what powers the counting rule n(A)=n(AB)+n(AB)n(A) = n(A \cap B) + n(A - B) used heavily in the JEE Corner.