∑ MockTestKart
⌂

0 0 0
Complete Formula Lesson

Set Theory: Formulas, Logic, and Problem Solving

This lesson covers the essential formulas of set theory, including cardinality relations, De Morgan's laws, and inclusion-exclusion. You will learn derivations, worked examples, and common traps to solve problems confidently.

On this page
  1. Basic Definitions and Notation
  2. Set Operations and Their Properties
  3. Cardinality Formulas for Two Sets
  4. Cardinality Formulas for Three Sets
  5. De Morgan's Laws and Complement Rules
  6. Subset Counting and Power Set
  7. Cartesian Product and Relations
  8. Venn Diagrams and Region Counting
  9. Worked examples
  10. Common mistakes
  11. Frequently asked questions

Set theory is the language of mathematics. It describes collections of objects and their relationships. Mastering its formulas helps in probability, logic, and data analysis. This lesson builds from basic definitions to advanced counting, with clear derivations and worked examples.

Key Set Theory Formulas
Union of two sets|A ∪ B| = |A| + |B| - |A ∩ B|
Union of three sets|A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |A ∩ C| - |B ∩ C| + |A ∩ B ∩ C|
De Morgan's Law(A ∪ B)' = A' ∩ B'
Power set|P(A)| = 2^{|A|}
Cartesian product|A × B| = |A| × |B|
ConceptFormulaWhen to Use
Two-set union|A ∪ B| = |A| + |B| - |A ∩ B|When two sets overlap and you need total count.
Three-set union|A ∪ B ∪ C| = sum singles - sum pairs + tripleWhen three sets overlap and you need total count.
Exactly one set|A| + |B| + |C| - 2(sum pairs) + 3(triple)When you need elements in exactly one of three sets.
Neither|U| - |A ∪ B|When you need elements outside the union.
Subsets2^nWhen counting all possible subsets of a set.
1Identify the sets and their cardinalities.
2Determine if sets are disjoint or overlapping.
3Choose the correct formula (two-set, three-set, or Venn diagram).
4Substitute values and solve for the unknown.
5Check that the result is non-negative and ≤ |U|.
6Verify using an alternate method if possible.
ad = a√2
Venn diagram for two sets: rectangle represents U, two overlapping circles represent A and B. Four regions: only A, only B, both, neither.

Basic Definitions and Notation

A set is a well-defined collection of distinct objects, called elements. We write a ∈ A if a is an element of A, and a ∉ A otherwise. The universal set U contains all elements under consideration. The empty set ∅ has no elements. A set can be described by roster form (listing elements) or set-builder form (rule). The cardinality |A| is the number of elements in A. Two sets are equal if they have exactly the same elements. Subset: A ⊆ B if every element of A is in B. Proper subset: A ⊂ B if A ⊆ B and A ≠ B. The power set P(A) is the set of all subsets of A; if |A| = n, then |P(A)| = 2^n.

  • Distinct elements: repetition is ignored.
  • Order does not matter: {1,2} = {2,1}.
  • ∅ is a subset of every set.
  • The power set formula 2^n counts all subsets, including ∅ and A itself.
|P(A)| = 2^{|A|}

Set Operations and Their Properties

Union (A ∪ B) contains elements in A or B or both. Intersection (A ∩ B) contains elements in both A and B. Difference (A \ B) contains elements in A but not in B. Complement (A') contains elements in U but not in A. These operations satisfy commutative, associative, and distributive laws. Key identities: A ∪ A = A, A ∩ A = A, A ∪ ∅ = A, A ∩ ∅ = ∅, A ∪ U = U, A ∩ U = A. Also, A \ B = A ∩ B'. The symmetric difference A Δ B = (A \ B) ∪ (B \ A) = (A ∪ B) \ (A ∩ B).

  • Union is like addition but removes duplicates.
  • Intersection is like multiplication of conditions.
  • Complement depends on the universal set.
  • Symmetric difference gives elements in exactly one set.
A \ B = A ∩ B'

Cardinality Formulas for Two Sets

For two finite sets A and B, the number of elements in their union is |A ∪ B| = |A| + |B| - |A ∩ B|. This avoids double-counting the overlap. Rearranged: |A ∩ B| = |A| + |B| - |A ∪ B|. Also, |A \ B| = |A| - |A ∩ B|, and |A Δ B| = |A| + |B| - 2|A ∩ B|. If A and B are disjoint, |A ∪ B| = |A| + |B|. The formula extends to complements: |A' ∩ B'| = |U| - |A ∪ B|.

  • Always subtract the intersection once.
  • If sets are disjoint, intersection is zero.
  • Use |U| when complements are involved.
  • Check that no element is counted twice.
|A ∪ B| = |A| + |B| - |A ∩ B|

Cardinality Formulas for Three Sets

For three sets A, B, C: |A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |A ∩ C| - |B ∩ C| + |A ∩ B ∩ C|. The pattern: add singles, subtract pairwise intersections, add triple intersection. This is inclusion-exclusion. Rearranged forms help find missing values. For example, |A ∩ B ∩ C| = |A ∪ B ∪ C| - |A| - |B| - |C| + |A ∩ B| + |A ∩ C| + |B ∩ C|. Also, the number of elements in exactly one set is |A| + |B| + |C| - 2(|A ∩ B| + |A ∩ C| + |B ∩ C|) + 3|A ∩ B ∩ C|.

  • Add all single sets.
  • Subtract all pairwise intersections.
  • Add back the triple intersection.
  • For exactly one set, use the derived formula.
|A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |A ∩ C| - |B ∩ C| + |A ∩ B ∩ C|

De Morgan's Laws and Complement Rules

De Morgan's laws connect unions, intersections, and complements: (A ∪ B)' = A' ∩ B' and (A ∩ B)' = A' ∪ B'. For three sets: (A ∪ B ∪ C)' = A' ∩ B' ∩ C' and (A ∩ B ∩ C)' = A' ∪ B' ∪ C'. These laws are used to simplify expressions and solve counting problems involving 'neither' or 'not both'. Also, (A')' = A, A ∪ A' = U, A ∩ A' = ∅. The complement of a difference: (A \ B)' = A' ∪ B.

  • Complement of union becomes intersection of complements.
  • Complement of intersection becomes union of complements.
  • Useful for 'neither A nor B' problems.
  • Double complement returns the original set.
(A ∪ B)' = A' ∩ B'

Subset Counting and Power Set

If |A| = n, then the number of subsets of A is 2^n. The number of proper subsets is 2^n - 1. The number of non-empty subsets is 2^n - 1. The number of subsets of size k is C(n, k) = n! / (k!(n-k)!). The total number of subsets is the sum of C(n, k) for k = 0 to n, which equals 2^n. For two sets A and B with |A| = m and |B| = n, the number of functions from A to B is n^m. The number of relations from A to B is 2^{mn}.

  • Power set includes the empty set and the set itself.
  • Proper subsets exclude the set itself.
  • Binomial coefficients count subsets of a given size.
  • Function count uses exponentiation.
Number of subsets = 2^n

Cartesian Product and Relations

The Cartesian product A × B is the set of all ordered pairs (a, b) with a ∈ A and b ∈ B. If |A| = m and |B| = n, then |A × B| = m × n. A relation from A to B is any subset of A × B. The number of relations is 2^{mn}. A function from A to B is a special relation where each element of A maps to exactly one element of B. The number of functions is n^m. The number of one-to-one functions (if m ≤ n) is P(n, m) = n! / (n-m)!.

  • Order matters in ordered pairs.
  • A × B ≠ B × A unless A = B.
  • Relations can be represented as matrices or digraphs.
  • Functions are a subset of relations.
|A × B| = |A| × |B|

Venn Diagrams and Region Counting

Venn diagrams visually represent sets as circles inside a rectangle (universal set). For two sets, there are four regions: only A, only B, both A and B, neither. For three sets, there are eight regions. To solve word problems, assign variables to each region and use given cardinalities to form equations. Start with the innermost intersection (triple), then work outward. The sum of all regions equals |U|. This method avoids formula confusion and is especially useful for 'exactly one', 'at least one', and 'neither' questions.

  • Label all regions clearly.
  • Start with the triple intersection.
  • Use subtraction to find exclusive regions.
  • Check that total equals |U|.
Sum of all regions = |U|

Worked examples

In a class of 40 students, 25 play football, 20 play cricket, and 10 play both. How many play at least one game? How many play neither?
Show solution

Let F = football, C = cricket. |F| = 25, |C| = 20, |F ∩ C| = 10.

Use |F ∪ C| = |F| + |C| - |F ∩ C| = 25 + 20 - 10 = 35. Neither = |U| - |F ∪ C| = 40 - 35 = 5.

At least one game: 35 students. Neither: 5 students.
If |A| = 12, |B| = 15, and |A ∪ B| = 20, find |A ∩ B| and |A \ B|.
Show solution

|A ∩ B| = |A| + |B| - |A ∪ B| = 12 + 15 - 20 = 7. |A \ B| = |A| - |A ∩ B| = 12 - 7 = 5.

|A ∩ B| = 7, |A \ B| = 5.
In a survey of 100 people, 60 read newspaper A, 50 read B, 40 read C, 30 read A and B, 20 read A and C, 25 read B and C, and 10 read all three. How many read at least one newspaper? How many read none?
Show solution

Use inclusion-exclusion: |A ∪ B ∪ C| = 60 + 50 + 40 - 30 - 20 - 25 + 10 = 85. None = 100 - 85 = 15.

At least one: 85. None: 15.
Let A = {1,2,3,4}. How many subsets does A have? How many proper subsets? How many subsets of size 2?
Show solution

|A| = 4. Subsets = 2^4 = 16. Proper subsets = 16 - 1 = 15. Subsets of size 2 = C(4,2) = 6.

16 subsets, 15 proper subsets, 6 subsets of size 2.
If |A| = 3 and |B| = 4, find |A × B|, the number of relations from A to B, and the number of functions from A to B.
Show solution

|A × B| = 3 × 4 = 12. Number of relations = 2^{12} = 4096. Number of functions = 4^3 = 64.

|A × B| = 12, relations = 4096, functions = 64.
In a group of 50 people, 30 like tea, 25 like coffee, and 10 like neither. How many like both tea and coffee?
Show solution

Let T = tea, C = coffee. |T ∪ C| = 50 - 10 = 40. |T ∩ C| = |T| + |C| - |T ∪ C| = 30 + 25 - 40 = 15.

15 people like both tea and coffee.

Common mistakes

  • Forgetting to subtract the intersection in |A ∪ B|, leading to double-counting.
  • Using |A ∪ B| = |A| + |B| when sets are not disjoint.
  • Confusing proper subsets with all subsets (forgetting to subtract 1).
  • In three-set problems, forgetting to add back the triple intersection.
  • Assuming A × B = B × A; ordered pairs are not commutative.
  • Misapplying De Morgan's laws by not switching union and intersection.
  • In Venn diagrams, placing numbers in the wrong regions without checking totals.
  • Using n^m for one-to-one functions instead of permutations.

Frequently asked questions

What is the difference between a subset and a proper subset?

A subset includes the set itself, while a proper subset excludes the set itself. If |A| = n, there are 2^n subsets and 2^n - 1 proper subsets.

When can I use |A ∪ B| = |A| + |B|?

Only when A and B are disjoint, meaning A ∩ B = ∅. Otherwise, you must subtract |A ∩ B| to avoid double-counting.

How do I find the number of elements in exactly one of three sets?

Use the formula: |A| + |B| + |C| - 2(|A ∩ B| + |A ∩ C| + |B ∩ C|) + 3|A ∩ B ∩ C|. This counts elements that belong to only one set.

What is the Cartesian product used for?

It forms all ordered pairs between two sets. It is used in coordinate geometry, relations, and functions. The cardinality is |A| × |B|.

How many functions are there from a set A to a set B?

If |A| = m and |B| = n, the number of functions is n^m. Each of the m elements in A has n choices in B.

What is De Morgan's law for three sets?

For three sets, (A ∪ B ∪ C)' = A' ∩ B' ∩ C' and (A ∩ B ∩ C)' = A' ∪ B' ∪ C'. It generalizes to any number of sets.