Relations and Functions
Find the domain and range of a relation
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 professor gets her 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.
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.
There are many similar situations where one variable is paired or matched with another. The set of ordered pairs that records this matching is a relation.
Example. For the relation :
(a) Find the domain of the relation.
(b) Find the range of the relation.
Solution.
(a) The domain is the set of all -values of the relation: .
(b) The range is the set of all -values of the relation: .
For the relation , enter the domain as a comma-separated list.
The domain is the set of all -values.For the relation , enter the range as a comma-separated list.
The range is the set of all -values.Example. Use the mapping of the relation shown to (a) list the ordered pairs of the relation, (b) find the domain of the relation, and (c) find the range of the relation.
| Name | Birthday |
|---|---|
| Alison | April 25 |
| Penelope | May 23 |
| June | August 2 |
| Gregory | September 15 |
| Geoffrey | January 12 |
| Lauren | May 10 |
| Stephen | July 24 |
| Alice | February 3 |
| Liz | August 2 |
| Danny | July 24 |
Solution. (a) The arrow shows the matching of the person to their birthday. We create ordered pairs with the person’s name as the -value and their birthday as the -value:
.
(b) The domain is the set of all -values of the relation: .
(c) The range is the set of all -values of the relation: .
In the source mapping, Khanh Nguyen is paired with which student ID number?
Trace the arrow from the named input to the one output paired with it.In the source mapping, Maria is paired with which birthday?
Trace the arrow from the named input to the one output paired with it.A graph is yet another way that a relation can be represented. The set of ordered pairs of all the points plotted is the relation. The set of all -coordinates is the domain of the relation and the set of all -coordinates is the range. Generally we write the numbers in ascending order for both the domain and range.
Example. Use the graph of the relation to (a) list the ordered pairs of the relation, (b) find the domain of the relation, and (c) find the range of the relation.
Solution. (a) The ordered pairs of the relation are .
(b) The domain is the set of all -values of the relation: . Notice that while repeats, it is only listed once.
(c) The range is the set of all -values of the relation: . Notice that while repeats, it is only listed once.
For the source graph with points , enter the domain as a comma-separated list.
List each distinct -coordinate once.For the source graph with points , enter the range as a comma-separated list in the order shown in the Answer Key.
List the -coordinates, writing repeated values only once.Determine if a relation is a function
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.
The birthday example helps us understand this definition. Every person 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 in the example is a function.
The relation shown by the graph in the previous example includes the ordered pairs and . Is that okay in a function? No, as this is like one person having two different birthdays.
Example. Use the set of ordered pairs to (i) determine whether the relation is a function, (ii) find the domain of the relation, and (iii) find the range of the relation.
(a)
(b)
Solution. (a) Each -value is matched with only one -value. So this relation is a function. The domain is . The range is ; we do not list range values twice.
(b) The -value is matched with two -values, both and . So this relation is not a function. The domain is ; we do not list domain values twice. The range is .
Is the relation a function?
A relation is a function only when every input is paired with exactly one output.Is the relation a function?
A relation is a function only when every input is paired with exactly one output.Example. Use the mapping to (a) determine whether the relation is a function, (b) find the domain of the relation, and (c) find the range of the relation.
The mapping pairs Lydia with 321-549-3327 home and 321-964-7324 cell; Eugene with 427-658-2314 cell; Janet with 427-658-2314 cell; Rick with 798-367-8541 cell; and Marty with 684-358-7961 home and 684-369-7231 cell.
Solution. (a) Both Lydia and Marty have two phone numbers. So each -value is not matched with only one -value. So this relation is not a function.
(b) The domain is .
(c) The range is .
The source mapping pairs NBC with three programs, HGTV with three programs, and HBO with three programs. Is the relation a function?
Trace the arrow from the named input to the one output paired with it.In the source phone-number mapping, Neal, Krystal, Kelvin, George, Christa, and Mike are each paired with exactly one number. Is the relation a function?
Trace the arrow from the named input to the one output paired with it.In algebra, more often than not, functions will 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.
Example. Determine whether each equation is a function. Assume is the independent variable.
(a) (b) (c)
Solution. (a) For each value of , we multiply it by and then add to get the -value. For example, if :
We have that when , then . It would work similarly for any value of . Since each value of corresponds to only one value of , the equation defines a function.
(b) For each value of , we square it and then add to get the -value. For example, if :
We have that when , then . It would work similarly for any value of . Since each value of corresponds to only one value of , the equation defines a function.
(c)
We have shown that when , then and . It would work similarly for any value of . Since each value of does not correspond to only one value of , the equation does not define a function.
Determine whether defines as a function of .
Solve for . A single output for each allowed means the equation defines a function.Determine whether defines as a function of .
Solve for . A single output for each allowed means the equation defines a function.Find the value of a function
It is very convenient to name a function and most often we name it , , , , , or . In any function, for each -value from the domain we get a corresponding -value in the range. For the function , we write this range value as . This is called function notation and is read f of x or the value of at . In this case the parentheses does not indicate multiplication.
Function notation. For the function :
- is the name of the function.
- is the domain value.
- is the range value corresponding to the value .
We read as f of x or the value of at .
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 as when you first encountered the variable , function notation may be rather unsettling. It seems strange because it is new. You will feel more comfortable with the notation as you use it. Let’s look at the equation . To find the value of when , we know to substitute into the equation and then simplify.
The value of the function at is .
We do the same thing using function notation, the equation can be written as . To find the value when , we write:
The value of the function at is . This process of finding the value of for a given value of is called evaluating the function.
Example. For the function , evaluate the function.
(a) (b) (c)
Solution.
For , evaluate .
Substitute for every , then simplify.For , evaluate .
Substitute for every ; remember to square the entire negative number.In the last example, we found for a constant value of . In the next example, we are asked to find with values of that are variables. We still follow the same procedure and substitute the variables in for the .
Example. For the function , evaluate the function.
(a) (b) (c)
Solution.
Notice the difference between parts (b) and (c). We get and . So we see that .
For , evaluate .
Substitute for .For , evaluate .
First find , then add it to .Many everyday situations can be modeled using functions.
Example. The number of unread emails in Sylvia’s account is . This number grows by unread emails a day. The function represents the relation between the number of emails, , and the time, , measured in days.
(a) Determine the independent and dependent variable.
(b) Find . Explain what this result means.
Solution. (a) The number of unread emails is a function of the number of days. The number of unread emails, , depends on the number of days, . Therefore, the variable is the dependent variable and the variable is the independent variable.
(b)
Since is the number of days, is the number of unread emails after days. After days, there are unread emails in the account.
Bryan's account has 100 unread emails and gains 15 a day, so . Find .
Substitute for and simplify.Anthony's account has 110 unread emails and gains 25 a day, so . Find .
Substitute for and simplify.Key terms
relation — any set of ordered pairs, . domain of a relation — all the -values in the ordered pairs. range of a relation — all the -values in the ordered pairs. mapping — a representation of a relation in which arrows show the pairing of the elements of the domain with the elements of the range. function — a relation that assigns to each element in its domain exactly one element in the range. function notation — for the function , is the range value corresponding to the domain value . independent variable — a variable that can be any value in the domain. dependent variable — a variable whose value depends on the independent variable.
This section is adapted from Intermediate Algebra 2e, Section 3.5: Relations and Functions by Lynn Marecek, Andrea Honeycutt Mathis, and OpenStax, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: recreated the coordinate-plane figure as an accessible interactive graph; represented mapping figures as accessible tables or complete prose; omitted the Be Prepared quiz, media links, and end-of-section exercises; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.