upgrade
upgrade

Intro to the Theory of Sets

Basic Set Operations

Study smarter with Fiveable

Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.

Get Started

Why This Matters

Set operations are the verbs of set theory—they describe how sets combine, overlap, and relate to one another. When you're working through proofs or solving problems in discrete mathematics, probability, or even computer science, you'll constantly rely on these operations to manipulate and analyze collections of objects. Understanding union, intersection, complement, difference, and their properties isn't just about memorizing symbols; it's about grasping how mathematical structures interact.

You're being tested on your ability to apply these operations correctly, recognize their algebraic properties (like commutativity and associativity), and use fundamental laws like De Morgan's to simplify complex expressions. Don't just memorize that ABA \cup B means "everything in A or B"—know why union is commutative, how complement relates to difference, and when to apply De Morgan's Laws to break apart a complicated set expression.


Combining Sets: Union and Intersection

These two operations form the backbone of set manipulation. Union gathers elements together; intersection finds common ground. Both share key algebraic properties that make them predictable and powerful.

Union

  • Notation: ABA \cup B—includes all elements that are in AA, in BB, or in both sets
  • No duplication occurs; each element appears exactly once in the resulting set, regardless of how many times it appears across the original sets
  • Commutative and associativeAB=BAA \cup B = B \cup A and (AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C), allowing flexible regrouping in proofs

Intersection

  • Notation: ABA \cap B—contains only elements that belong to both AA and BB simultaneously
  • Identifies overlap between sets, which is essential for determining shared characteristics or common membership
  • Commutative and associativeAB=BAA \cap B = B \cap A and (AB)C=A(BC)(A \cap B) \cap C = A \cap (B \cap C), mirroring union's algebraic behavior

Compare: Union vs. Intersection—both are commutative and associative, but union expands (gathers all elements) while intersection contracts (keeps only shared elements). If a problem asks you to maximize coverage, think union; if it asks for commonality, think intersection.


Removing Elements: Complement and Difference

These operations focus on what's not included. Complement removes everything in a set from the universal set; difference removes one set's elements from another. Understanding their relationship is key to simplifying expressions.

Complement

  • Notation: AA' or AcA^c—includes all elements in the universal set UU that are not in AA
  • Depends on context; the complement only makes sense relative to a defined universal set, so always identify UU first
  • Equivalent to UAU - A—this connection to set difference helps when rewriting expressions or applying De Morgan's Laws

Difference

  • Notation: ABA - B (or ABA \setminus B)—contains elements that are in AA but not in BB
  • Highlights uniqueness; isolates what belongs exclusively to the first set
  • Not commutativeABBAA - B \neq B - A in general, so order matters when computing differences

Symmetric Difference

  • Notation: ABA \triangle B—includes elements in either AA or BB, but not in both
  • Equivalent to (AB)(BA)(A - B) \cup (B - A)—think of it as "union minus the overlap"
  • Commutative and associative—unlike regular difference, symmetric difference behaves predictably under reordering

Compare: Difference vs. Symmetric Difference—regular difference (ABA - B) is one-sided and non-commutative, while symmetric difference (ABA \triangle B) captures elements unique to either set and is commutative. Use symmetric difference when you need to identify elements that belong to exactly one of two sets.


Set Relationships: Subsets and Disjoint Sets

Before performing operations, you often need to understand how sets relate structurally. Subset relationships establish hierarchy; disjoint sets have no overlap at all.

Subset and Superset

  • Notation: ABA \subseteq B—every element of AA is also an element of BB, making AA a subset
  • Superset is the inverseBAB \supseteq A means BB contains all elements of AA (and possibly more)
  • Proper subsets use ABA \subset B—this indicates ABA \subseteq B and ABA \neq B, meaning BB has at least one element not in AA

Disjoint Sets

  • Definition: AB=A \cap B = \emptyset—two sets are disjoint when they share no elements whatsoever
  • Critical in probability—disjoint sets represent mutually exclusive events, where P(AB)=P(A)+P(B)P(A \cup B) = P(A) + P(B)
  • Pairwise vs. mutually disjoint—a collection of sets is mutually disjoint if every pair of sets in the collection is disjoint

Compare: Subset vs. Disjoint—if ABA \subseteq B, then AA and BB share all of AA's elements (maximum overlap for AA). If AA and BB are disjoint, they share nothing (zero overlap). These represent opposite extremes of set relationships.


Building New Structures: Power Sets and Cartesian Products

Some operations don't combine sets element-by-element but instead construct entirely new collections. Power sets enumerate all possible subsets; Cartesian products generate ordered pairs.

Power Set

  • Notation: P(A)\mathcal{P}(A) or 2A2^A—the set of all possible subsets of AA, including \emptyset and AA itself
  • Cardinality formula: P(A)=2n|\mathcal{P}(A)| = 2^n—if AA has nn elements, its power set has 2n2^n elements
  • Fundamental for counting arguments—power sets appear in combinatorics, topology, and anywhere you need to consider "all possible selections"

Cartesian Product

  • Notation: A×BA \times B—the set of all ordered pairs (a,b)(a, b) where aAa \in A and bBb \in B
  • Order matters in pairs(a,b)(b,a)(a, b) \neq (b, a) unless a=ba = b, so the Cartesian product is not commutative
  • Cardinality formula: A×B=AB|A \times B| = |A| \cdot |B|—essential for counting problems involving combinations from two sets

Compare: Power Set vs. Cartesian Product—power sets work on a single set and produce subsets, while Cartesian products combine two sets into ordered pairs. If A=3|A| = 3, then P(A)=8|\mathcal{P}(A)| = 8, but A×A=9|A \times A| = 9. Different operations, different growth patterns.


Fundamental Laws: De Morgan's Rules

These laws connect union, intersection, and complement in a way that's essential for simplifying complex set expressions. De Morgan's Laws let you "distribute" a complement across an operation by swapping union and intersection.

De Morgan's Laws

  • First law: (AB)=AB(A \cup B)' = A' \cap B'—the complement of a union equals the intersection of the complements
  • **Second law: (AB)=AB(A \cap B)' = A' \cup B'—the complement of an intersection equals the union of the complements
  • Proof strategy essential—when you need to prove two sets are equal, De Morgan's Laws often provide the key transformation

Compare: The Two De Morgan's Laws—both "flip" the operation (union becomes intersection, intersection becomes union) when you move the complement inside. Remember: complement reverses the operation. This pattern also appears in logic with AND/OR and negation.


Quick Reference Table

ConceptBest Examples
Combining elementsUnion (\cup), Intersection (\cap)
Removing elementsComplement (AA'), Difference (ABA - B), Symmetric Difference (\triangle)
Commutative operationsUnion, Intersection, Symmetric Difference
Non-commutative operationsDifference (ABA - B), Cartesian Product (A×BA \times B)
Set relationshipsSubset (\subseteq), Superset (\supseteq), Disjoint (AB=A \cap B = \emptyset)
Structure-building operationsPower Set (P(A)\mathcal{P}(A)), Cartesian Product (A×BA \times B)
Key simplification lawsDe Morgan's Laws
Cardinality formulasPower Set (2n2^n), Cartesian Product ($$

Self-Check Questions

  1. Which two operations are both commutative and associative, yet produce opposite effects on set size—one expanding and one contracting?

  2. If A={1,2,3}A = \{1, 2, 3\} and B={2,3,4}B = \{2, 3, 4\}, compute ABA - B, BAB - A, and ABA \triangle B. What does this reveal about commutativity?

  3. Using De Morgan's Laws, rewrite (ABC)(A \cup B \cup C)' as an expression involving only intersections and complements.

  4. Compare and contrast: How does the power set of a set with 4 elements differ in size from the Cartesian product of that set with itself? What does each operation represent conceptually?

  5. If two sets AA and BB satisfy both ABA \subseteq B and AB=A \cap B = \emptyset, what can you conclude about AA? Justify your answer using definitions.