1.2 Sets
Definition
A set is a collection of elements.
We denote sets by capital letters like and . If an element belongs to the collection , we write . If does not belong to , we write . There is a special set containing no elements. This set is called an empty set and is denoted by .
If you think of a set you should imagine a sack full of elements. The sack is your set and the elements in the sack are the elements belonging to the set. An empty set becomes a sack with no elements inside.
Constructors
To define a set we need to specify the elements inside the set. For doing that, we use the following notation
condition on
Here, we mean that the set consists of all elements such that the condition on holds.
e.g. The set of natural numbers
is a natural number
Operations on sets
Intersection
If we are given two sets and , then we define the intersection of and as follows
If we denote the sets and by discs on a plain then the intersection of and is denoted as below
Union
If we are given two sets and , then we define the union of and as follows
If we denote the sets and by discs on a plain then the union of and is denoted as below
Difference
If we are given two sets and , then we define the difference between and as follows
If we denote the sets and by discs on a plain then the difference between and is denoted as below
Cartesian product
If we are given two sets and , then their Cartesian product is defined as follows
The Cartesian product is simply the set of all possible pairs where the first element is taken from and the second from .