This lesson covers the core formulas for two-set problems, including inclusion-exclusion, finding neither, intersection from totals, Cartesian product sizes, and function composition. You will learn derivations, worked examples, and common traps to solve problems confidently.
Sets, relations, and functions form the language of modern mathematics. In competitive exams, questions often involve counting elements in unions, intersections, or Cartesian products, and evaluating composite functions. This lesson builds from the inclusion-exclusion principle to advanced applications like |(A×B) ∩ (B×A)| = |A∩B|². Each formula is derived, explained, and applied to fully worked examples. By the end, you will know when to use each formula, how to rearrange them, and how to avoid typical mistakes.
| Concept | Formula | When to Use |
|---|---|---|
| Union of two sets | n(A∪B) = n(A)+n(B)-n(A∩B) | Given sizes of A, B, and intersection |
| Neither in two sets | n(neither) = Total - n(A∪B) | Given total and union, or all individual counts |
| Intersection from total | n(A∩B) = n(A)+n(B)+n(neither)-Total | Given total, n(A), n(B), and n(neither) |
| Cartesian product size | |A×B| = |A|×|B| | Counting ordered pairs from two finite sets |
| Intersection of products | |(A×B)∩(B×A)| = |A∩B|² | Finding common ordered pairs between A×B and B×A |
The inclusion-exclusion principle corrects for double-counting when adding the sizes of two sets. If you simply add n(A) and n(B), elements in both sets are counted twice. Subtracting n(A∩B) once gives the correct number in the union. This formula is the foundation for all two-set word problems. It applies to any finite sets A and B within a universal set. The variables are counts (non-negative integers). The formula is symmetric in A and B, so order does not matter.
In a universal set U, the number of elements that belong to neither A nor B is the total number of elements minus the number in the union. This is because every element either belongs to A∪B or does not. The formula combines the total count with inclusion-exclusion. It is useful when the problem gives total population and asks for those outside both categories. The result must be non-negative and cannot exceed the total.
When the total, the sizes of A and B, and the number in neither are known, you can solve for the intersection. Starting from Total = n(A∪B) + n(neither) and substituting n(A∪B) = n(A)+n(B)-n(A∩B), rearrange to isolate n(A∩B). This form is handy for survey problems where the overlap is unknown. It is algebraically equivalent to the inclusion-exclusion principle. Always verify that the computed intersection does not exceed the smaller of n(A) and n(B).
The intersection A∩B contains exactly the elements that are in both A and B. It is a set, not a number, but its size n(A∩B) is often needed. The definition is straightforward: x ∈ A∩B if and only if x ∈ A and x ∈ B. This concept is used in all two-set counting formulas. When sets are given in roster form, list common elements. When given as conditions, solve the conditions simultaneously.
The Cartesian product A×B is the set of all ordered pairs (a,b) where a ∈ A and b ∈ B. For finite sets, the number of such pairs is the product of the sizes of A and B. This is because for each of the |A| choices of the first coordinate, there are |B| choices for the second. The formula is simple but powerful, and it extends to more than two sets. It is used in combinatorics and probability.
The intersection (A×B) ∩ (B×A) consists of ordered pairs (x,y) such that (x,y) ∈ A×B and (x,y) ∈ B×A. This requires x ∈ A and y ∈ B, and also x ∈ B and y ∈ A. Therefore, both x and y must belong to A∩B. So the intersection is exactly (A∩B) × (A∩B). Its cardinality is |A∩B|². This formula is useful in advanced set theory problems.
Given two functions f and g, the composite function f(g(x)) means apply g first, then apply f to the result. The domain of f(g(x)) consists of all x in the domain of g such that g(x) is in the domain of f. For polynomial functions, the domain is usually all real numbers. To evaluate, substitute the expression for g(x) into f. This is not the same as g(f(x)) in general; composition is not commutative.
The universal set U contains all elements under consideration. The complement of a set A, denoted A', is the set of elements in U that are not in A. For two sets, (A∪B)' is the set of elements in U that are in neither A nor B. This connects to the 'neither' count: n((A∪B)') = n(neither A nor B). When U is finite, n(A') = n(U) - n(A). This is used in problems like finding (A∪B)' from roster sets.
Let T = tea, C = coffee. n(T)=60, n(C)=50, n(T∩C)=30. Total=100.
First find n(T∪C) = 60+50-30 = 80. Then n(neither) = Total - n(T∪C) = 100 - 80 = 20.
Let C = cricket, F = football. n(C)=40, n(F)=30, n(neither)=10, Total=60.
Use n(C∩F) = n(C)+n(F)+n(neither)-Total = 40+30+10-60 = 20.
First find A∪B = {1,2,3,5,7,9}. Then (A∪B)' = U \ (A∪B) = {4,6,8,10}.
A∩B = {2,3}, so |A∩B| = 2. Then |(A×B) ∩ (B×A)| = |A∩B|² = 2² = 4.
n(C)=25, n(F)=20, n(C∩F)=10. n(C∪F)=25+20-10=35. n(neither)=40-35=5.
|A|=3, |B|=3. |A×B| = 3×3 = 9.
First compute g(2) = 2² = 4. Then f(g(2)) = f(4) = 2(4)+3 = 8+3 = 11.
n(M)=50, n(S)=40, n(M∩S)=30. n(M∪S)=50+40-30=60. Failed both = Total - n(M∪S) = 80-60=20.
It states that n(A∪B) = n(A) + n(B) - n(A∩B). This corrects for double-counting elements that are in both sets. It is used whenever you need the total number of elements in at least one of two sets.
Subtract the union from the total: n(neither) = Total - n(A∪B). If you don't know the union, first compute it using inclusion-exclusion. The result must be between 0 and the total.
Yes, use n(A∩B) = n(A) + n(B) + n(neither) - Total. This is derived by combining Total = n(A∪B) + n(neither) with the inclusion-exclusion formula. Always check that the intersection is not larger than the smaller set.
For finite sets, |A×B| = |A| × |B|. This is because each element of A can be paired with each element of B. The order matters, so A×B and B×A are different sets unless A=B.
It equals |A∩B|². The intersection consists of ordered pairs (x,y) where both x and y are in A∩B. So the number of such pairs is the square of the number of common elements.
First compute g(2)=2²=4. Then f(g(2))=f(4)=2(4)+3=11. Always evaluate the inner function first. Composition is not commutative, so f(g(x)) is generally not equal to g(f(x)).