🧩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: {xP(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. {xx>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: {xZx>0}\{x \in \mathbb{Z} \mid x > 0\} means "all positive integers," which is more precise than just {xx>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 2A2 \in A is a true statement.

  • Fundamental to logical proofs. Proving xABx \in A \cap B requires showing xAx \in A AND xBx \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. xAx \in A' means exactly that xAx \notin A (and xUx \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

ABA \subseteq B means "every element of AA is also in BB." Formally: if xAx \in A, then xBx \in B.

  • Allows equality. A set is always a subset of itself: AAA \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 ABA \subseteq B, pick an arbitrary xAx \in A and show it must be in BB.

Proper Subset: \subset

ABA \subset B means ABA \subseteq B AND ABA \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 ABA \subset B.
  • If A={1,2}A = \{1, 2\} and B={1,2}B = \{1, 2\}, then ABA \subseteq B is true but ABA \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 ABA \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. AA' 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: AB={xxA OR xB}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: AB={xxA AND xB}A \cap B = \{x \mid x \in A \text{ AND } x \in B\}.

  • Can produce the empty set. When AB=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: AB={xxA AND xB}A \setminus B = \{x \mid x \in A \text{ AND } x \notin B\}.

  • Not commutative. ABBAA \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. AB=ABA \setminus B = A \cap B' when working within a universal set.

Complement: AA' or Aˉ\bar{A} or AcA^c

The complement is everything in the universal set that's outside AA: A={xUxA}A' = \{x \in U \mid x \notin A\}.

  • Double complement returns the original. (A)=A(A')' = A.
  • De Morgan's Laws apply:
    • (AB)=AB(A \cup B)' = A' \cap B'
    • (AB)=AB(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: AB=A+BAB|A \cup B| = |A| + |B| - |A \cap B|. You subtract the intersection because those elements got counted twice.
  • For three sets: ABC=A+B+CABACBC+ABC|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 1P({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)aA and bB}A \times B = \{(a, b) \mid a \in A \text{ and } b \in B\}.

  • Order matters and cardinality multiplies. A×B=AB|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:ABf: 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 {xP(x)}\{x \mid P(x)\}
Membership\in, \notin
Containment\subseteq, \subset
Boundary sets\emptyset, UU
Combining sets\cup, \cap
Removing elements\setminus, complement AA'
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 ABA \cup B, ABA \cap B, ABA \setminus B, and BAB \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 (AB)(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\}.

2,589 studying →