#### Chapter 6 Elementary Functions

**Section 6.1 Basics of Functions**

# 6.1.2 Assignments between Sets

We start with a first example of a function as an assignment between two sets. For this purpose, we consider the set of natural numbers $\mathbb{N}$ and the set of rational numbers $\mathbb{Q}$, and visualise these two sets as two "containers" filled with numbers.

Now, we want to create an assignment between the elements of these two sets as follows. To every number $n\in \mathbb{N}$ half of this number $\frac{n}{2}\in \mathbb{Q}$ is assigned, i.e. to the number $1\in \mathbb{N}$ we assign the number $\frac{1}{2}\in \mathbb{Q}$, to the number $2\in \mathbb{N}$ we assign the number $1\in \mathbb{Q}$, etc. In the figure below, this is illustrated by arrows that indicate which numbers in $\mathbb{Q}$ are assigned to which numbers in $\mathbb{N}$.

For the assignment of single elements of the sets, described above in words, we use the so-called assignment arrow. This is an arrow that has a bar at its tail: $\u27fc$. It says that to the number on the side with the bar the number on the side with the arrow is assigned:

With these assignments, we have now constructed a function from the natural numbers $\mathbb{N}$ to the rational numbers $\mathbb{Q}$. In mathematics, this assignment is named, i.e. a symbol is allocated (often this is $f$ for function), that shall describe exactly this assignment. For this purpose, the sets of numbers from which and to which the assignment will be done must be noted. In our case, to the elements of the set of natural numbers $\mathbb{N}$ the rational numbers are assigned. Mathematically, this is expressed by a so-called mapping arrow $\to $, i.e. an arrow that has the target set at its head and the set, whose elements are assigned to, at its tail. Thus, in our case we have

This reads as "the function $f$ maps $\mathbb{N}$ to $\mathbb{Q}$".

Furthermore, we can now ask whether the assignments of this function, $1\u27fc\frac{1}{2},\hspace{0.5em}2\u27fc1,\hspace{0.5em}\text{etc.}$, can be described in a more compact way. To do this, we recall the beginning of this example. We decided to assign to every natural number $n$ its half $\frac{n}{2}$. So we can write this arbitrary natural number $n$ and the corresponding rational number $\frac{n}{2}$ left and right to the assignment arrow, respectively:

This reads as "$n$ is mapped to $\frac{n}{2}$". This notation is also called mapping rule of the function. Another notation for the mapping rule uses the name of the function:

This reads as "$f$ of $n$ equals $\frac{n}{2}$". Altogether we can describe this function $f$ as follows:

Finally, this reads as "the function $f$ maps $\mathbb{N}$ to $\mathbb{Q}$, each $n\in \mathbb{N}$ is mapped to $\frac{n}{2}\in \mathbb{Q}$". Throughout this module, we will continue to use this summarising notation of functions.

Let us consider a few further simple examples for functions.

##### **Example 6.1.4 **

- A function $g$ assigns to every real number $x$ its square: $x\xb7x={x}^{2}$. This results in the so-called standard parabola (see Section 6.2.6):

$g:\mathrm{\hspace{0.5em}\hspace{0.5em}}\{\begin{array}{ccc}\hfill \mathbb{R}& \hfill \to \hfill & \mathbb{R}\hfill \\ \hfill x& \hfill \u27fc\hfill & {x}^{2}\hspace{0.5em}.\hfill \end{array}$

Hence, the mapping rule of $g$ is $g(x)={x}^{2}$. Then, assignments can be calculated for specific numbers. For example, $g(2)={2}^{2}=4$ or $g(-\pi )=(-\pi {)}^{2}={\pi}^{2}$, etc.

- A function $\phi $ shall assign to every real number $y$ between $0$ and $1$ three times its value plus $1$. This is an example for a so-called linear affine function (see Section 6.2.4):

$\phi :\mathrm{\hspace{0.5em}\hspace{0.5em}}\{\begin{array}{ccc}\hfill (0;1)& \hfill \to \hfill & \mathbb{R}\hfill \\ \hfill y& \hfill \u27fc\hfill & 3y+1\hspace{0.5em}.\hfill \end{array}$

Hence, the mapping rule of $\phi $ is $\phi (y)=3y+1$. Thus, for example, $\phi (\frac{1}{3})=3\xb7\frac{1}{3}+1=2$, etc. However, in this case the values $\phi (8)$ or $\phi (1)$ cannot be calculated since $8$ and $1$ do not belong to the set $(0;1)$.

##### **Exercise 6.1.5 **

- Specify a function $h$ that assigns to every positive real number $x$ its reciprocal. Calculate the values $h(2)$ and $h(1)$. Complete the two assignments

$3\u27fc\mathrm{\hspace{0.5em}\hspace{0.5em}}\text{?}\text{and}\text{?}\mathrm{\hspace{0.5em}\hspace{0.5em}}\u27fc2$

of $h$.

- Describe in words the assignment that is done by the following function:

$w:\mathrm{\hspace{0.5em}\hspace{0.5em}}\{\begin{array}{ccc}\hfill [4;9]& \hfill \to \hfill & \mathbb{R}\hfill \\ \hfill \alpha & \hfill \u27fc\hfill & \sqrt{\alpha}\hspace{0.5em}.\hfill \end{array}$

Calculate $w(9)$ and $w(5)$. Can $w(10)$ also be calculated?

The examples above show some basic properties of functions for which we will now introduce specific terminology.

##### **Info 6.1.6 **

For the definition of a function, a set of numbers is specified whose elements are to be assigned to other numbers by the function. This set is called the

**domain**or set of definition of the function. If the function has a name, e.g. $f$, then the domain is denoted by the symbol ${D}_{f}$. For example, the domain of the function

in Exercise 6.1.5 is the set ${D}_{h}=(0;\infty )$. There is also a specific term for the elements of the domain. In this exercise, the numbers $x\in {D}_{h}$ are assigned by the mapping rule $h(x)=\frac{1}{x}$. Here, the variable $x$ is called the

**independent variable**of the function $h$.

If we consider the mapping rule $h(x)=\frac{1}{x}$ of the function, we see that there is no reason not to insert in $\frac{1}{x}$ any real number $x$, excluding the value $x=0$, since the operation "$\frac{1}{0}$" has no solution. Therefore, in specifying the domain, we can distinguish between numbers that are excluded because they are not allowed to be inserted in the mapping rule at all and those that are excluded because the function is just defined accordingly. This now leads to the term of the maximal domain of a function, i.e. the maximum subset of real numbers $\mathbb{R}$ that can be used as the domain of a function with a known mapping rule.

##### **Example 6.1.8 **

The maximum domain ${D}_{h}\subset \mathbb{R}$ of the function

$h:\mathrm{\hspace{0.5em}\hspace{0.5em}}\{\begin{array}{ccc}\hfill {D}_{h}& \hfill \to \hfill & \mathbb{R}\hfill \\ \hfill x& \hfill \u27fc\hfill & \frac{1}{x}\hspace{0.5em},\hfill \end{array}$

is ${D}_{h}=\mathbb{R}\setminus \{0\}$.

is ${D}_{h}=\mathbb{R}\setminus \{0\}$.

##### **Exercise 6.1.9 **

Find the maximum domain of the function

$w:\mathrm{\hspace{0.5em}\hspace{0.5em}}\{\begin{array}{ccc}\hfill {D}_{w}& \hfill \to \hfill & \mathbb{R}\hfill \\ \hfill \alpha & \hfill \u27fc\hfill & \sqrt{\alpha}\hspace{0.5em}.\hfill \end{array}$

For the definition of a function, a second set (beside the domain) is required, the set that is the target of the assignment by the function. This set is called target set or codomain. Let us again consider the function

in Example 6.1.4. Its target set is the set of real numbers $\mathbb{R}$. The target set of the function

in the first example of this section is the set of rational numbers $\mathbb{Q}$. Here, we see an important difference between the domain and target set of a function. The domain contains all numbers, and only those numbers, that are allowed to be inserted (and one wishes to insert) in the mapping rule of the function. However, the target set can contain all numbers that can potentially appear as a result of the mapping function.

In this context the question arises: What is the smallest target set that can be used for a function with given domain and known mapping rule? The smallest target set is the set of numbers that - for a given domain and mapping rule - indeed appear as targets of the assignment. This set is called

**range**or image, and its elements are called values of the function. For a function $f$, the symbol ${W}_{f}$ is used for the image. For the values of a function $f$ of an independent variable $x$ we write generally $f(x)\in {W}_{f}$, as in the mapping rule, or we introduce another variable, e.g. $y=f(x)\in {W}_{f}$.

##### **Example 6.1.10 **

Let us consider again the example

$\phi :\mathrm{\hspace{0.5em}\hspace{0.5em}}\{\begin{array}{ccc}\hfill (0;1)& \hfill \to \hfill & \mathbb{R}\hfill \\ \hfill y& \hfill \u27fc\hfill & 3y+1\hspace{0.5em}.\hfill \end{array}$

The range of this function is

${W}_{\phi}=(1;4)\hspace{0.5em}.$

This can be seen by inserting some values from ${D}_{\phi}=(0;1)$ in the mapping rule and calculating the results. In this way, a so-called

The range of this function is

This can be seen by inserting some values from ${D}_{\phi}=(0;1)$ in the mapping rule and calculating the results. In this way, a so-called

**table of values**is obtained:$y$ | $0.1$ | $0.3$ | $0.5$ | $0.7$ | $0.9$ |

$\phi (y)$ | $1.3$ | $1.9$ | $2.5$ | $3.1$ | $3.7$ |

Such tables of values are useful to get an overview of the values of a function. However, from a mathematical point of view, they are not sufficient to be completely sure what the actual range of a function is. One method to determine the range of a function is based on solving inequalities:

##### **Example 6.1.11 **

For the function

$\phi :\mathrm{\hspace{0.5em}\hspace{0.5em}}\{\begin{array}{ccc}\hfill (0;1)& \hfill \to \hfill & \mathbb{R}\hfill \\ \hfill y& \hfill \u27fc\hfill & 3y+1\hspace{0.5em},\hfill \end{array}$

due to the domain ${D}_{\phi}=(0;1)$ for the independent variable $y$ we have

$0<y<1\hspace{0.5em}.$

Now, we use equivalent transformations to create the mapping rule $\phi (y)=3y+1$ in this inequality:

$0<y<1\hspace{0.5em}|\xb73\iff 03y3\hspace{0.5em}|+1\iff 13y+14\iff 1\phi (y)4\hspace{0.5em}.$

Hence, we have for the values of the function $\phi (y)\in (1;4)$ and therefore ${W}_{\phi}=(1;4)$.

due to the domain ${D}_{\phi}=(0;1)$ for the independent variable $y$ we have

Now, we use equivalent transformations to create the mapping rule $\phi (y)=3y+1$ in this inequality:

Hence, we have for the values of the function $\phi (y)\in (1;4)$ and therefore ${W}_{\phi}=(1;4)$.