## Section5.5Set-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

\begin{equation*} \{x\mid\text{ (properties of } x)\}\text{,} \end{equation*}

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.

We consider the set

\begin{equation*} A=\{x\mid x\in\N \text{ and } x\lt 6\}\text{.} \end{equation*}

$$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

\begin{equation*} \{ 1,2,3,4,5 \}\text{.} \end{equation*}

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.

Give the set in roster form.

\begin{equation*} \{ x \mid x \in\Z \text{ and } x \gt 12 \text{ and } x \lt 20 \text{ and } x \fmod 3 = 1\} \end{equation*}
Solution.

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:

\begin{equation*} \dots,\,-2,\,-1,\,0,\,1,\,0,\,1,\,2,\dots \end{equation*}

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

\begin{equation*} 13,\,14,\,15,\,16,\,17,\dots \end{equation*}

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

\begin{equation*} 13,\,14,\,15,\,16,\,17,\,18,\,19 \end{equation*}

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{:}$$

\begin{gather*} 13 \fmod 3 = 1\\ 14 \fmod 3 = 2\\ 15 \fmod 3 = 0\\ 16 \fmod 3 = 1\\ 17 \fmod 3 = 2\\ 18 \fmod 3 = 0\\ 19 \fmod 3 = 1 \end{gather*}

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

\begin{equation*} \{ x \mid x \in\Z \text{ and } x \gt 12 \text{ and } x \lt 20 \text{ and } x \fmod 3 = 1\} =\{13,16,19\}. \end{equation*}

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.

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

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

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

3. $$\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.

We formulate some familiar sets in set-builder notation.

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

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

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

4. $$\{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.

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.

Consider:

\begin{equation*} \lbrace t \mid t \in \mathbb{Z} \mbox{ and } t > 30\mbox{ and }t \lt 35\rbrace \end{equation*}

The set

• select

• of the one element

• of all elements

$$t$$
• select

• where

• with the exception that

$$t$$ is

• select

• an element of

• not an element of

• less than

• greater than

• equal to

the set of
• select

• natural numbers

• integers

• negative integers

• characters

and

$$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

$$30$$ and

$$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

$$35\text{.}$$

Give the set in roster form.

$$\lbrace$$$$\rbrace$$

$$\text{of all elements}$$

$$\text{where}$$

$$\text{an element of}$$

$$\text{integers}$$

$$\text{greater than }$$
$$\text{less than }$$
$$31, 32, 33, 34$$