Sets and set notation — introduction

Sets and set notation — introduction

The PE teacher says: “Everyone who is at least 175 cm tall goes into the volleyball team.” She has not named anyone yet, but it is already clear who is in the team. You just need to measure each student.

This is exactly how a set works. A set is a collection of things where, for every thing, we can say clearly whether it belongs to the collection or not. The things that belong to a set are called its elements (or members).


Contents


What is a set

You can picture a set as a bag that we put things into. Two rules matter:

  • For every thing, it must be clear whether it is in the bag or not.
  • Each thing is in the bag at most once. We never count the same thing twice.

We name sets with capital letters: A, B, C, M … We write the elements inside curly brackets { }.

Examples:

  • the set of weekend days: {Saturday, Sunday},
  • the set of letters in the word “banana”: {b, a, n} — each letter is written only once,
  • the set of even numbers less than 10: {2, 4, 6, 8}.

⚠️ “The set of good films” is not a set. Everyone decides differently what is good, so we cannot say clearly whether a film belongs.


The symbols ∈ and ∉

The fact that 4 belongs to the set A = {2, 4, 6, 8} is written:

4 ∈ A — read “4 is an element of A” or “4 belongs to A”.

The fact that 5 does not belong to it is written:

5 ∉ A — read “5 is not an element of A”.

💡 The symbol ∈ looks like the letter “e” for “element”. The crossed-out ∉ means the opposite, just like ≠ means “not equal”.


Describing a set by listing its elements

The simplest way is to write out all the elements. This is called listing (or roster) notation:

A = {1, 2, 3, 6}

When listing:

  • Order does not matter. {1, 2, 3, 6} and {6, 3, 2, 1} are the same set.
  • Elements are not repeated. We do not write {1, 2, 2, 3} — the correct form is {1, 2, 3}.

Listing works well when there are only a few elements. If there are many but they follow a pattern, we can use three dots: {1, 2, 3, …, 100}.


Describing a set by a rule

The second way is to give a rule that all the elements follow — and nothing else does. This is called set-builder notation:

A = {x ∈ ℕ | x is a factor of 6}

Read it as: “A is the set of all x in the natural numbers such that x is a factor of 6.”

The notation has three parts:

PartMeaning
x ∈ ℕwhich numbers we choose from (here the natural numbers 1, 2, 3, …)
|“such that” (some books use a colon : instead)
x is a factor of 6the rule that x must follow

We find the elements by trying the numbers one by one: 1 divides 6 ✓, 2 ✓, 3 ✓, 4 ✗, 5 ✗, 6 ✓. Bigger numbers do not divide 6. So A = {1, 2, 3, 6}.

Worked example 1

List the elements of B = {x ∈ ℤ | −2 ≤ x < 3}.

  1. We choose from the integers ℤ — so zero and negative numbers count too.
  2. The rule: x is greater than or equal to −2 and less than 3.
  3. With “≤” the end number is included: −2 is in the set.
  4. With “<” the end number is not included: 3 is not in the set.
  5. B = {−2, −1, 0, 1, 2}.

Worked example 2

List the elements of C = {x ∈ ℤ | x² = 9}.

  1. We are looking for integers whose square is 9.
  2. 3² = 9 ✓. But careful: (−3)² = (−3) × (−3) = 9 ✓ as well.
  3. C = {−3, 3}.

💡 If we chose only from ℕ, the negative number would not belong and we would get {3}. So the set we choose from (ℕ or ℤ) matters as much as the rule.


The empty set

Sometimes nothing follows the rule. Then the set is empty, and we write it as ∅.

Examples:

  • {x ∈ ℕ | x + 7 = 3} = ∅ — the solution would be −4, and that is not a natural number,
  • {x ∈ ℤ | x² < 0} = ∅ — a square is never negative,
  • the set of students in your class who are 3 metres tall.

⚠️ The empty set is written ∅ or { }, but not {∅} or {0}. The set {0} is not empty — it has one element, the number zero.


Finite and infinite sets

  • A finite set has a certain number of elements: {1, 2, 3, 6} has 4 elements. The number of elements of a set A is written n(A) (or |A|), so n(A) = 4.
  • An infinite set has infinitely many elements: for example all even numbers {2, 4, 6, 8, …}.

We cannot write out an infinite set completely. But a rule describes it easily: {x ∈ ℕ | x is even}.

⚠️ About ℕ: in this article ℕ = {1, 2, 3, …}. Some books include 0 in the natural numbers. If you are not sure, check how your teacher or textbook defines ℕ.


Common mistakes

  • The end number with < and ≤: with “x < 5” the number 5 is not in the set, with “x ≤ 5” it is.
  • Forgetting negative numbers: in ℤ you must also try 0, −1, −2, …
  • Forgetting the negative root: the equation x² = 16 has two integer solutions, 4 and −4.
  • Repeating elements: {1, 1, 2} is not correct notation; write {1, 2}.
  • {0} as the empty set: {0} has one element; the empty set has none.

Summary

  • A set is a collection of things where we can clearly decide what belongs.
  • x ∈ A: x belongs to A. x ∉ A: x does not belong to A.
  • Listing: A = {1, 2, 3, 6}. Order does not matter, elements are not repeated.
  • Set-builder notation: A = {x ∈ ℕ | x is a factor of 6}. We find the elements by trying numbers.
  • The empty set ∅ has no elements.

Try it yourself

  1. Is it true that 7 ∈ {x ∈ ℕ | x is a factor of 21}?
  2. List the elements of {x ∈ ℕ | x is a prime number, x < 12}.
  3. List the elements of {x ∈ ℤ | −3 < x ≤ 1}.
  4. List the elements of {x ∈ ℤ | |x| ≤ 2}.
  5. Write {3, 6, 9, 12, 15} in set-builder notation.
  6. Is the set {x ∈ ℕ | 2x = 7} empty?

Answers

  1. Yes, 21 ÷ 7 = 3, so 7 ∈ {x ∈ ℕ | x is a factor of 21}.
  2. {2, 3, 5, 7, 11}. The number 1 is not prime.
  3. {−2, −1, 0, 1}. −3 is not included (the sign is “<”), 1 is included (the sign is “≤”).
  4. {−2, −1, 0, 1, 2}. The absolute value is the distance from zero.
  5. For example {x ∈ ℕ | x is a multiple of 3, x ≤ 15}. There is more than one correct answer — it only has to describe exactly the same elements.
  6. Yes. The solution of the equation is 3.5, and that is not a natural number.

Practise

👉 Next article: Number sets: natural, integers, rational, real