#### 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 $ℕ$ and the set of rational numbers $ℚ$, 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 ℕ$ half of this number $\frac{n}{2}\in ℚ$ is assigned, i.e. to the number $1\in ℕ$ we assign the number $\frac{1}{2}\in ℚ$, to the number $2\in ℕ$ we assign the number $1\in ℚ$, etc. In the figure below, this is illustrated by arrows that indicate which numbers in $ℚ$ are assigned to which numbers in $ℕ$.

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: $⟼$. It says that to the number on the side with the bar the number on the side with the arrow is assigned:

$ℕ\ni 1⟼0.5\in ℚ , ℕ\ni 2⟼1\in ℚ , \text{etc.}$

With these assignments, we have now constructed a function from the natural numbers $ℕ$ to the rational numbers $ℚ$. 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 $ℕ$ 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

$f:ℕ\to ℚ .$

This reads as "the function $f$ maps $ℕ$ to $ℚ$".
Furthermore, we can now ask whether the assignments of this function, $1⟼\frac{1}{2}, 2⟼1, \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:

$n⟼\frac{n}{2} .$

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:

$f\left(n\right)=\frac{n}{2} .$

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

$f:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℕ& \hfill \to \hfill & ℚ\hfill \\ \hfill n& \hfill ⟼\hfill & \frac{n}{2} .\hfill \end{array}$

Finally, this reads as "the function $f$ maps $ℕ$ to $ℚ$, each $n\in ℕ$ is mapped to $\frac{n}{2}\in ℚ$". 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·x={x}^{2}$. This results in the so-called standard parabola (see Section 6.2.6):

$g:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℝ& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & {x}^{2} .\hfill \end{array}$

Hence, the mapping rule of $g$ is $g\left(x\right)={x}^{2}$. Then, assignments can be calculated for specific numbers. For example, $g\left(2\right)={2}^{2}=4$ or $g\left(-\pi \right)=\left(-\pi {\right)}^{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{ }\left\{\begin{array}{ccc}\hfill \left(0;1\right)& \hfill \to \hfill & ℝ\hfill \\ \hfill y& \hfill ⟼\hfill & 3y+1 .\hfill \end{array}$

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

##### Exercise 6.1.5
• Specify a function $h$ that assigns to every positive real number $x$ its reciprocal. Calculate the values $h\left(2\right)$ and $h\left(1\right)$. Complete the two assignments

of $h$.
• Describe in words the assignment that is done by the following function:

$w:\mathrm{ }\left\{\begin{array}{ccc}\hfill \left[4;9\right]& \hfill \to \hfill & ℝ\hfill \\ \hfill \alpha & \hfill ⟼\hfill & \sqrt{\alpha } .\hfill \end{array}$

Calculate $w\left(9\right)$ and $w\left(5\right)$. Can $w\left(10\right)$ 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

$h:\mathrm{ }\left\{\begin{array}{ccc}\hfill \left(0;\infty \right)& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & \frac{1}{x}\hfill \end{array}$

in Exercise 6.1.5 is the set ${D}_{h}=\left(0;\infty \right)$. 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\left(x\right)=\frac{1}{x}$. Here, the variable $x$ is called the independent variable of the function $h$.

##### Exercise 6.1.7
Specify the domain of function $w$ in Exercise 6.1.5 and function $g$ in Example 6.1.4.

If we consider the mapping rule $h\left(x\right)=\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 $ℝ$ 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 ℝ$ of the function

$h:\mathrm{ }\left\{\begin{array}{ccc}\hfill {D}_{h}& \hfill \to \hfill & ℝ\hfill \\ \hfill x& \hfill ⟼\hfill & \frac{1}{x} ,\hfill \end{array}$

is ${D}_{h}=ℝ\setminus \left\{0\right\}$.

##### Exercise 6.1.9
Find the maximum domain of the function

$w:\mathrm{ }\left\{\begin{array}{ccc}\hfill {D}_{w}& \hfill \to \hfill & ℝ\hfill \\ \hfill \alpha & \hfill ⟼\hfill & \sqrt{\alpha } .\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

$\phi :\mathrm{ }\left\{\begin{array}{ccc}\hfill \left(0;1\right)& \hfill \to \hfill & ℝ\hfill \\ \hfill y& \hfill ⟼\hfill & 3y+1\hfill \end{array}$

in Example 6.1.4. Its target set is the set of real numbers $ℝ$. The target set of the function

$f:\mathrm{ }\left\{\begin{array}{ccc}\hfill ℕ& \hfill \to \hfill & ℚ\hfill \\ \hfill n& \hfill ⟼\hfill & \frac{n}{2}\hfill \end{array}$

in the first example of this section is the set of rational numbers $ℚ$. 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\left(x\right)\in {W}_{f}$, as in the mapping rule, or we introduce another variable, e.g. $y=f\left(x\right)\in {W}_{f}$.
##### Example 6.1.10
Let us consider again the example

$\phi :\mathrm{ }\left\{\begin{array}{ccc}\hfill \left(0;1\right)& \hfill \to \hfill & ℝ\hfill \\ \hfill y& \hfill ⟼\hfill & 3y+1 .\hfill \end{array}$

The range of this function is

${W}_{\phi }=\left(1;4\right) .$

This can be seen by inserting some values from ${D}_{\phi }=\left(0;1\right)$ 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 \left(y\right)$ $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{ }\left\{\begin{array}{ccc}\hfill \left(0;1\right)& \hfill \to \hfill & ℝ\hfill \\ \hfill y& \hfill ⟼\hfill & 3y+1 ,\hfill \end{array}$

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

$0

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

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