Skip to main content
\(\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{ #1}}{\thechapter~ #1}} \renewcommand{\sectionmark}[1]{} \newcommand{\abs}[1]{\left|#1\right|} \renewcommand{\theenumi}{5.\arabic{enumi}} \newcommand{\norm}[1]{\left\|#1\right\|} \newcommand{\norma}[1]{\left\|#1\right\|} \newcommand{\BM}[1]{\text{\boldmath$#1$}} \newcommand{\halmaz}[1]{\left\{\,#1\,\right\}} \newcommand{\halmazvonal}[2]{\left\{\,#1\mid #2\,\right\}} \newcommand{\halmazpont}[2]{\left\{\,#1:#2\,\right\}} \newcommand{\N}{\mathbb{N}} \newcommand{\len}{\norm} \newcommand{\var}[2][]{v_{#1}\left(#2\right)} \newcommand{\vari}[2]{v_{#1}\left(#2\right)} \newcommand{\size}[2][]{s_{#1}\left(#2\right)} \newcommand{\dep}[2][]{d_{#1}\left(#2\right)} \newcommand{\sizestar}[2][]{s_{#1}^*\left(#2\right)} \newcommand{\depstar}[2][]{d_{#1}^*\left(#2\right)} \renewcommand{\headrulewidth}{0pt} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section1.1Sets

In mathematics a set is a collection of objects that are called elements. Usually we denote sets by capital letters and elements by small letters. If \(A\) is a set and \(a\) is an element of \(A\text{,}\) then we write \(a\in A\text{.}\) If \(a\) is not an element of \(A\text{,}\) then we write \(a\notin A\text{.}\) Now we deal with the problem how to provide a set.

  • Sets given by enumeration. If we have a set containing certain elements, then we enclose these elements in braces. For example, if \(A\) is a set containing 1, 2 and 3 we write \(A=\halmaz{1,2,3}\text{.}\) This notation is difficult to use if the given set has large amount of elements. In this case we list only some (usually consecutive) elements such that it is easy to see which are the remaining elements of the set. As an example let us assume that \(B\) is a set containg the integers between 1 and 1000. Here we write \(B=\halmaz{1,2,3,\ldots,1000}\text{.}\) If \(C\) is the set containing the odd integers between 1 and 99, then we have \(C=\halmaz{1,3,5,\ldots,99}\text{.}\) It is also possible to provide some families of sets, for example

    \begin{equation*} D_1=\{1\}, D_k=\halmaz{1,3,\ldots,2k-1}\text{.} \end{equation*}

    In this case \(D_k\) denotes the set containing the first \(k\) positive odd integers.

    \(k\) \(D_k\)
    1 \(\halmaz{1}\)
    2 \(\halmaz{1,3}\)
    3 \(\halmaz{1,3,5}\)
    4 \(\halmaz{1,3,5,7}\)

  • Standard sets. There are certain frequently used sets which have their own symbols. These are the set of natural numbers, the set of integers, the set of rational numbers, the set of real numbers and the set of complex numbers. \(\mathbb{N}=\halmaz{1,2,3,\ldots}\text{,}\) the set of natural numbers. \(\mathbb{Z}=\halmaz{\ldots,-2,-1,0,1,2,\ldots}\text{,}\) the set of integers. \(\mathbb{Q}\text{,}\) the set of rational numbers. \(\mathbb{R}\text{,}\) the set of real numbers. \(\mathbb{C}\text{,}\) the set of complex numbers.

  • Set-builder notation. It is also possible to define sets using the so-called set-builder notation. As an example consider the set \(D_3=\halmaz{1,3,5}\text{,}\) we can define this set in many different ways, e.g.\

    \begin{align*} \halmaz{1,3,5}\amp =\halmazvonal{a}{(a-1)(a-3)(a-5)=0},\\ \halmaz{1,3,5}\amp =\halmazvonal{a}{a=2k-1, k\in\halmaz{1,2,3}},\\ \halmaz{1,3,5}\amp =\halmazvonal{a}{1\leq a\leq 5, \mbox{ and \(a\) is odd} }\text{.} \end{align*}

    We can use semicolon instead of the vertical line, as well:

    \begin{align*} \halmaz{1,3,5}\amp =\halmazpont{a}{(a-1)(a-3)(a-5)=0},\\ \halmaz{1,3,5}\amp =\halmazpont{a}{a=2k-1, k\in\halmaz{1,2,3}},\\ \halmaz{1,3,5}\amp =\halmazpont{a}{1\leq a\leq 5, \mbox{ and \(a\) is odd} }\text{.} \end{align*}

    Let us define the set of even natural numbers:

    \begin{equation*} \halmazvonal{2n}{n\in\mathbb{N}}\text{.} \end{equation*}

    The set of rational numbers can be given as follows

    \begin{equation*} \halmazvonal{a/b}{a,b\in\mathbb{Z}, b\neq 0}\text{.} \end{equation*}

To study some basic properties of sets we give some definitions. First we introduce the concept of cardinality.

Definition1.1.1

A set is called finite if it has finite number of elements. If a set is not finite it is called infinite.

Now we consider cardinality of finite sets. The cardinality of infinite sets is more complicated and we will not discuss it.

Definition1.1.2

Let \(A\) be a finite set. The cardinality of \(A\) is the number of different elements of \(A\text{.}\) Notation: \(|A|\text{.}\)

For example, the cardinality of \(D_3\) is 3 and the cardinality of the set \(\halmaz{1,2,3,6,7,8}\) is 6.

Definition1.1.3

Let \(A\) and \(B\) be sets. The set \(B\) is a subset of \(A\) if and only if every element of \(B\) is an element of \(A\text{.}\) Notation: \(B\subseteq A\text{.}\)

There is a special set which is a subset of all sets, the so-called empty set. As the name suggests it is the set which has no element, that is, its cardinality is 0. The empty set is denoted by \(\emptyset\text{.}\)

Definition1.1.4

If \(B\subseteq A\) and \(B\neq\emptyset, B\neq A\text{,}\) then \(B\) is a proper subset of \(A\text{.}\)

Definition1.1.5

Let \(A\) and \(B\) be sets. The two sets are equal if \(A\subseteq B\) and \(B\subseteq A\text{.}\)

Now we define some basic operations of sets.

Definition1.1.6

Let \(A\) and \(B\) be sets. The intersection of \(A\) and \(B\) is the set \(\halmazvonal{x}{ x\in A \mbox{ and } x\in B}\text{.}\) Notation: \(A\cap B\text{.}\)

The so-called Venn diagrams are often useful in case of sets to understand the situation better. By shading the appropriate region we illustrate the intersection of \(A\) and \(B\text{.}\)

Let \(A=\halmaz{1,2,3,4,5}\) and \(B=\halmaz{3,4,5,6,7}\text{.}\) The intersection of these two sets is the set \(A\cap B=\halmaz{3,4,5}\text{.}\)

Definition1.1.7

Let \(A\) and \(B\) be sets. The union of \(A\) and \(B\) is the set \(\halmazvonal{x}{x\in A \mbox{ or } x\in B}\text{.}\) Notation: \(A\cup B\text{.}\)

The corresponding Venn diagram is as follows.

Let \(A=\halmaz{1,2,3,4,5}\) and \(B=\halmaz{3,4,5,6,7}\text{.}\) The union of these two sets is the set \(A\cup B=\halmaz{1,2,3,4,5,6,7}\text{.}\) It is easy to see that the following properties hold \(A\cap B=B\cap A\) and \(A\cup B=B\cup A\text{.}\) It is not true for the difference of two sets.

Definition1.1.8

Let \(A\) and \(B\) be sets. The difference of \(A\) and \(B\) is the set \(\halmazvonal{x}{ | x\in A \mbox{ and } x\notin B}\text{.}\) Notation: \(A\setminus B\text{.}\)

The Venn diagram of \(A\setminus B:\)

To see the difference between \(A\setminus B\) and \(B\setminus A\) we draw the Venn diagram of \(B\setminus A\) as well:
Again, let \(A=\halmaz{1,2,3,4,5}\) and \(B=\halmaz{3,4,5,6,7}\text{.}\) Now we have that

\begin{align*} A\setminus B \amp =\halmaz{1,2},\\ B\setminus A \amp =\halmaz{6,7}\text{.} \end{align*}

Now we introduce the symmetric difference of sets.

Definition1.1.9

Let \(A\) and \(B\) be sets. The symmetric difference of \(A\) and \(B\) is the set \((A\cup B)\setminus(A\cap B)\text{.}\) Notation: \(A\triangle B\text{.}\)

The Venn diagram of the symmetric difference of \(A\) and \(B:\)

We give an example using sets \(A=\halmaz{1,2,3,4,5}\) and \(B=\halmaz{3,4,5,6,7}\text{.}\) We obtain that

\begin{equation*} A\triangle B=\halmaz{1,2,6,7}\text{.} \end{equation*}

Finally, we define the complement of a set.

Definition1.1.10

Let \(U\) be a set (called the universe) and \(A\) is a subset of \(U\text{.}\) The complement of \(A\) consists of elements of \(U\) which do not belong to \(A\text{.}\) Notation: \(\overline{A}\text{.}\)

The corresponding Venn diagram is as follows.

As an example consider the sets \(U=\{1,2,3,4,5,6\}\) and \(A=\{1,3,5\}\text{.}\) The complement of \(A\) is the set \(\{2,4,6\}\text{.}\)

Let \(A=\halmaz{3,4,6,7,8},B=\halmaz{2,4,5,6,8}\) and \(C=\halmaz{1,2,4,5,8}\text{.}\) What are the elements of the set \((A\setminus B)\cup(C\cap B)\text{?}\)

Let \(A=\halmaz{1,3,4,6,7},B=\halmaz{2,4,5,6,8}\) and \(C=\halmaz{1,3,4,5,8}\text{.}\) What are the elements of the set \((A\cap B)\setminus(C\cap B)\text{?}\)

Let \(A=\halmaz{1,3,4,6,7},B=\halmaz{2,4,6,8}\) and \(C=\halmaz{1,3,4,8}\text{.}\) What are the elements of the set \((A\setminus B)\cup(C\setminus B)\text{?}\)

List all elements of the following sets:

(a) \(\halmazvonal{3k+1}{k\in\halmaz{2,3,4}}\text{,}\)

(b) \(\halmazvonal{k^2}{ k\in\halmaz{-1,0,1,2}}\text{,}\)

(c) \(\halmazvonal{u-v}{u\in\halmaz{3,4,5}, v\in\halmaz{1,2}}\text{.}\)

Describe the following sets using set-builder notation.

(a) \(\halmaz{2,4,6,8,10}\text{,}\)

(b) \(\halmaz{1,4,9,16,25}\text{,}\)

(c) \(\halmaz{1,\frac{1}{2},\frac{1}{4},\ldots, \frac{1}{2^k}, \ldots}\text{,}\)

(d) the set of rational numbers between 1 and 2.

Draw a Venn diagram for the following sets:

(a) \((A\cap B)\cup C\text{,}\)

(b) \((A\setminus B)\cup(A\setminus C)\text{,}\)

(c) \((A\cup B)\cap C\text{,}\)

(d) \((A\cap B)\cup(B\cap C)\cup(A\cap C)\text{,}\)

(e) \(\left((A\cap B)\setminus C\right)\cup \left((A\cap C)\setminus B\right)\cup \left((B\cap C)\setminus A\right)\text{,}\)

(f) \((A\setminus B)\cup(B\setminus C)\cup(C\setminus A)\text{.}\)

Provide three sets \(A,B\) and \(C\) which satisfy the following cardinality conditions

\begin{equation*} |A\cap B\cap C|=2\text{,} \end{equation*} \begin{equation*} |A\cap B|=|A\cap C|=|B\cap C|=2\text{,} \end{equation*} \begin{equation*} |A|=|B|=|C|=4\text{.} \end{equation*}

Provide three sets \(A,B\) and \(C\) which satisfy the following cardinality conditions

\begin{equation*} |A\cap B\cap C|=2\text{,} \end{equation*} \begin{equation*} |A\cap B|=2, |A\cap C|=2, |B\cap C|=3\text{,} \end{equation*} \begin{equation*} |A|=4, |B|=5, |C|=6\text{.} \end{equation*}