๐ŸงฉDiscrete Mathematics

Essential Set Theory Notations

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 theory is the language underlying virtually every topic in discrete mathematics, from logic and proof techniques to functions, relations, and combinatorics. When you're working with probability, database queries, or algorithm analysis later in the course, you'll be using these notations constantly. The symbols here aren't abstract squiggles; they're precise tools for describing membership, containment, and combination of mathematical objects.

You're being tested on more than symbol recognition. Exam questions will ask you to translate between set-builder notation and roster form, determine subset relationships, compute cardinalities of combined sets, and apply operations in sequence. Don't just memorize what each symbol looks like. Know what logical relationship it expresses and how it connects to other operations. That's what separates a correct answer from a complete one.


Describing Sets and Their Elements

Before you can operate on sets, you need to describe them precisely. These notations establish what a set contains and how we specify membership.

Set Notation: {}\{ \}

Curly braces are the most fundamental notation in set theory. They enclose all the elements that belong together into a single object.

  • Order is irrelevant and duplicates collapse. {1,2,3}\{1, 2, 3\} and {3,1,2}\{3, 1, 2\} are the same set, and {1,1,2}\{1, 1, 2\} is just {1,2}\{1, 2\}.
  • Roster form lists elements explicitly, which works well when sets are small and finite: {a,b,c}\{a, b, c\}.
  • Ellipsis notation handles larger patterns: {1,2,3,โ€ฆ,100}\{1, 2, 3, \ldots, 100\} lists the integers from 1 to 100 without writing all of them.

Set-Builder Notation: {xโˆฃP(x)}\{x \mid P(x)\}

This defines sets by a property rather than listing every element. Read it as "the set of all xx such that P(x)P(x) is true."

  • Essential for infinite or large sets. {xโˆฃx>0}\{x \mid x > 0\} describes all positive numbers concisely, which roster form can't do.
  • The vertical bar โˆฃ\mid (or sometimes a colon ::) separates the variable from its defining condition.
  • You'll often see a domain restriction on the left side: {xโˆˆZโˆฃx>0}\{x \in \mathbb{Z} \mid x > 0\} means "all positive integers," which is more precise than just {xโˆฃx>0}\{x \mid x > 0\}.

Element Of: โˆˆ\in

This symbol asserts that a specific object belongs to a set. If A={1,2,3}A = \{1, 2, 3\}, then 2โˆˆA2 \in A is a true statement.

  • Fundamental to logical proofs. Proving xโˆˆAโˆฉBx \in A \cap B requires showing xโˆˆAx \in A AND xโˆˆBx \in B.
  • Distinguishes elements from sets. 2โˆˆ{1,2,3}2 \in \{1, 2, 3\} is true, but {2}โˆˆฬธ{1,2,3}\{2\} \not\in \{1, 2, 3\} because the singleton set {2}\{2\} is not the same object as the number 22. (However, {2}โˆˆ{{2},3}\{2\} \in \{\{2\}, 3\} would be true, since {2}\{2\} is listed as an element.)

Not an Element Of: โˆ‰\notin

This negates membership. 4โˆ‰{1,2,3}4 \notin \{1, 2, 3\} states that 4 is absent from the set.

  • Critical for complement definitions. xโˆˆAโ€ฒx \in A' means exactly that xโˆ‰Ax \notin A (and xโˆˆUx \in U).
  • Appears in counterexample proofs. Showing one element โˆ‰\notin a set can disprove a universal claim like "all even numbers are in AA."

Compare: โˆˆ\in vs. โІ\subseteq. Both describe relationships, but โˆˆ\in connects an element to a set, while โІ\subseteq connects a set to another set. Confusing these is a common exam error. For instance, 1โˆˆ{1,2}1 \in \{1, 2\} is correct, but 1โІ{1,2}1 \subseteq \{1, 2\} is not, because 11 isn't a set.


Containment and Subset Relationships

These notations describe when one set lives entirely inside another, a relationship that's central to proofs and logical arguments.

Subset: โІ\subseteq

AโІBA \subseteq B means "every element of AA is also in BB." Formally: if xโˆˆAx \in A, then xโˆˆBx \in B.

  • Allows equality. A set is always a subset of itself: AโІAA \subseteq A is always true.
  • The empty set is a subset of everything. โˆ…โІA\emptyset \subseteq A for any set AA. This is vacuously true: there's no element in โˆ…\emptyset that could fail to be in AA.
  • To prove AโІBA \subseteq B, pick an arbitrary xโˆˆAx \in A and show it must be in BB.

Proper Subset: โŠ‚\subset

AโŠ‚BA \subset B means AโІBA \subseteq B AND Aโ‰ BA \neq B. In other words, BB contains everything AA does, plus at least one extra element.

  • If A={1,2}A = \{1, 2\} and B={1,2,3}B = \{1, 2, 3\}, then AโŠ‚BA \subset B.
  • If A={1,2}A = \{1, 2\} and B={1,2}B = \{1, 2\}, then AโІBA \subseteq B is true but AโŠ‚BA \subset B is false.
  • Watch notation variations. Some textbooks use โŠŠ\subsetneq for proper subset and reserve โŠ‚\subset to mean the same as โІ\subseteq. Know your course's convention.

Compare: โІ\subseteq vs. โŠ‚\subset. The difference is whether equality is permitted. If a problem asks you to prove AโŠ‚BA \subset B, you must show containment AND find an element in BB that's not in AA.


Special Sets: The Boundaries

These sets represent the extremes and serve as reference points for other operations.

Empty Set: โˆ…\emptyset or {}\{ \}

The empty set contains no elements. It's the unique set with cardinality zero.

  • Subset of every set. This is vacuously true since there's no element in โˆ…\emptyset that could fail to be in another set.
  • Identity for union, annihilator for intersection. Aโˆชโˆ…=AA \cup \emptyset = A and Aโˆฉโˆ…=โˆ…A \cap \emptyset = \emptyset.
  • Common mistake: Don't write {โˆ…}\{\emptyset\} when you mean โˆ…\emptyset. The set {โˆ…}\{\emptyset\} actually contains one element (the empty set itself), so its cardinality is 1, not 0.

Universal Set: UU

The universal set contains all elements under consideration. It defines the "universe of discourse" for a problem.

  • Context-dependent. In number theory, UU might be Z\mathbb{Z}. In a survey problem, it might be all respondents.
  • Required for complements. Aโ€ฒA' only makes sense relative to some universal set UU, because you need to know what "everything outside AA" means.

Compare: โˆ…\emptyset vs. UU. These are logical opposites. The empty set is contained in everything; the universal set contains everything. Complements swap between them: โˆ…โ€ฒ=U\emptyset' = U and Uโ€ฒ=โˆ…U' = \emptyset.


Set Operations: Combining and Separating

These operations take existing sets and produce new ones. They form the algebraic heart of set theory.

Union: โˆช\cup

Union combines all elements from both sets: AโˆชB={xโˆฃxโˆˆAย ORย xโˆˆB}A \cup B = \{x \mid x \in A \text{ OR } x \in B\}.

  • Duplicates appear once. {1,2}โˆช{2,3}={1,2,3}\{1, 2\} \cup \{2, 3\} = \{1, 2, 3\}, not {1,2,2,3}\{1, 2, 2, 3\}.
  • Corresponds to logical OR. This connection is essential when translating between set theory and propositional logic.
  • The result is always at least as large as the larger input set.

Intersection: โˆฉ\cap

Intersection keeps only shared elements: AโˆฉB={xโˆฃxโˆˆAย ANDย xโˆˆB}A \cap B = \{x \mid x \in A \text{ AND } x \in B\}.

  • Can produce the empty set. When AโˆฉB=โˆ…A \cap B = \emptyset, we call AA and BB disjoint.
  • Corresponds to logical AND. Intersection is more restrictive than union.
  • The result is always at most as large as the smaller input set.

Set Difference: โˆ–\setminus or โˆ’-

Set difference gives you elements in AA but not in BB: Aโˆ–B={xโˆฃxโˆˆAย ANDย xโˆ‰B}A \setminus B = \{x \mid x \in A \text{ AND } x \notin B\}.

  • Not commutative. Aโˆ–Bโ‰ Bโˆ–AA \setminus B \neq B \setminus A in general. For example, {1,2,3}โˆ–{2,3,4}={1}\{1,2,3\} \setminus \{2,3,4\} = \{1\}, but {2,3,4}โˆ–{1,2,3}={4}\{2,3,4\} \setminus \{1,2,3\} = \{4\}.
  • Relates to complement. Aโˆ–B=AโˆฉBโ€ฒA \setminus B = A \cap B' when working within a universal set.

Complement: Aโ€ฒA' or Aห‰\bar{A} or AcA^c

The complement is everything in the universal set that's outside AA: Aโ€ฒ={xโˆˆUโˆฃxโˆ‰A}A' = \{x \in U \mid x \notin A\}.

  • Double complement returns the original. (Aโ€ฒ)โ€ฒ=A(A')' = A.
  • De Morgan's Laws apply:
    • (AโˆชB)โ€ฒ=Aโ€ฒโˆฉBโ€ฒ(A \cup B)' = A' \cap B'
    • (AโˆฉB)โ€ฒ=Aโ€ฒโˆชBโ€ฒ(A \cap B)' = A' \cup B'

These laws are worth memorizing. The pattern: when you "push" the complement through, union and intersection swap.

Compare: โˆช\cup vs. โˆฉ\cap. Union grows sets; intersection shrinks them. Exam problems often test whether you can apply De Morgan's Laws to switch between them correctly.


Counting and Constructing New Sets

These notations let you measure sets and build more complex structures from simpler ones.

Cardinality: โˆฃAโˆฃ|A|

Cardinality counts the number of elements in a set. If A={a,b,c}A = \{a, b, c\}, then โˆฃAโˆฃ=3|A| = 3.

  • Inclusion-exclusion principle for unions: โˆฃAโˆชBโˆฃ=โˆฃAโˆฃ+โˆฃBโˆฃโˆ’โˆฃAโˆฉBโˆฃ|A \cup B| = |A| + |B| - |A \cap B|. You subtract the intersection because those elements got counted twice.
  • For three sets: โˆฃAโˆชBโˆชCโˆฃ=โˆฃAโˆฃ+โˆฃBโˆฃ+โˆฃCโˆฃโˆ’โˆฃAโˆฉBโˆฃโˆ’โˆฃAโˆฉCโˆฃโˆ’โˆฃBโˆฉCโˆฃ+โˆฃAโˆฉBโˆฉCโˆฃ|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C|.
  • Infinite sets have cardinality too, but for this course, focus on finite sets.

Power Set: P(A)\mathcal{P}(A) or 2A2^A

The power set is the set of all subsets of AA, including โˆ…\emptyset and AA itself.

  • Cardinality is 2n2^n. If โˆฃAโˆฃ=n|A| = n, then โˆฃP(A)โˆฃ=2n|\mathcal{P}(A)| = 2^n. Each element is either in or out of a given subset, giving 2 choices per element.
  • Example: P({1,2})={โˆ…,{1},{2},{1,2}}\mathcal{P}(\{1, 2\}) = \{\emptyset, \{1\}, \{2\}, \{1, 2\}\}. That's 22=42^2 = 4 subsets from two elements.
  • Note the types: Elements of P(A)\mathcal{P}(A) are sets, not individual elements. So {1}โˆˆP({1,2})\{1\} \in \mathcal{P}(\{1, 2\}) is true, but 1โˆˆP({1,2})1 \in \mathcal{P}(\{1, 2\}) is false.

Cartesian Product: ร—\times

The Cartesian product gives all ordered pairs from two sets: Aร—B={(a,b)โˆฃaโˆˆAย andย bโˆˆB}A \times B = \{(a, b) \mid a \in A \text{ and } b \in B\}.

  • Order matters and cardinality multiplies. โˆฃAร—Bโˆฃ=โˆฃAโˆฃโ‹…โˆฃBโˆฃ|A \times B| = |A| \cdot |B|. The pair (1,2)(1, 2) is different from (2,1)(2, 1).
  • Foundation for relations and functions. Any relation RR from AA to BB is a subset of Aร—BA \times B, and any function f:Aโ†’Bf: A \to B is a special kind of relation.
  • Example: If A={1,2}A = \{1, 2\} and B={x,y}B = \{x, y\}, then Aร—B={(1,x),(1,y),(2,x),(2,y)}A \times B = \{(1,x), (1,y), (2,x), (2,y)\}.

Compare: P(A)\mathcal{P}(A) vs. Aร—AA \times A. Both create new sets from AA, but power sets contain subsets while Cartesian products contain ordered pairs. If โˆฃAโˆฃ=2|A| = 2, then โˆฃP(A)โˆฃ=4|\mathcal{P}(A)| = 4 and โˆฃAร—Aโˆฃ=4|A \times A| = 4. Same size, completely different structures.


Quick Reference Table

ConceptNotation
Defining sets{}\{ \}, set-builder notation {xโˆฃP(x)}\{x \mid P(x)\}
Membershipโˆˆ\in, โˆ‰\notin
ContainmentโІ\subseteq, โŠ‚\subset
Boundary setsโˆ…\emptyset, UU
Combining setsโˆช\cup, โˆฉ\cap
Removing elementsโˆ–\setminus, complement Aโ€ฒA'
Measuring sets$$
Building structuresP(A)\mathcal{P}(A), Aร—BA \times B

Self-Check Questions

  1. What's the difference between โˆˆ\in and โІ\subseteq? Give an example where {1}โІA\{1\} \subseteq A is true but {1}โˆˆA\{1\} \in A is false.

  2. If A={1,2,3}A = \{1, 2, 3\} and B={2,3,4}B = \{2, 3, 4\}, compute AโˆชBA \cup B, AโˆฉBA \cap B, Aโˆ–BA \setminus B, and Bโˆ–AB \setminus A. Which two results are equal?

  3. Explain why โˆ…โІA\emptyset \subseteq A is true for every set AA, using the definition of subset.

  4. Compare P(A)\mathcal{P}(A) and Aร—AA \times A when A={a,b}A = \{a, b\}. List all elements of each and explain why they have the same cardinality but different types of elements.

  5. Using De Morgan's Laws, rewrite (AโˆชB)โ€ฒ(A \cup B)' in terms of complements and intersection. Then verify with U={1,2,3,4}U = \{1, 2, 3, 4\}, A={1,2}A = \{1, 2\}, B={2,3}B = \{2, 3\}.