## Section 5.5 Set-Builder Notation

Set-builder notation can be used to specify a set by describing the properties of its elements. In set-builder notation we write sets in the form

where (properties of \(x\)) is replaced by conditions that fully describe the elements of the set. The bar (\(\mid\)) is used to separate the elements and properties. The bar is read as “such that,” and all together we read this set as “the set of all elements \(x\) such that (properties of \(x\)).” We use a variable (here \(x\)) to formulate the properties on the elements in the set.

With a concrete example we illustrate, how set builder is read and interpreted.

### Example 5.5.1. Reading set-builder notation.

We consider the set

We read this as

\(A\) is equal to the set of all elements \(x\) such that \(x\) is a natural number and \(x\) is less than \(6\text{.}\)

Notice how we use \(x\) to formulate the properties of the elements in the set. Knowing what the elements of the set of natural numbers \(\N\) and that the set \(A\) only contains numbers that are less than \(6\) we find that the set \(A\) written in roster form is

In the example above two properties of the elements in the set were given. We now consider a set defined by four properties of its elements.

### Problem 5.5.2. Four properties.

Give the set in roster form.

We go through the conditions on the elements of the set one by one.

The first property is \(x\in\Z\text{,}\) so the possible values for \(x\) are:

The first two properties are \(x \in\Z\) and \(x \gt 12 \text{,}\) so the possible values for \(x\) are:

The first three properties are \(x \in\Z\) and \(x \gt 12\) and \(x \lt 20\text{,}\) so the possible values for \(x\) are:

Now we find the elements that satisfy all four properties \(x \in\Z\) and \(x \gt 12 \) and \(x \lt 20\) and \(x \fmod 3 = 1\text{,}\) that is we find all values of \(x\) from the list above that satsify \(x \fmod 3 = 1\text{:}\)

So the elements satisfying all four properties are \(13\) and \(16\) and \(19\text{.}\) Thus

In the video in Figure 5.5.3 we recall the definition of set-builder notation and give examples of sets written in set-builder notation.

There are several ways of representing the same set. We can describe the same set verbally, in roster form, or in roster form with ellipsis. Set-builder notation yields even more ways of representing the same set.

### Example 5.5.4. A set written in three ways.

There are many ways of describing the same set using set-builder notation:

\(\displaystyle \{x\mid x \text{ is a natural number from \(4\) to \(8\) } \} = \{4,5,6,7,8\}\)

\(\displaystyle \{x\mid x \in \mathbb{N} \text{ and } x>3 \text{ and } x\lt 9\} = \{4,5,6,7,8\}\)

\(\displaystyle \{x\mid x \in \mathbb{N} \text{ and } x \geq 4 \text{ and } x \leq 8\} = \{4,5,6,7,8\}\)

Many sets that we have encountered before can also be formulated in set builder notation.

### Example 5.5.5. Selected sets in set-builder notation.

We formulate some familiar sets in set-builder notation.

\(\{x\mid x\in\Z \text{ and } x>0\}\) is the set of positive integers, also known as the set of natural numbers.

\(\{x\mid x\in\N\text{ and } x\fmod 2=0\}=\{2,4,6,8,\dots\}\) is the set of even natural numbers.

\(\{x\mid x\in\N\text{ and } x\fmod 2=1\}=\{1,3,5,7,\dots\}\) is the set of odd natural numbers.

\(\{x\mid x\in\N \text{ and } x\lt 0\}=\{\,\}\) as there are no natural numbers that are less than zero.

We represent some special sets in set-builder notation.

### Example 5.5.6. Special sets in set-builder notation.

We give special sets from the previous section in set builder notation. Let \(m\in\N\text{.}\)

\(\Z_m=\{x\mid x\in\Z \text{ and } x\ge0 \text{ and } x\lt m\}\text{.}\)

\(\Z_m^\otimes=\{x\mid x\in\Z \text{ and } x>0 \text{ and } x\lt m\}\text{.}\)

Now read a set in set-builder notation, formulate a verbal description and give the set in roster form.

### Checkpoint 5.5.7. Read set-builder notation, write in roster form.

Consider:

This is read as:

The set

select

of the one element

of all elements

select

where

with the exception that

\(t\) is

select

an element of

not an element of

less than

greater than

equal to

select

natural numbers

integers

negative integers

characters

\(t\) is

select

less than

less than or equal to

greater than

greater than or equal to

equal to

not equal to

better than

worse than

\(t\) is

select

less than

less than or equal to

greater than

greater than or equal to

equal to

not equal to

better than

worse than

Give the set in roster form.

\(\lbrace\)\(\rbrace\)