Mathwords logoMathwords

Sets and Set Notation — Definition, Formula & Examples

A set is a well-defined collection of distinct objects, called elements. Set notation is the system of symbols and conventions used to describe sets, their elements, and the relationships between them.

A set SS is an unordered collection of distinct elements. A set may be specified by roster notation, which explicitly lists its elements within braces (e.g., {1,2,3}\{1, 2, 3\}), or by set-builder notation, which defines elements by a property they satisfy (e.g., {xxZ,  x>0}\{x \mid x \in \mathbb{Z},\; x > 0\}). Two sets AA and BB are equal if and only if they contain exactly the same elements.

Key Formula

A={xP(x)}A = \{x \mid P(x)\}
Where:
  • AA = The set being defined
  • xx = A variable representing a potential element
  • P(x)P(x) = A condition (predicate) that each element must satisfy

How It Works

You describe a set in one of two main ways. Roster notation lists every element inside curly braces: A={2,4,6,8}A = \{2, 4, 6, 8\}. Set-builder notation states a rule: A={xx is an even integer and 1<x<9}A = \{x \mid x \text{ is an even integer and } 1 < x < 9\}. Key symbols include \in ("is an element of"), \notin ("is not an element of"), \subseteq ("is a subset of"), \cup (union), \cap (intersection), and \emptyset (the empty set). Because sets are unordered and contain no duplicates, {3,1,2}={1,2,3}\{3, 1, 2\} = \{1, 2, 3\} and {1,1,2}={1,2}\{1, 1, 2\} = \{1, 2\}.

Worked Example

Problem: Let U={1,2,3,4,5,6,7,8,9,10}U = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}, A={2,4,6,8}A = \{2, 4, 6, 8\}, and B={1,2,3,4,5}B = \{1, 2, 3, 4, 5\}. Find ABA \cap B, ABA \cup B, and determine whether 5A5 \in A.
Step 1: Find the intersection: The intersection ABA \cap B contains elements that are in both AA and BB.
AB={2,4}A \cap B = \{2, 4\}
Step 2: Find the union: The union ABA \cup B contains all elements that are in AA or BB (or both), with no duplicates.
AB={1,2,3,4,5,6,8}A \cup B = \{1, 2, 3, 4, 5, 6, 8\}
Step 3: Test membership: Check whether 5 appears in A={2,4,6,8}A = \{2, 4, 6, 8\}. It does not.
5A5 \notin A
Answer: AB={2,4}A \cap B = \{2, 4\}, AB={1,2,3,4,5,6,8}A \cup B = \{1, 2, 3, 4, 5, 6, 8\}, and 5A5 \notin A.

Another Example

Problem: Write the set of all positive multiples of 3 that are less than 20 in both roster notation and set-builder notation.
Step 1: List the elements (roster notation): Start at 3 and add 3 repeatedly, stopping before 20.
M={3,6,9,12,15,18}M = \{3, 6, 9, 12, 15, 18\}
Step 2: Write the rule (set-builder notation): Describe the pattern using a condition on the variable.
M={xZ+x is a multiple of 3 and x<20}M = \{x \in \mathbb{Z}^{+} \mid x \text{ is a multiple of } 3 \text{ and } x < 20\}
Answer: Roster: {3,6,9,12,15,18}\{3, 6, 9, 12, 15, 18\}. Set-builder: {xZ+3x and x<20}\{x \in \mathbb{Z}^{+} \mid 3 \mid x \text{ and } x < 20\}.

Why It Matters

Set notation is foundational in Algebra 2, Precalculus, and any college course involving discrete mathematics or proofs. Probability theory defines events as sets of outcomes, so fluency with unions, intersections, and complements directly applies to calculating probabilities. Database queries, Venn diagram reasoning, and formal logic all rely on the language of sets.

Common Mistakes

Mistake: Confusing the symbols \in and \subseteq. For example, writing {2}{1,2,3}\{2\} \in \{1, 2, 3\}.
Correction: \in relates an element to a set: 2{1,2,3}2 \in \{1, 2, 3\}. \subseteq relates a set to a set: {2}{1,2,3}\{2\} \subseteq \{1, 2, 3\}. The object {2}\{2\} is a set, not an element of {1,2,3}\{1, 2, 3\} (unless the set explicitly contains {2}\{2\} as an element).
Mistake: Treating sets as ordered or allowing duplicates, such as thinking {1,2,3}{3,2,1}\{1, 2, 3\} \neq \{3, 2, 1\}.
Correction: Sets are unordered and contain no repeated elements. {1,2,3}\{1, 2, 3\} and {3,2,1}\{3, 2, 1\} are the same set. If order matters, use an ordered tuple like (1,2,3)(1, 2, 3).

Related Terms