Let and be sets.
A function of to assigns one element of for each element from . This element is denoted as .
The notation indicates that is a function from to .
We call the value of the function (or short: value) of at . This is also called the image of argument under .
A function can be seen as a kind of machine. We put an element of in the machine, and on the other side of the machine an element of emerges. The machine calculates according to rule determined by .
To the right is an example of .
We can write the function as a line of numbers, namely .
This means:
A function is in fact a special type of relation, as defined in sets. A function is actually a relationship between set and . Here, an element of relates to exactly one element of . This element is denoted by .
We often denote a function using the letter , which comes from the word function. However, if we want to write a second function, we can not use the letter again, as it is already taken. We therefore often use the letter for the next function. When we want to write even more functions, we often just use the next letter in the alphabet.
It is also allowed to use, for example, letters from the Greek alphabet, such as , or . We may even use multiple letters, e.g. an abbreviation.
In general, we like to keep the name of a function as short as possible. Therefore, we will write for temperature instead of or .
Function rules can be given in the form , where is the function and is a variable abbreviating the function rule. We usually refer to as the dependent variable, because it varies according to changes of , and to as the independent variable because we can choose freely.
For instance, in the equation , we can take to be the independent variable so the equation defines a function with function rule .
The equation defines a relation between and that leads to a function. The use of dependent and independent variables makes it possible to switch the roles of and and obtain the inverse relation: we can take to be the independent variable so as to obtain the function with function rule . Now is the dependent variable. In view of relations, the function represents the inverse relation to the one defined by .
We can represent functions in different ways. One of the most common ways is the function rule.
A function rule for a function is an explicit expression to precisely show what the function does.
We write this as: , where we enter an expression with a variable replacing the dots. This algebraic expression tells us exactly what the function does.
The function rule cannot tell us which sets both and have emerged from. Often, it is implicitly clear that is a real number. We will talk more about this in the sections domain and range.
Using the function rule, we can easily calculate the value of a function of an element.
Take the function on the right. If we want to calculate the value of the function at , we follow the function rule. Notice that we replace every we encounter with . We call this substitution.
The function value of therefore equals . We denote the value of with , i.e. .
In a similar way, we find that the value of equals . In other words, .
Above, we saw that we can describe a function using a function rule of the form , in which whatever replaces the dots shows us what the function does.
Mathematicians often use the "maps to" arrow notation:
Here, too, whatever replaces the dots will tell us what the function does. The function value for an element is still denoted with . In this way, a distinction is made between the function value and the function itself.
The reason that mathematicians use the "maps to" arrow notation is partly to clearly differentiate a function, an equation, and the function value. In practice, this difference is often clear from the context. In this course we will use the shorthand notation .
In this course, we will use the notation , which is used to show us from which set to which set the function moves. The lowest examples on the right show what the official notation looks like when we also note the sets between which the function moves.
It might seem that a function rule always looks like , , or anything similar. This is not always the case.
A function can also distinguish different situations. In that case, one expression applies for certain values of , and another expression applies for other values of .
In the examples, we can see the absolute value function, which for is equal to and for equals .
That means, for example, but .
This is also a function rule, because it tells us for each number how the function value is calculated. We call a function by this form a piecewise defined function.
Examples
Absolute value function:
The absolute value function is often denoted as .
Delta function:
A function rule is often denoted using . This means the same. The advantage is that this makes the function rule shorter. One drawback is that we can now make it more difficult to distinguish between two functions.
The two function rules and clearly denote two distinctly different functions. However, when we write this as and , it seems like the means two different things.
The use of the letters and is a habit. We might as well use and . Therefore, and often have the same meaning.
We often use the letter in a function rule, but that is not mandatory. We may also use other letters. is often used when we have a function denoting time, in which case the function rule becomes:
Here, the dotted line will have an expression with .
Consider the function:
Calculate the function value at
.
The function value at
is:
To calculate the function value at
, we substitute
in the function.
We then get:
Hence, the function value at
is
.