# Set theory

Set theory is about how elements can be divided into groups or sets.

An element can be anything.

For example:

We have three elements: a banana, an orange and a pear.

These could be described by the fact that, they belong to the set of fruits.

## The concepts of set theory

Here is an example of two sets called M and N.

The numbers 1, 2, 3, 4 and 5 are members of M, and the numbers 4, 5, 6 and 7 are members of N.

The two sets are denoted like this:

M={1,2,3,4,5} and N={4,5,6,7}

Sets are usually named with capital letters.

## Set membership

The number 2 is a member of the set M. This can be denoted with the “element of”-symbol .

The number 7 is not a member of the set M This can be denoted with the “not element of”-symbol :

## The empty set

The empty set is a set having no elements. This is denoted by Ø or by curly brackets with nothing inside {}.

## Union

The union of sets is all the elements from all sets. The sets are added together.

## Intersection

The intersection of sets is the elements, which the sets have in common.

## Relative complement

The relative complement of sets is the elements, which are members of the one set but not the other. The other set is subtracted from the one set.

## Compliment

The compliment of a set is the elements, which are not members of that set.

Given is the two sets:

M={1,2,3,4,5} and N={4,5,6,7}

The complement of the set M is the elements not being member of M:

MC={6,7}

## Subset

Given is the two sets:

B={1,2,3,4} and A={3,4}

As you can see, all elements belonging to the set A also belong to the set B, which makes A a subset of B.

This is denoted by:

This also means that A has the same or fewer elements than B.
B is not a subset of A, because there are elements in B, which are not members of A.

## Proper subset

Given is the two sets:

B={1,2,3,4} and A={3,4}

A is the subset of B, but A is also the proper subset of B, because B has elements, which are not members of A. So A is smaller than B.

This is denoted:

## Full “set-builder notation”

Subsets of sets can be expressed by using the “such that”-symbol, which is a vertical bar.

Given is the set:

A={1,2,3,4}

Now we want to make a subset of A with all numbers greater than 2:

This is pronounces as: “x is an element of A, such that x is greater than 2”. The elements of this subset are the numbers 3 and 4.