Set-builder notation

Set-Builder Notation

In this lesson, you will learn

  • What set-builder notation is, and how to read it
  • The difference between set-builder notation and the roster method
  • When set-builder notation is the better choice
  • How to write sets such as inequalities, multiples, even and odd numbers

What Is Set-Builder Notation?

Definition

A set-builder notation describes or defines the elements of a set instead of listing the elements.

For example, the set { 1, 2, 3, 4, 5, 6, 7, 8, 9 } lists the elements.

The same set could be described as { x | x is a counting number less than 10 } in set-builder notation.

We read the set { x | x is a counting number less than 10 } as the set of all x such that x is a counting number less than 10.

When the set is written as { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, we call it the roster method.

Remember

The vertical bar | is read "such that". Some books use a colon instead, { x : x > 9 }, or a slash, { x / x > 9 }, as in the figure below. All three mean the same thing.

Write { 2, 4, 6, 8 } in set-builder notation.

Show answer

{ x | x is an even counting number less than 10 }. Other correct answers are possible, such as { x | x = 2n, n is a counting number from 1 to 4 }.

How Set-Builder Notation Works

The pattern { x / condition(s) that define(s) x }, with the examples { x / x is an even number between 10 and 20 } and { x / x is a prime number }

You can list all even numbers between 10 and 20 inside curly braces separated by commas: { 12, 14, 16, 18 }. Again, this is called the roster notation.

However, could you use the roster notation to list all the prime numbers? See now when it is a good idea to use the set-builder notation.

{ x | condition(s) that define(s) x }

List the elements of { x | x is an odd number between 10 and 20 }.

Show answer

{ 11, 13, 15, 17, 19 }. These are the odd numbers greater than 10 and less than 20.

Why Do We Use Set-Builder Notation?

Some sets are big or have many elements, so it is more convenient to use set-builder notation as opposed to listing all the elements, which is not practical when doing math.

For example, instead of making a list of all counting numbers smaller than 1000, it is more convenient to write { x | x is a counting number less than 1000 }.

It is also very useful to use a set-builder notation to describe the domain of a function.

If f(x) = 2x − 5, the domain of f is { x | x ≠ 5 }.

Worked example: Write the domain of g(x) = 3 ÷ (x + 2) in set-builder notation.
  1. You cannot divide by zero, so the bottom, x + 2, must not be 0.
  2. Find the value that makes it 0: x + 2 = 0 when x = −2.
  3. Every other real number works, so x can be anything except −2.

Answer: the domain of g is { x | x ≠ −2 }

Which is easier to write: the roster of all counting numbers less than 1000, or the set-builder notation?

Show answer

The set-builder notation. The roster would need 999 numbers, while { x | x is a counting number less than 1000 } fits on one line.

More Examples of Set-Builder Notation

Unless otherwise stated, you should always assume that a given set consists of real numbers.

1) x > 9

{ x | x > 9, x is a real number }

2) The set of all integers that are multiples of five

{ x | x = 5n, n is an integer }

3) { −6, −5, −4, −3, −2, ... }

{ x | x ≥ −6, x is an integer }

4) The set of all even numbers

{ x | x = 2n, n is an integer }

5) The set of all odd numbers

{ x | x = 2n + 1, n is an integer }

Common mistake

Forgetting to say what kind of number x is. { x | x > 9 } contains every real number greater than 9, such as 9.5 and 100.25. If you only want whole numbers, say so: { x | x > 9, x is an integer } = { 10, 11, 12, ... }.

Is 15 in the set { x | x = 2n + 1, n is an integer }?

Show answer

Yes. 15 = 2 × 7 + 1, and 7 is an integer. This set is the set of all odd numbers.

Summary

  • Set-builder notation describes the elements of a set with a rule: { x | condition on x }.
  • The bar | is read "such that". A colon or a slash is sometimes used instead.
  • The roster method lists the elements, such as { 1, 2, 3 }.
  • Set-builder notation is the better choice for big or infinite sets, and for the domain of a function.
  • Unless stated otherwise, assume x is a real number.

Test Yourself: 10-Question Quiz

Now check what you learned. Every answer is explained, and each time you play you get new questions.

Question 1 of 10Score: 0