## Section 2.1 Introduction to Sets

Sets are collections of objects. They may be collections of mathematical objects, such as numbers or functions. They may be collections of any other type of object such as students in a class or times of day. We can even have sets of sets.

It is useful to understand some general notation when working with sets. We will work with sets more explicitly in later sections. For now, we really just need to be able to understand the notation.

We will usually use capital letters for sets, such as \(S\) or \(A\text{.}\) If we want to talk about elements in a set \(S\text{,}\) we use the notation \(x\in S\). We read this notatation as “\(x\) is in \(S\)” or “\(x\) is an element of \(S\text{.}\)” If \(x\) is

*not*in \(S\text{,}\) then we use the notation \(x\notin S\).If we want to list the specific elements of a set, we use curly brackets, \(\{ \}\text{,}\) around the elements of the set. We can also do this with a description of the elements in the set.

\(S=\{1, 2, 3, 4, 5\}\text{.}\) This is the set whose elements are 1, 2, 3, 4, 5.

\(A=\{x\in S : x \text{ is odd}\}\text{.}\) This describes the odd numbers in \(S\text{,}\) so 1, 3, 5.

\(A=\{x\in \text{reals} : 1\leq x\leq 5\}\text{.}\) This describes the real numbers between 1 and 5 (which there are too many to list).

In general, if we use \(P(x)\) to describe a property of \(x\text{,}\) we use the notation

\begin{equation*}
\{x\in S : P(x)\}
\end{equation*}

and read the statement as “\(x\) in \(S\) such that \(x\) has property \(P\text{.}\)”

A subset, \(B\text{,}\) of a set \(A\) is a set of elements that are also in \(A\text{.}\)

We use the notation \(B\subseteq A\) for “\(B\) is a subset of \(A\)”. If \(B\) is not a subset of \(A\text{,}\) then we use the notation \(B\nsubseteq A\). Note, some books use \(A\subset B\) as the notation for subset.

### Example 2.1.2. Subsets.

\(\{1, 3\}\subseteq \{1, 2, 3, 4, 5\}\text{,}\) but \(\{0, 1, 2, 3\}\nsubseteq \{1, 2, 3, 4, 5\}\text{.}\)

It is important to understand the difference between subset, \(\subseteq\text{,}\) and element, \(\in\text{.}\) For example, if \(S=\{1, 2, 3, 4, 5\}\text{,}\) then \(1\in S\text{,}\) but \(1\nsubseteq S\text{.}\) This is because 1 is an element, not a set. Similarly, \(\{1\}\subseteq S\text{,}\) but \(\{1\}\notin S\text{.}\) This is because \(\{1\}\) is a set, not an element. In general, when working with sets, you should identify the elements of the set. Then sets of those elements are subsets. The curly brackets are our way of saying “set.”

There are some special subsets that we will use throughout the course (and, in fact, the rest of your mathematical career).

- \(\mathbb{R}\), the set of real numbers. These are all the numbers your are familiar with from calculus: whole numbers, positives, negatives, fractions, decimals, square roots, \(e\text{,}\) \(\pi\text{,}\) etc.
- \(\mathbb{Z}\), the set integers. These are all the whole numbers: positive, negative, and zero.
- \(\mathbb{Q}\), the set rational numbers. These are all the whole numbers and fractions: positive, negative, and zero. We will revisit this set in more detail later.
- \(\mathbb{N}\), the set of natural numbers. These are all the positive whole numbers. Some books include zero, some do not. Since this can be confusing, we will avoid this notation in this class (but you might see it in future classes). Instead, we will use one of the next two notations, which more clearly denote inclusion of zero, or not.
- \(\mathbb{Z}^+\), the set of positive integers. These are all the positive whole numbers. This set does NOT include zero.
- \(\mathbb{Z}^{nonneg}\), the set of nonnegative integers. These are the whole numbers that are not negative. This set DOES include zero.
- \(\mathbb{R}^+\), the set of positive real numbers.
- \(\mathbb{R}^{nonneg}\), the set of nonnegative real numbers. These are the real numbers that are not negative.

It is also useful to have a notation for the set with no elements. The empty set is denoted \(\emptyset\).

### Activity 2.1.1. New Notation.

Based on the notations above, what would be a good notation for the set of integers less than zero?

### Activity 2.1.2. No Zero.

Which of the following sets do NOT contain zero: \(\mathbb{Q}, \mathbb{Z}, \mathbb{R}, \mathbb{R}^+, \mathbb{R}^{nonneg}\text{?}\)

### Activity 2.1.3. Practice with Sets.

Let \(S=\{1, 2, 3, 4, 5\}\text{.}\) List the elements in each of the following sets.

#### (a)

\(\{x\in S : 2 <x\leq 5\}\)

#### (b)

\(\{x\in S: x \mbox{ is prime}\}\)

#### (c)

\(\{1/x: x \in S\}\)

### Activity 2.1.4. Elements or Subsets.

It is important to be able to distinguish between

*elements*of a set and*subsets*of a set. Determine if each of the following is true or false. If it is false, what small change in notation would make it true?#### (a)

\(5\in \mathbb{Q}\)

#### (b)

\(\{2\} \in \mathbb{Z}\)

#### (c)

\(\{-1, -2, -3\}\subseteq \mathbb{Z}\)

#### (d)

\(0\subseteq \{0, 2, 4\}\)

#### (e)

\(\{0\}\subseteq \{0, 2, 4\}\)

### Exercises Exercises

#### 1.

Explain in your own words why \(2\) does not equal \(\{2\}\text{.}\)

#### 2.

How many elements are in the set \(\{1, 2, 3, 1, 2, 1\}\text{?}\)

#### 3.

Use set-roster notation to list the elements in each of the following sets.

- \(\displaystyle S=\{n\in \mathbb{Z}: n=(-1)^k, \text{ for some integer } k\}\)
- \(\displaystyle T=\{m\in \mathbb{Z}: m=1+(-1)^k, \text{ for some integer } k\}\)
- \(\displaystyle U=\{r\in \mathbb{Z}: 2\leq r\leq -2\}\)
- \(\displaystyle V=\{s\in \mathbb{Z}: s>2 \text{ or } s\leq 3\}\)

#### 4.

Determine whether the following statements are true or false.

- \(\displaystyle 3\in \{1, 2, 3\}\)
- \(\displaystyle 1\subseteq \{1, 2, 3\}\)
- \(\displaystyle \{2\}\in \{1, 2, 3\}\)
- \(\displaystyle 1\in \{1\}\)
- \(\displaystyle \{1\}\subseteq \{1, 2, 3\}\)
- \(\displaystyle \{1\}\subseteq \{1\}\)