Sets
A set is a very basic structure in maths, similar to lists or arrays in a programming language. To talk about sets we use a specific language with many different symbols. It is important for you to understand this language. So, what is a set? A set is a list or collection of things. These things are called elements. For example, let's say I have a coin, a key and a hanky in my pocket. The list
forms a set with the elements coin, key, and hanky. As you can see above, we use curly braces around the list of elements. This is important for saying "we treat this list as a set".
If we want to give the set a name, like , we write
(say: is the set with the elements coin, key and hanky) and if we want to represent the set with a picture, we use a Venn-diagram, which simply is a circle which includes the elements in the list:
Sets have two important properties:
- The order of the elements is not important: so we regard the two sets and as equal. They are the same set.
- The number of times an element occurs is also not important. So we regard the two sets and as equal. They are the same set. If two sets and are equal, we write
Which sets are equal, that is, ?
Solution
- no
- no
- yes
In Maths, we are also using lists where the order is important. Such lists are called tuples, and round brackets (...) are used. For example, the location of a point in the plane are described using a tuple of coordinates, e.g.
Clearly, the location is different from , so we cannot use the set to describe the location of the point.
Universal sets and the empty set
A set always lives in a 'universe' of things. For example, the set
lives in the universe of natural numbers
and the set
lives in the universe of 'objects we often carry with us'. These 'universes' are also sets, which we call universal sets, and is typically denoted by . In a Venn-diagram, the universal set is drawn as a rectangle
The diagram above shows the set which lives in the universal set . Note that set can live in many possible universal sets, for example is another one. Which one we choose is often not important, and if it is, we have to specify exactly which one we mean. Later on, this will hopefully become more clear.
The empty set is the set that contains no elements, and we write
Is element of
Consider a set which lives in some universe , and some element which is in . Now, either is in , or not. If it is in , we write
(say: is an element of ). If is not in , we write
(say: is not an element of ).
Which of these statements are correct? Assume that the universal set is
(but this is not really important here).
Solution
- no
- yes
- no, because is not in . The element is in .
Ways of defining sets
Basically, there are two methods how we can describe a set. Either we simply write down all the elements in the set - this is called the explicit method. Or we give a rule or description that makes clear which elements have to be in the set - this is called the implicit method.
Here are some examples:
- is an explicit method
- "natural numbers from to " is an implicit method.
- "the solutions of the equation " is an implicit method.
- is an implicit method. "All even numbers from to .
- is an implicit method. "All even numbers from to infinity."
The three dots () stand for "and so on". The explicit method is useful for small sets only.
- Consider the set =multiples of . Which statements are correct?
- Write the explicit form of the sets
-
"all odd numbers between and which are also prime numbers"
-
"the solutions of the equation "
-
Solution
-
It is
- no
- no
- yes
-
-
The cardinality of sets
The (minimal) number of elements in a set is called the cardinality of , and is denoted by
- , thus the cardinality is
- , thus the cardinality is (because the cardinality is the minimal number of elements in the set, and we can write
- (infinity)
Subsets
Consider two sets and . We say that is a subset of , written
if every element of is also in . In other words, is 'inside' . If is not a subset of , we write
In this case not every element of is in . Clearly, the Venn-diagram for is as follows:
- For and it is
- For and it is
- For and it is
Note the following. It is always correct that
- (there is nothing to check, so the statement "every element of is in " is not wrong, so it is correct).
- if and , then the two sets must have the same elements and are therefore equal, that is, we have .
-
Which sets are subsets of each other? , ="all even numbers", ="all prime numbers", ="all odd numbers"
-
Which of the following statements are correct?
-
Solution
- It is
- yes
- no
- yes
Set operations
Consider two sets and . We can form other sets using the following operations:
The intersection of and
The intersection of and , written
is defined as the set of all elements which are in A and B. Thus, contains the common elements of and . In the Venn-diagram, this is the part were and overlap (below, left):
and are called disjoint, if and do not intersect, that is, if . In the Venn-digram, and do not overlap (above, right).
- For and it is (the common elements of and ).
- For and it is (disjoint, no common elements)
The union of and
The union of and , written
is defined as the set of all elements which are in A or B. Thus, contains all elements of and (they are merged). In the Venn-diagram this is the whole area of and (below, left):
Note that the sentence "Taking an element which is in or in " can have two meanings. The inclusive meaning is that we take an element which is in , in or in both. This inclusive 'or' corresponds to the set operation as defined above. The exclusive meaning is that we take an element which is either in or in , but not in both. The Venn-diagram for this operation (for which we do not introduce a symbol) is shown above (right).
For and it is (all elements of and ).
minus
The set A minus B, written
is defined as the set of all elements which are in A but not in B. In the Venn-diagram (below, left), this is the part of without :
For and it is (we take all elements from away from ).
The complement of
The complement of , written
is the set which contains all elements of the universal set which are not in . Thus, we can write
The Venn-diagram is shown below.
- For and it is .
- For and it is .
- For and it is .
From the example above you see that the complement of is strongly dependent on the universal set . Indeed, without knowing this set, we cannot form the complement.
Venn-diagrams for three sets
Often we deal with general sets, without knowing what elements they contains. If this is the case, we always have to assume that the sets intersect. This is the general case. Assuming otherwise must be justified, which can only be done if we know more about the sets.
It follows that in a Venn-digram the general sets must be drawn such that they all overlap. In the case of three sets and this is still doable (see below). Drawing Venn-diagrams with more than three sets is impractical.
Q1
List all the subsets of the set :
How many subsets can you form if ?
Q2
Consider the sets
The universal set is . Determine the following sets:
Q3
Consider the sets , , and . Draw the Venn-Diagrams of the following sets:
Q4
Which statements are correct? Argue with the help of Venn-diagrams.
Q5
Express the following Venn-Diagrams using only intersection, union, and complement:

Q6
and have the universal set . It is , , , and . Determine
Q7
Simplify the following expressions:
Q8
What do you get if you form the union of all the sets (1)-(8) below?
Solution
A1

A2
A3

A4


A5
- or
- e.g
A6

A7

A8
The union is the universal set :
