# Algebra/Sets

In this section we mainly set up some useful notation. While the ideas here are not very central to the study of algebra, they do come up from time to time, so pay attention! It is exactly because these ideas don't reoccur on every page that they can be confusing when they suddenly come up later on. So be prepared to revisit this section as necessary to refresh your memory.

## Contents

## Sets and the Number Line[edit]

A **set** is a collection of things. Examples might be the set of letters used in the English alphabet, or the set of books written by John Steinbeck. For us, the sets we will discuss will usually be collections of numbers because these are the sets that are important in algebra. Each of the things in a set is called an **element** of the set. The number of elements in a set could be finite or could be infinite. The only requirement is that the elements of a set should be described explicitly in some way either now or in the future (after we solve some problem). There may be no elements in a set; such a set is called an **empty set** or a **null set**. In this book we will mostly try to use capital letters as the symbols for sets whereas lower case letters are often (but not always!) used for variables.

A set can be written by putting braces, that is { and }, around a list of the elements of the set, with each element being separated by a comma. For example, a set *S* containing natural or whole numbers from 1 to 10 could be shown as follows:

It is not always possible to list out all the numbers in a set. In these cases we rely on English to describe the set. That's right! Words are an important part of math too. The last and probably most common notation involves using variables and algebraic expressions, together with a description of what values the variables may take. For example, to describe the set of numbers that are a perfect square, we might write:

or we can even use other sets in the description like:

Sometimes we want to explicitly make clear that a particular number (or thing) is in a set. Keeping *S* from the example above, we know that 2 is an element of *S*, rather than writing this out in English, sometimes people use the shorthand 2 ∈ S. The symbol ∈ is chosen because it looks like an E, and E is the first letter of the word "element". If we want to express that something is not part of a set we use the symbol ∉. So to continue our example we know that 11 ∉ *S*.

Let's take a look at a practice problem.

**Problem.** For each of the following sets decide if 7 is in the set:

- A={1, 2, 3, 5}
- The set
*O*of odd numbers. *C*={1, 2, 3, 4, 5, …, 100}- The set
*P*of all prime numbers.

**Answer.**

- We can see by inspection that 7 ∉ A.
- 7 ∈
*O*because*7*is an odd number. - 7 ∈
*C*. This is a bit of a trick question. While it hasn't been explicitly said it yet, when listing elements people sometimes use … to mean keep "following the pattern". And in the rest of mathematics … keeps getting used in this way, so it is time to get used to it. Here the pattern is we start with 1 and keep making the numbers 1 bigger, so yes, if we keep going we will reach 7. - 7 ∈
*P*. This problem requires that we try to factor 7, or have previously known it was a prime number. Since 2, 3, 4, 5, 6 all leave a remainder when we divide 7 by them, we see that 7 is a prime number.

We now introduce the basic ideas that come up when you have two or more sets.

## Subsets and Super sets[edit]

Sometimes every element in one set is contained in another set. For example, let *S* = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} and *T* = {2, 4, 6, 8, 10}. Clearly *T* is just the even numbers between 1 and 10, and every number in *T* is already in *S*. In this example we would say that *T* is a **subset** of *S*. Instead of saying which set is the smaller one, we could instead say which set is the bigger one by calling it a **superset**. That is, we could say *S* is a superset of *T*. As one deals with sets more and more, it becomes increasingly tempting to say that *T* is *smaller than* *S* (or maybe *less than* *S*). In fact, we already have! Because the relationship of one set being contained in another is so similar to relationship of one number being less than another it is natural to introduce a symbol very similar to inequality symbol <. To avoid confusing sets with numbers we don't want to use exactly the same symbol, so we will round out the point a bit and use the symbol ⊂. So instead of writing out in words "*T* is a subset of *S*", we could write *T* ⊆ *S*. Just like inequality we can flip the symbol around. We just have to make sure the rounded side points to the smaller thing. That is, for our example we could write *S* ⊃ *T*.

What if two sets have exactly the same elements? In this case we say that the two sets are **equal**. So if someone else came along and said let *U* = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, then we say that *S* and *U* are equal. This time we don't worry about confusing sets and numbers and we will stick with the symbol = to denote when two sets are equal. So we can write *S* = *T*. Are there relationships corresponding to ≤ and ≥? Yes, the are ⊆ and ⊇ and they work like you might expect. Here is a table that explains how each of these symbols work.

Expression | Meaning |
---|---|

T ⊂ S |
Means T is a subset of S. That is every element of T is an element in S, but there is some element of S that is not in T. |

T ⊃ S |
Means S is a subset of T. That is, every element of S is an element in T, but there is some element of T that is not in S. |

S = T |
Means that S and T have exactly the same elements. That is, use a few more words every element of S is an element of T and every element of T is an element of S. |

T ⊆ S |
Means every element of T is an element of S. (Notice that saying it this way allows for the possibility that S = T) |

S ⊇ T |
Means every element of T is an element of S. |

## Unions and Intersections[edit]

There are two other things to do with sets. Given sets in *S* and *T* we may want to talk about all the elements that are in either *S* or *T*. Since a set is just a collection of things, and "the elements that are in either *S* or *T*" is a collection, you can think of this as defining a new set called the **union** of *S* and *T*. We write the union of *S* and *T* by *S* ∪ *T*. We use the symbol ∪ because it looks like a u, and u is the first letter in word "union". Let's do an example.

**Problem.** Suppose *S* = {2, 4, 6, 8, 10} and *T* = {3, 6, 9, 12, 15}, Find *S* ∪ *T*.

**Answer.** *S* ∪ *T* = {2, 3, 4, 6, 8, 9, 10, 12, 15}

An important thing to notice in this example is that *S* ∪ *T* doesn't contain two 6's. The union contains all the elements in either set, but 6 is still just *one thing* that happens to be in both sets.

Give sets *S* and *T*, instead of thinking about things that are in either set, it is sometimes handy to think about things that are in *both* sets. Again we think of the collection of "the elements in both *S* and *T*, this set is called the **intersection** of *S* and *T*. We write the intersection of *S* and *T* by *S* ∩ *T*. We don't use the symbol ∩ because it looks like an i. It doesn't. Somehow, an i between two symbols just wouldn't look as good, so we want to pick something else. This symbol is just the upside down symbol of the symbol for union. Let's consider what the intersection looks like in the problem above.

**Problem.** Suppose *S* = {2, 4, 6, 8, 10} and *T* = {3, 6, 9, 12, 15}, Find *S* ∩ *T*.

**Answer.** *S* ∩ *T* = {6}

The number 6 is the only number in both sets, so it is the only element of the intersection.

## Subsets of the Real numbers[edit]

In this section, we give names to some of the important classes of number.

The first important set of numbers is probably the first set of numbers we are really introduced to, namely the **Natural Numbers**, which we will call . The natural numbers are:

- .

The next set is just a little bigger, and includes the next number we usually learn in elementary school. The natural numbers, together with the number 0 will be called the **Whole Numbers**, and denoted by . The whole numbers are:

- .

Of course we are missing the negative numbers. The set of whole numbers together with all of the negative numbers is called the *Integers* denoted by . (You might ask why a letter that looks like Z. The reason is because it comes from the German word for number, Zahlen. English speakers are not the only ones to make important contributions to mathematics! Today, Z is the letter used almost universally.) The integers are:

Next, as you might guess we need a set of numbers that includes fractions. The set of all numbers that can be written as a fraction is written is called the **Rational Numbers** and is denoted by . You might ask why a letter that looks like Q? Well, first mathematicians save the letter R for real numbers (described below) and F for a general number field (a concept a bit beyond this book). But since a quotient is another word for fraction, and we are not using Q for anything else, it seems the sensible choice. The rational numbers are:

What about just the decimal numbers, we spent a long time working with them. As mentioned in the section on variables the set of all numbers decimal numbers (including those whose that continue indefinitely after the decimal point) is known as the **Real Numbers** and is written with the symbol . In this case we will not attempt to give a formula that describes the set, and instead just rely on its English description. But we should give a few examples of real numbers.

It may seem difficult to believe, but not every number can be written has a fraction. As we will see later, one such number is , but this is far from the only example. Indeed every integer can be written as a decimal just by adding a decimal point and infinitely many zeros to it. For example, 0 = 0.000… and -3 = -3.000… and we have made those to integers into decimal numbers. What about fractions? Yes every fraction can be written as a decimal simply using long division. We can also add, subtract, multiply and divide any two real numbers to get another real number (as long as we don't divide by 0). Unfortunately it gets to be very difficult to describe why this is. The algorithms we learn in school for adding, subtracting, multiplying and dividing real numbers all being with the decimal place furthest to the right. If the decimal goes on forever, it is awfully hard to find the decimal furthest to the right. So what do we do? For the moment the answer has to be "not worry about it too much". Later, after we have mastered a few more mathematics courses we will be ready to tackle the task of making sense of the arithmetic of real numbers. In the mean time your intuition about decimal numbers will probably not lead you astray. And where ever possible we will stick to fractions, or expressions like , rather than having to deal with infinitely long decimals.

Notice, the above list of numbers is increasing. That is, .

There is one last set of numbers it we should name. The **Irrational Numbers** is the set of all real numbers which are **not** rational numbers, we shall denote this set by , though other books may choose other names. To give a formula, we write:

We have never quite given the definition of a set this way. We added emphasis that the numbers *x* needed to come from the set of real numbers. This is also a common way to denote a set, though we may not use it much. We should point out there are numbers that are irrational. The most famous example is , but there are many many more. In fact the square root of any number which is not a perfect square will be an irrational number. As will the cube root of anything which isn't a perfect cube, etc.

We should point out that

Why? Well because of the definition of . Maybe your thinking "wait, what does this mean again?" Remember that two sets are equal if they have the same elements. So we really should explain why everything in is in **and** why everything in is in . But we will leave this as an exercise to the ambitious reader.

### Practice Problems[edit]

Name the *smallest* of the sets given above to which the following numbers belong to.

- 0
- 0.0110211
- -32

### Answers[edit]

- The number 0 is a whole number, that is it is in . It cannot be in any smaller set that we named because it is not in the natural numbers.
- The number 21 is not a pefect square, so is in .
- The decimal expansion ends, meaning it can be represented as fraction, specifically 110,211/10,000,000, so it is a rational number. That is 0.0110211 ∈ of two integers - a rational number thus also a real number.
- The square root of
*49*is*7*, which is a natural number. - Since -32 is a negative number the smallest set it could be in is it is an integer, the integers.
- Notice, , so this number is in , the rational numbers.