# Sets

## Contents

# Sets#

A *set* is a basic concept in mathematics used to define collections of *elements*.
The technical underpinnings of set theory can get a bit tricky, but for our purposes, you can think of a set as any un-ordered collection.

Notationally, we use curly braces \(\{\}\) to denote a set. For example, we could have a set consisting of three colors defined as

Each of the three colors **red, green, blue** are *elements* of the set \(S\).
The *order* of the elements in a set does not matter: the set above is equivalent to the set \(\{\text{blue},\;\text{green},\;\text{red}\}\).
*Repetition* also does not matter: an element is either in the set or not.

We use the symbol \(\in\) (a funny-looking *E*, denoting *element*) to denote membership in a set:

and \(\notin\) to denote that an element does not belong to a set:

We won’t do too much with sets in this text, but the basic notation is helpful to have, especially when dealing with different types of numbers.

## Number systems#

In digital signal processing, we use many kinds of numbers to represent different quantities. It’s helpful to have notation to specify exactly what kind of numbers we’re talking about, so here’s a brief list with their standard notations:

\(\mathbb{N}\), the

*natural numbers*: \(\{0, 1, 2, 3, \dots\}\)\(\mathbb{Z}\), the

*integers*: \(\{\dots, -3, -2, -1, 0, 1, 2, 3, \dots\}\)\(\mathbb{Q}\), the

*rational numbers*(fractions): \(\left\{\frac{n}{m} ~\middle|~ n,m \in \mathbb{Z}, m \neq 0\right\}\)\(\mathbb{R}\), the

*real numbers*(i.e., the continuous number line)\(\mathbb{C}\), the

*complex numbers*: \(\{a + \mathrm{j}b ~|~ a,b \in \mathbb{R}\}\)

where \(\mathrm{j} = \sqrt{-1}\) is the *imaginary unit*.

Natural numbers (\(\mathbb{N}\)) are often used for whole number quantities, such as sample positions \(n\). Note that this means that the first sample will occur at index \(n=0\)!

Real numbers (\(\mathbb{R}\)) are often used for continuous quantities, such as angles (in radians), frequencies (in cycles/sec), or time (in seconds).

Complex numbers occupy a special place in signal processing because they turn out to be a great tool for modeling periodic processes.