6 Functions
6.1 Introduction to Functions
6.1.1 Beginning Activity 1 (Functions from Previous Courses)
One of the most important concepts in modern mathematics is that of a function. In previous mathematics courses, we have often thought of a function as some sort of input-output rule that assigns exactly one output to each input. So in this context, a function can be thought of as a procedure for associating with each element of some set, called the domain of the function, exactly one element of another set, called the codomain of the function. This procedure can be considered an input-output rule. The function takes the input, which is an element of the domain, and produces an output, which is an element of the codomain. In calculus and precalculus, the inputs and outputs were almost always real numbers. So the notation means the following:
-
•
is the name of the function.
-
•
is a real number. It is the output of the function when the input is the real number . For example,
For this function, it is understood that the domain of the function is the set of all real numbers. In this situation, we think of the domain as the set of all possible inputs. That is, the domain is the set of all possible real numbers for which a real number output can be determined.
This is closely related to the equation . With this equation, we frequently think of as the input and as the output. In fact, we sometimes write . The key to remember is that a function must have exactly one output for each input. When we write an equation such as
we can use this equation to define as a function of . This is because when we substitute a real number for (the input), the equation produces exactly one real number for (the output). We can give this function a name, such as , and write
However, as written, an equation such as
cannot be used to define as a function of since there are real numbers that can be substituted for that will produce more than one possible value of . For example, if , then , and could be -2 or 2 .
Which of the following equations can be used to define a function with as the input and as the output?
-
1.
-
2.
-
3.
-
4.
-
5.
-
6.
-
7.
6.1.2 Beginning Activity 2 (Some Other Types of Functions)
The domain and codomain of each of the functions in Beginning Activity 1 are the set of all real numbers, or some subset of . In most of these cases, the way in which the function associates elements of the domain with elements of the codomain is by a rule determined by some mathematical expression. For example, when we say that is the function such that
then the algebraic rule that determines the output of the function when the input is is . In this case, we would say that the domain of is the set of all real numbers not equal to 1 since division by zero is not defined.
However, the concept of a function is much more general than this. The domain and codomain of a function can be any set, and the way in which a function associates elements of the domain with elements of the codomain can have many different forms. The input-output rule for a function can be a formula, a graph, a table, a random process, or a verbal description. We will explore two different examples in this activity.
-
1.
Let be the function that assigns to each person his or her birthday (month and day). The domain of the function is the set of all people and the codomain of is the set of all days in a leap year (i.e., January 1 through December 31, including February 29).
-
(a)
Explain why really is a function. We will call this the birthday function.
-
(b)
In 1995, Andrew Wiles became famous for publishing a proof of Fermat’s Last Theorem. (See A. D. Aczel, Fermat’s Last Theorem: Unlocking the Secret of an Ancient Mathematical Problem, Dell Publishing, New York, 1996.) Andrew Wiles’s birthday is April 11, 1953. Translate this fact into functional notation using the "birthday function" . That is, fill in the spaces for the following question marks:
-
(c)
Is the following statement true or false? Explain.
For each day of the year, there exists a person such that .
-
(d)
Is the following statement true or false? Explain.
For any people and , if and are different people, then .
-
(a)
-
2.
Let be the function that associates with each natural number the sum of its distinct natural number divisors. This is called the sum of the divisors function. For example, the natural number divisors of 6 are , and 6, and so
-
(a)
Calculate for each natural number from 1 through 15.
-
(b)
Does there exist a natural number such that ? Justify your conclusion.
-
(c)
Is it possible to find two different natural numbers and such that ? Explain.
-
(d)
Use your responses in (b) and (c) to determine the truth value of each of the following statements.
-
i.
For each , there exists a natural number such that .
-
ii.
For all , if , then .
-
i.
-
(a)
6.1.3 The Definition of a Function
The concept of a function is much more general than the idea of a function used in calculus or precalculus. In particular, the domain and codomain do not have to be subsets of . In addition, the way in which a function associates elements of the domain with elements of the codomain can have many different forms. This input-output rule can be a formula, a graph, a table, a random process, a computer algorithm, or a verbal description. Two such examples were introduced in Beginning Activity 2.
For the birthday function, the domain would be the set of all people and the codomain would be the set of all days in a leap year. For the sum of the divisors function, the domain is the set of natural numbers, and the codomain could also be . In both of these cases, the input-output rule was a verbal description of how to assign an element of the codomain to an element of the domain.
We formally define the concept of a function as follows:
Definition. A function from a set to a set is a rule that associates with each element of the set exactly one element of the set . A function from to is also called a mapping from to .
Function Notation. When we work with a function, we usually give it a name. The name is often a single letter, such as or . If is a function from the set to the set , we will write . This is simply shorthand notation for the fact that is a function from the set to the set . In this case, we also say that maps to .
Definition. Let . (This is read, "Let be a function from to . ") The set is called the domain of the function , and we write . The set is called the codomain of the function , and we write .
If , then the element of that is associated with is denoted by and is called the image of under . If , with , then is called a preimage of for .
Some Function Terminology with an Example. When we have a function , we often write . In this case, we consider to be an unspecified object that can be chosen from the set , and we would say that is the independent variable of the function and is the dependent variable of the function .
For a specific example, consider the function , where is defined by the formula
Note that this is indeed a function since given any input in the domain, , there is exactly one output in the codomain, . For example,
So we say that the image of -2 under is 2, the image of 5 under is 23, and so on.
Notice in this case that the number 0 in the codomain has two preimages, and . This does not violate the mathematical definition of a function since the definition only states that each input must produce one and only one output. That is, each element of the domain has exactly one image in the codomain.
Nowhere does the definition stipulate that two different inputs must produce different outputs.
Finding the preimages of an element in the codomain can sometimes be difficult. In general, if is in the codomain, to find its preimages, we need to ask, "For which values of in the domain will we have ?" For example, for the function , to find the preimages of 5, we need to find all for which . In this case, since , we can do this by solving the equation
The solutions of this equation are and . So for the function , the preimages of 5 are and . We often use set notation for this and say that the set of preimages of 5 for the function is .
Also notice that for this function, not every element in the codomain has a preimage. For example, there is no input such that . This is true since for all real numbers and hence . This means that for all in .
Finally, note that we introduced the function with the sentence, "Consider the function , where is defined by the formula ." This is one correct way to do this, but we will frequently shorten this to, "Let be defined by ", or "Let , where ."
6.1.4 Progress Check 6.1 (Images and Preimages)
Let be defined by for all , and let be defined by for all .
-
1.
Determine and .
-
2.
Determine and .
-
3.
Determine the set of all preimages of 6 for the function .
-
4.
Determine the set of all preimages of 6 for the function .
-
5.
Determine the set of all preimages of 2 for the function .
-
6.
Determine the set of all preimages of 2 for the function .
6.1.5 The Codomain and Range of a Function
Besides the domain and codomain, there is another important set associated with a function. The need for this was illustrated in the example of the function . For this function, it was noticed that there are elements in the codomain that have no preimage or, equivalently, there are elements in the codomain that are not the image of any element in the domain. The set we are talking about is the subset of the codomain consisting of all images of the elements of the domain of the function, and it is called the range of the function.
Definition. Let . The set is called the range of the function and is denoted by range (). The range of is sometimes called the image of the function (or the image of under ).
The range of could equivalently be defined as follows:
Notice that this means that range but does not necessarily mean that . Whether we have this set equality or not depends on the function . More about this will be explored in Section 6.3.
6.1.6 Progress Check 6.2 (Codomain and Range)
-
1.
Let be the function that assigns to each person his or her birthday (month and day).
-
(a)
What is the domain of this function?
-
(b)
What is a codomain for this function?
-
(c)
In Beginning Activity 2, we determined that the following statement is true: For each day of the year, there exists a person such that . What does this tell us about the range of the function ? Explain.
-
(a)
-
2.
Let be the function that associates with each natural number the sum of its distinct natural number factors.
-
(a)
What is the domain of this function?
-
(b)
What is a codomain for this function?
-
(c)
In Beginning Activity 2, we determined that the following statement is false:
-
(a)
For each , there exists a natural number such that .
Give an example of a natural number that shows this statement is false, and explain what this tells us about the range of the function .
6.1.7 The Graph of a Real Function
We will finish this section with methods to visually communicate information about two specific types of functions. The first is the familiar method of graphing functions that was a major part of some previous mathematics courses. For example, consider the function defined by .
Every point on this graph corresponds to an ordered pair () of real numbers, where . Because we use the Cartesian plane when drawing this type of graph, we can only use this type of graph when both the domain and the codomain of the function are subsets of the real numbers . Such a function is sometimes called a real function. The graph of a real function is a visual way to communicate information about the function. For example, the range of is the set of all -values that correspond to points on the graph. In this case, the graph of is a parabola and has a vertex at the point . (Note: The coordinate of the vertex can be found by using calculus and solving the equation .) Since the graph of the function is a parabola, we know that the pattern shown on the left end and the right end of the graph continues and we can
conclude that the range of is the set of all such that . That is,
6.1.8 Progress Check 6.3 (Using the Graph of a Real Function)
The graph in Figure 6.2 shows the graph of (slightly more than) two complete periods for a function , where for some positive real number constants and .
Figure 6.2: Graph of
-
1.
We can use the graph to estimate the output for various inputs. This is done by estimating the -coordinate for the point on the graph with a specified -coordinate. On the graph, draw vertical lines at and and estimate the values of and .
-
2.
Similarly, we can estimate inputs of the function that produce a specified output. This is done by estimating the -coordinates of the points on the graph that have a specified -coordinate. Draw a horizontal line at and estimate at least two values of such that .
-
3.
Use the graph in Figure 6.2 to estimate the range of the function .
6.1.9 Arrow Diagrams
Sometimes the domain and codomain of a function are small, finite sets. When this is the case, we can define a function simply by specifying the outputs for each input in the domain. For example, if we let and let , we can define a function by specifying that
This is a function since each element of the domain is mapped to exactly one element in . A convenient way to illustrate or visualize this type of function is with a so-called arrow diagram as shown in Figure 6.3. An arrow diagram can
be used when the domain and codomain of the function are finite (and small). We represent the elements of each set with points and then use arrows to show how the elements of the domain are associated with elements of the codomain. For example, the arrow from the point 2 in to the point in represents the fact that . In this case, we can use the arrow diagram in Figure 6.3 to conclude that .
6.1.10 Progress Check 6.4 (Working with Arrow Diagrams)
Let and let .
-
1.
Which of the arrow diagrams in Figure 6.4 can be used to represent a function from to ? Explain.
-
2.
For those arrow diagrams that can be used to represent a function from to , determine the range of the function.
6.1.11 Exercises 6.1
-
1.
Let be defined by .
-
(a)
Evaluate , and .
-
(a)
Determine the set of all of the preimages of 0 and the set of all of the preimages of 4.
-
(b)
Sketch a graph of the function .
-
(c)
Determine the range of the function .
-
(a)
-
2.
Let , and let be defined by .
-
(a)
Evaluate , and .
-
(b)
Determine the set of all of the preimages of 0 and the set of all preimages of 2.
-
(c)
Sketch a graph of the function .
-
(d)
Determine the range of the function .
-
(a)
-
3.
Let be defined by .
-
(a)
Evaluate , and .
-
(b)
Determine the set of all of the preimages of 5 and the set of all of the preimages of 4.
-
(c)
Determine the range of the function .
-
(d)
This function can be considered a real function since . Sketch a graph of this function. Note: The graph will be an infinite set of points that lie on a line. However, it will not be a line since its domain is not but is .
-
(a)
-
4.
Let be defined by .
-
(a)
Evaluate , and .
-
(b)
Determine the set of all of the preimages of 5 and the set of all of the preimages of 4.
-
(c)
Determine the range of the function .
-
(d)
Sketch a graph of the function . See the comments in Exercise (3d).
-
(a)
-
5.
Recall that a real function is a function whose domain and codomain are subsets of the real numbers . Most of the functions used in calculus are real functions. Quite often, a real function is given by a formula or a graph with no specific reference to the domain or the codomain. In these cases, the usual convention is to assume that the domain of the real function is the set of all real numbers for which is a real number, and that the codomain is . For example, if we define the (real) function by
we would be assuming that the domain is the set of all real numbers that are not equal to 2 and that the codomain is .
Determine the domain and range of each of the following real functions. It might help to use a graphing calculator to plot a graph of the function.
-
(a)
The function defined by
-
(b)
The function defined by
-
(c)
The function defined by
-
(d)
The function defined by
-
(e)
The function defined by
-
(a)
-
6.
The number of divisors function. Let be the function that associates with each natural number the number of its natural number divisors. That is, where is the number of natural number divisors of . For example, since , and 6 are the natural number divisors of 6.
-
(a)
Calculate for each natural number from 1 through 12.
-
(b)
Does there exist a natural number such that ? What is the set of preimages of the natural number 1?
-
(c)
Does there exist a natural number such that ? If so, determine the set of all preimages of the natural number 2.
-
(d)
Is the following statement true or false? Justify your conclusion.
For all , if , then .
-
(e)
Calculate for and for each natural number from 1 through 6.
-
(f)
Based on your work in Exercise (6e), make a conjecture for a formula for where is a nonnegative integer. Then explain why your conjecture is correct.
-
(g)
Is the following statement is true or false?
For each , there exists a natural number such that .
-
(a)
-
7.
In Exercise (6), we introduced the number of divisors function . For this function, , where is the number of natural number divisors of .
A function that is related to this function is the so-called set of divisors function. This can be defined as a function that associates with each natural number the set of its distinct natural number factors. For example, and .
-
(a)
Discuss the function by carefully stating its domain, codomain, and its rule for determining outputs.
-
(b)
Determine for at least five different values of .
-
(c)
Determine for at least three different prime number values of .
-
(d)
Does there exist a natural number such that ? Explain. [Recall that card is the number of elements in the set .]
-
(e)
Does there exist a natural number such that ? Explain.
-
(f)
Write the output for the function in terms of the output for the function . That is, write in terms of .
-
(g)
Is the following statement true or false? Justify your conclusion.
For all natural numbers and , if , then .
-
(h)
Is the following statement true or false? Justify your conclusion.
For all sets that are subsets of , there exists a natural number such that .
-
(a)
6.1.12 Explorations and Activities
-
8.
Creating Functions with Finite Domains. Let , , and . In each of the following exercises, draw an arrow diagram to represent your function when it is appropriate.
-
(a)
Create a function whose range is the set or explain why it is not possible to construct such a function.
-
(b)
Create a function whose range is the set or explain why it is not possible to construct such a function.
-
(c)
Create a function whose range is the set or explain why it is not possible to construct such a function.
-
(d)
Create a function whose range is the set or explain why it is not possible to construct such a function.
-
(e)
If possible, create a function that satisfies the following condition:
For all , if , then .
If it is not possible to create such a function, explain why. -
(f)
If possible, create a function that satisfies the following condition:
For all , if , then .
If it is not possible to create such a function, explain why.
-
(a)