5.7 Functions

Learning Objectives
After completing this section, you should be able to:
- Use function notation.
- Determine if a relation is a function with different representations.
- Apply the vertical line test.
- Determine the domain and range of a function.
In this section, we will learn about relations and functions. As we go about our daily lives, we have many data items or quantities that are paired to our names. Our social security number, student ID number, email address, phone number, and our birthday are matched to our name. There is a relationship between our name and each of those items. When your teacher gets their class roster, the names of all the students in the class are listed in one column and then the student ID number is likely to be in the next column. If we think of the correspondence as a set of ordered pairs, where the first element is a student name and the second element is that student’s ID number, we call this a relation.
(Student name, Student ID #)
The set of all the names of the students in the class is called the domain of the relation and the set of all student ID numbers paired with these students is the range of the relation. In general terms, a relation is any set of ordered pairs, (). All the -values in the ordered pairs together make up the domain. All the -values in the ordered pairs together make up the range.
There are many situations similar to the student's name and student ID # where one variable is paired or matched with another. The set of ordered pairs that records this matching is a relation. A special type of relation, called a function, occurs extensively in mathematics. A function is a relation that assigns to each element in its domain exactly one element in the range. For each ordered pair in the relation, each -value is matched with only one -value.
Let us look at the relation between your friends and their birthdays in Figure 5.54. Every friend has a birthday, but no one has two birthdays. It is okay for two people to share a birthday. It is okay that Danny and Stephen share July 24 as their birthday and that June and Liz share August 2. Since each person has exactly one birthday, the relation is a function.

Use Function Notation
It is very convenient to name a function; most often functions are named , , , , , or . In any function, for each -value from the domain, we get a corresponding -value in the range. In the function , we write this range value as (). This notation () is called function notation and is read "f of " or "the value of f at ." In this case the parentheses do not indicate multiplication.
We call the independent variable as it can be any value in the domain. We call the dependent variable as its value depends on . Much like when you first encountered the variable , function notation may be rather unsettling. But the more you use the notation, the more familiar you become with the notation, and the more comfortable you will be with it.
Let’s review the equation . To find the value of when , we know to substitute into the equation and then simplify.
| Let . |
The value of the function at is 3. We do the same thing using function notation, the equation can be written as . To find the value when , we write:
| Let . |
The value of the function at is 3. This process of finding the value of for a given value of is called evaluating the function.
Determining If a Relation Is a Function with Different Representations
We can determine whether a relation is a function by identifying the input and the output values. If each input value leads to only one output value, classify the relation as a function. If any input value leads to two or more outputs, do not classify the relation as a function.
We will review three different representations of relations and determine if they are functions: ordered pairs, mapping, and equations.
A mapping is sometimes used to show a relation. The arrows show the pairing of the elements of the domain with the elements of the range. Consider the example of the relation between your friends and their birthdays used in Figure 5.55. In this particular example, the domain is the set of people’s names, and the range is the set of their birthdays. This mapping was a function because everybody’s name maps to exactly one birthday.
In algebra functions will usually be represented by an equation. It is easiest to see if the equation is a function when it is solved for . If each value of results in only one value of , then the equation defines a function.
Applying the Vertical Line Test
We reviewed how to determine if a relation is a function. The relations we looked at were expressed as a set of ordered pairs, a mapping, or an equation. We will now cover how to tell if a graph is that of a function.
An ordered pair is a solution of a linear equation, if the equation is a true statement when the -values and -values of the ordered pair are substituted into the equation. The graph of a linear equation is a straight line where every point on the line is a solution of the equation, and every solution of this equation is a point on this line. Figure 5.56 we can see that in the graph of the equation , for every -value there is only one -value, as shown in the accompanying table.
A relation is a function if every element of the domain has exactly one value in the range. The relation defined by the equation is a function. If we look at the graph, each vertical dashed line only intersects the solid line at one point. This makes sense as in a function, for every -value there is only one -value. If the vertical line hit the graph twice, the -value would be mapped to two -values, and so the graph would not represent a function. This leads us a graphical method of determining functions called the vertical line test, which states that a set of points in a rectangular coordinate system is the graph of a function if every vertical line intersects the graph in at most one point. If any vertical line intersects the graph in more than one point, the graph does not represent a function.
Determining the Domain and Range of a Function
For the function is the independent variable as it can be any value in the domain, and is the dependent variable since its value depends on . For the function , the values of make up the domain and the values of make up the range.
Key Terms
- relation
- domain
- function
- mapping
- vertical line test
Key Concepts
- A relation is any set of ordered pairs . All of the -values of the set are the domain, and all of the -values of the set are the range.
- A relation is a function if each -value in the domain is assigned to exactly one element in the range. A -value in the range can have more than one -value assigned to it; but each -value can only be assigned to one -value.
- For the function is the name of the function, is the domain value variable, and is the range value variable.
- The vertical line test is a test that can be done on the graph of a relation to determine if it is a function.
Videos
Adapted from Contemporary Mathematics by OpenStax (openstax.org), licensed under CC BY-NC-SA 4.0. Changes were made. License: CC-BY-NC-SA-4.0.