Course contentsShow
← Mathematics
Lesson 2521 of 3,12151. Discrete Math — Sets, Relations, FunctionsFree lesson

Sets: Definition and Notation

Learn what a set is, roster and set-builder notation, and the concepts of membership and cardinality.

Sets: Definition and Notation

You'll learn what a set is, how to write sets using roster and set-builder notation, and understand membership and cardinality.

What Is a Set?

A set is simply a collection of distinct objects, called elements or members. Think of it like a bag containing items—what matters is what's inside, not the order or how many times you list something. Sets are fundamental building blocks in mathematics, giving us a precise way to talk about collections.

Notation Basics

Membership

We write a ∈ A to mean "element a belongs to set A" and a ∉ A to mean "a does not belong to A."

Roster Notation

List elements explicitly inside curly braces:

  • A = {1, 2, 3, 4, 5}
  • B = {red, blue, green}
  • C = {2, 4, 6, 8, ...} — the ellipsis indicates the pattern continues

Order doesn't matter: {1, 2, 3} = {3, 1, 2}. Duplicates are ignored: {1, 2, 2, 3} = {1, 2, 3}.

Set-Builder Notation

Describe sets by stating a property their elements must satisfy:

  • A = {x | x is a natural number and x ≤ 5} = {1, 2, 3, 4, 5}
  • B = {x | x is an even integer}
  • C = {n² | n ∈ ℕ} = {1, 4, 9, 16, ...}

Read the vertical bar "|" as "such that."

Cardinality

The cardinality of a set is the number of elements it contains, denoted |A|.

  • If A = {1, 2, 3}, then |A| = 3
  • If B = {red, blue}, then |B| = 2
  • Some sets (like all natural numbers) have infinite cardinality

Key Takeaway: A set is an unordered collection of distinct objects; we express sets using roster notation (listing elements) or set-builder notation (describing properties), check membership with ∈, and count elements using cardinality.