5.1 - Introduction to functions




Definition: A function is a correspondence or mapping from a first set of numbers, called the domain of the function, to a second set of numbers, called the range of the function, such that for each member of the domain there is exactly one member of the range, as shown in this picture:





The function machine concept and functional notation

It is useful to think of a function as a machine with a number from the domain as the input and a corresponding number of the range as output. The function is given a name like f (short for the word “function”), and if the number going into the machine is called x, then the corresponding number returned by or coming out of the machine is denoted f (x). Here is a picture:



The functional notation f (x) literally means “function of x”.



Ways of expressing a function

A function can be expressed in various ways:



The argument and value of a function

The value of the domain that goes into the function machine is also called the argument of the function and the value of the range that comes out of the function machine is also called the value of the function. For example suppose that f (5) = 15. Then we say that the argument of the function f is 5 and the value of f is 15.





Identifying the domain and range of a function

The domain and range of a function isn’t always the set of all real numbers. If a function is expressed in list or graph form you can identify the domain and range by simply looking at the list or graph. But if the function is expressed in formula form then you must do the following:
Example: Consider the function . The domain must be because otherwise we are trying to take the square root of a negative number. Then if we substitute various values of the domain into the formula, we see that the range is . Here is a graph of this function which corroborates our findings:





The vertical line test for a function

The definition of function states that for each member of the domain there can be only one member of the range. Thus the graph of a function cannot look like this:


where there is an x value for which there are two or more corresponding y values. If the graph does not pass this so-called vertical line test then it is not the graph of a function. Instead we say that it is the graph of a relation between x and y.




One-to-one and many-to-one functions

A function is said to be one-to-one if every y value has exactly one x value mapped onto it, and many-to-one if there are y values that have more than one x value mapped onto them. This graph shows a many-to-one function. The three dots indicate three x values that are all mapped onto the same y value.


One complication with a many-to-one function is that it can’t have an inverse function. If it could, that inverse would be one-to-many and this would violate the definition of a function.




Substituting expressions into functions

Often, especially in calculus, we use the formula form of a function and we let the argument be an expression instead of just a number. The only complication in this case is that we must usually put brackets around the argument to preserve the proper order of operations. This is because the formula is just a recipe for what to do to the input (the argument) to get the output (the function value). For example the functional notation:
f (x) = x 2 − 2 x
means that the function value is gotten by taking the square of the argument and subtracting twice the argument from it. It doesn’t actually matter what letter we use for the argument; it is how the function works that is important.

Thus the following are all valid substitutions:
Warning:   Don’t be confused by the brackets. On the left side of each example the brackets indicate functional notation. Thus:
f (whatever)
means that we have a function named f and that its argument is whatever. We are not multiplying f by whatever ! On the right side we are using brackets to preserve the order of operations.


  Algebra Coach Exercises   




Composition of functions

Just as we can substitute an expression into a function, so we can substitute another function into a function. For example in the previous section we defined the function:
f (x) = x 2 − 2 x
If we substitute another function g (x) into this function then we get:
For example if g (x) = x + 3 then:
We can also switch the order and substitute f into g, like this:
Notice that the result is completely different. If we think of f and g as machines, then substituting f into g means that the output of f is the input of g, as shown here:
The composition of functions is important because this method can be used to create complicated functions out of simple components.


  Algebra Coach Exercises   




Inverse of a function

Suppose that a function f maps x onto y and that another function g maps y back onto the original x as shown here:
Then function g is called the inverse function of function f and the composition of f and g has no overall effect. Note that function f must be one-to-one for it to have an inverse.

One way to derive the inverse function g for any function f is this:

Example: Find the inverse function g of the function f (x) = 2 x + 3.
Set f (x) equal to y

Solve for x


Rename x as g (y). This is the inverse.
Notice that function f takes its argument, multiplies it by 2 and then adds 3. The inverse function, g, does exactly the opposite steps in the opposite order. It takes its argument, first subtracts 3 and then divides by 2. This is exactly what you would expect the inverse to do.


Example: Try to find the inverse function of the function f (x) = x 2.
Set f (x) equal to y

Solve for x. There are two solutions so the inverse doesn’t exist.
Notice that f maps two points onto every point. For example f (2) = 4 and f (−2) = 4. Thus the inverse would have to map the point 4 back to both points 2 and −2. But this violates the definition of a function so there is no inverse.


  Algebra Coach Exercises