{{ 'ml-label-loading-course' | message }}
{{ toc.name }}
{{ toc.signature }}
{{ tocHeader }} {{ 'ml-btn-view-details' | message }}
{{ tocSubheader }}
{{ 'ml-toc-proceed-mlc' | message }}
{{ 'ml-toc-proceed-tbs' | message }}
Lesson
Exercises
Recommended
Tests
An error ocurred, try again later!
Chapter {{ article.chapter.number }}
{{ article.number }}. 

{{ article.displayTitle }}

{{ article.intro.summary }}
{{ 'ml-btn-show-less' | message }} {{ 'ml-btn-show-more' | message }} expand_more
{{ 'ml-heading-abilities-covered' | message }}
{{ ability.description }} {{ ability.displayTitle }}
{{ 'ml-heading-lesson-settings' | message }}
{{ 'ml-lesson-number-slides' | message : article.intro.bblockCount}}
{{ 'ml-lesson-number-exercises' | message : article.intro.exerciseCount}}
{{ 'ml-lesson-time-estimation' | message }}
In math, functions are special relations where each input has a unique output. This is similar to a vending machine, where pressing a button corresponds to a specific snack. A rule is at work here that associates snacks with buttons. This lesson will explore these rules and some of the relationships between numbers.

Catch-Up and Review

Here are a few recommended readings before getting started with this lesson.

Explore

Comparing Graphs of Two Relations

The diagram shows two graphs, each representing a different relation. Push the button to show a vertical line, then move the line along the graphs.
Two graphs, one is a function and the other is not a function
Consider the differences between the two graphs by answering the following questions.
  • What happens as we move the vertical line from left to right along the graphs?
  • Which graph indicates that each value is paired with a unique value?
Discussion

Function

A function is a relation in which each input is assigned to exactly one output. The set of all possible inputs is called the domain of the function and the set of all possible outputs is called the range. If represents the inputs and the outputs of a function, it is often said that is a function of or that depends on

This way of representing the dependent variable is called function notation. A function can be represented using a table, a mapping diagram, an equation, or a graph.
Representations of functions
Note that every function is a relation, but not every relation is a function. In the following applet, three different relations are analyzed to determine whether they are functions.
Three different mapping diagrams. The second one is not a function because one input has two outputs.
In Relation III, although one of the outputs corresponds to two different inputs, it is still a function because each input has exactly one output. Depending on how a relation is represented, there are different methods to determine whether or not it is a function.
Determining Whether a Relation Is a Function
If represented as Use
a set of coordinates or a table of values a mapping diagram
a graph in the coordinate plane the vertical line test
Discussion

Determining if a Relation Is a Function Using Mapping Diagrams

Given a relation, a mapping diagram can be used to determine whether the relation is a function. For example, consider the relation given by the following set of coordinates.
To figure out if a relation is a function, there are four steps to follow.
1
List the Inputs
expand_more
Start by writing all the inputs of the relation in a column. The inputs are the first components of each pair if the relation is given as a set of coordinates.
Notice that the number is an input for two different points. In the mapping diagram, it is written only once because multiple arrows can be drawn from it. Therefore, the inputs for the given relation are and
The input numbers 4, 0, -3, and 8 listed in a column.

If the relation is given as a vertical table, the inputs are the values in the first column.

2
List the Outputs
expand_more
Write all the outputs in a second column. When the relation is given as a set of coordinates, the outputs are the second components of each pair.
The number is an output for two different pairs. In the mapping diagram, it is written only once because multiple arrows can be drawn to it. For the given relation, the outputs are and
The input numbers 4, 0, -3, and 8 listed in a left column, and the corresponding output numbers 3, -5, and 0 listed in a right column.

If the relation is given as a vertical table, the outputs are the values in the second column.

3
Connect Inputs and Outputs
expand_more

Draw an arrow from each input to its corresponding output.

The input numbers 4, 0, -3, and 8 listed in a left column, and the corresponding output numbers 3, -5, and 0 listed in a right column. Pairs of inputs and corresponding outputs are shown with arrows: (4,3), (4,-5), (0,-5), (-3,3), and (8,0).
4
Look For Arrows With the Same Tail
expand_more

Check if there are multiple arrows with the same starting input. In other words, identify inputs that have multiple outputs.

The input numbers 4, 0, -3, and 8 listed in a left column, and the corresponding output numbers 3, -5, and 0 listed in a right column. Pairs of inputs and corresponding outputs are shown with arrows: (4,3), (4,-5), (0,-5), (-3,3), and (8,0). The arrows drawn from the input 4 which are (4,3) and (4,-5) are highlighted.

Here, the input has two different outputs, and By definition, for a relation to be a function, every input must be assigned to exactly one output. As such, the given relation is not a function.

Example

Visitors to Aquatic Wonders World

Kevin's teacher Maya is organizing a class trip to the Aquatic Wonders World Aquarium. She examines the aquarium's website and observes the number of visitors recorded over the past week.

Day,
Number of Visitors,

The numbers in the first row represent the days of the week, with the number indicating Monday.

a Make a mapping diagram that represents the relation.
b Is the relation a function? Explain.

Answer

a
b Yes, see solution.

Hint

a A mapping diagram consists of two parallel columns. In this case, the first column contains the numbers from to and the other includes the numbers of visitors.
b When represented as a mapping diagram, a relation is a function if only one arrow is drawn from each input.

Solution

a Recall that a mapping diagram consists of two parallel columns, one for inputs and one for outputs. In this case, the inputs are the numbers in the first row of the table, so the first column contains the numbers from to The outputs are the numbers in the second row of the table, so the other column includes the number of visitors.

Now each element in the first column can be connected to its corresponding element in the second column with an arrow.

b A relation is a function when each input is assigned to exactly one output. This means that in a relation represented as a mapping diagram, there should be only one arrow starting from each input. Here, the column on the left contains the inputs.

Notice that the same number of visitors appears on certain days, but there are no two visitor counts on a single day. In other words, each input is assigned to exactly one output. Therefore, this relation is a function.

Discussion

Vertical Line Test

The vertical line test is a graphical method to determine whether a given relation is a function. For example, consider the following relations.

Relation I Relation II Relation III
To determine whether the relations are functions, follow these two steps.
1
Draw the Relation on the Coordinate Plane
expand_more

Draw the relation on the coordinate plane. The first two relations can be drawn using a graphing calculator or other mathematical software.

Graph of the three relations: (y-2)(y+1)=x; y=x(x+1)(x-2), and x (-2.25,-2),(-1.75,0),(-1,2),(-1,-1),(0,1),(1,-0.75), and (2,0.5)
2
Draw a Vertical Line and Look at the Intersection Points
expand_more

Draw vertical lines at different places through the coordinate plane. If one of the lines intersects the graph more than once, the relation is not a function. Conversely, if no vertical line cuts the graph more than once, the relation is a function.

Different vertical lines drawn along each relation

Notice that cuts the first graph at two different points. The line also passes through two different points. This means that neither Relation I nor Relation III is a function. However, all of the vertical lines drawn over Relation II only intersect the graph one time at most. Because of this, Relation II is a function.

  • Relation I is not a function.
  • Relation II is a function.
  • Relation III is not a function.

Keep in mind that before stating whether a relation is a function, the vertical lines drawn have to cover the entire domain to ensure that no vertical line cuts the graph more than once.

Why

Intuition Behind the Method

If a relation is not a function, it is because there are multiple values corresponding to the same value. Therefore, the graph of such relation would show at least two points directly above the other.

Points with the same value belong to the same vertical line.

This is why drawing a vertical line and moving it across the graph reveals if the graph is a function or not.
Moving a vertical line across two different graphs
Note that when determining whether a relation is or is not a function, it must be assumed that the graph of a relation continues without any significant change beyond the boundaries of the coordinate plane. If this were not the case, it could never be determined from a graph whether a relation is a function.
Example

Total Number of Fish in the Aquatic Wonders World Aquarium

Maya and her students are about to start their visit. Their journey begins with a short seminar that gives cool facts about the aquarium. During the presentation, a graph that shows the fish population over the past months was presented.

Graph of a relation

However, on the screen in front of Kevin, the axes were positioned in reverse. Consider the shape of the graph. It appears quite different.

Graph of a relation
Which of the two graphs represents a function?

Hint

Use the vertical line test to determine whether the graphs represent functions.

Solution

The vertical line test can be used to determine whether each graph represents a function. This test focuses on counting how many points an imaginary vertical line crosses on the graph of a relation. Starting with the first relation, draw a vertical line and move it horizontally across the graph.
Moving a vertical line along the first graph. Every line cuts the graph at most once.
No vertical line ever intersects the graph more than once. This indicates that the first graph represents a function. Now repeat the same procedure for the second graph.
Moving a vertical line along the graph. Different vertical lines cut the graph twice or more.
Unlike the first graph, here, there is at least one vertical line that intersects the graph more than once. This graph does not represent a function.
Pop Quiz

Analyzing Relations

The following applet displays a relation as a set of ordered pairs, a group of coordinate points in the coordinate plane, or a curve in the coordinate plane. Determine whether the relation is a function or not.

random relations
Discussion

Function Notation

Function notation is a special way to write functions that explicitly shows that is a function of — in other words, that depends on Function notation is symbolically expressed as and read equals of Equations that are functions can be written using function notation.
Notice that has been replaced by In function notation, represents an element of the domain and represents the element of the range that corresponds to When written in function notation, the expression that describes how to convert an input into an output — the right-hand side expression — is called the function rule.
f(x)=-5x+4, the right-hand side expression is the function rule

Besides other letters such as or can be used to name the function. Similarly, letters other than can name the independent variable.

Extra

Interpreting Function Notation
To interpret an equation given in function notation, it is necessary to understand what both sides of mean. For example, consider the following equation.
Here, denotes that the function's input is and that is the output corresponding to this input.
Now, consider a different scenario. Let be a function that describes the number of words Kevin reads in minutes. The following statements are true for this function.
Here, is the number of words that Kevin reads in minutes and can be found by evaluating the function for However, the input is not a particular number in the second statement. In such cases, the statement can be interpreted as a question.
Based on the context, the second statement asks how many minutes it takes Kevin to read words. To find this value of the equation has to be solved for
Discussion

Domain of a Function

The domain of a function is the set of all values, or inputs, for which the function is defined. For example, consider the following functions.
Their domains can be written by analyzing the definition of each function.
Function Analysis Domain
Multiplication by is defined for all real numbers. All real numbers
Square roots are not defined for negative numbers. All non-negative numbers — that is,
Division by zero is undefined. All real numbers except — that is,
Depending on how a function is represented, its domain can be determined by using different methods.
Graph in the coordinate plane, table of values, set of coordinate pairs, and mapping diagram
The domain of a function also depends on what the function describes. For example, let be a function representing the price of apples at a market. Although the function is defined for all real numbers, it does not make sense to find the price of a negative number of apples or a fraction of an apple. Here, the domain of is all non-negative integers.
Discussion

Range of a Function

The range of a function is the set of all values, or outputs, of the function. The range of a function depends on both the domain and the function itself. For example, consider the following functions and their defined domains.

Function Domain
All integers
All real numbers
All real numbers

By analyzing the definition of each function along with the given domains, the ranges can be determined.

Function Domain Analysis Range
All integers The function takes any integer input and produces an output that is an even number, as each input is multiplied by All even numbers
All real numbers The function takes any real number input and produces an output that is a non-negative number, as each input is squared. All non-negative numbers — that is,
All real numbers The function takes any real number input and sends it to Only the number — that is, the range is
Depending on how a function is represented, its range can be determined using different methods.
Graph in the coordinate plane, table of values, set of coordinate pairs, and mapping diagram
If two different inputs have the same output, it is not necessary to repeat the output when writing the range.
Example

Exploring Functions in Vending Machines

Kevin, feeling thirsty after the seminar, buys water from a nearby vending machine. There are six types of products sold in the vending machine: orange juice, water, chocolate, donuts, sandwiches, and pizza.

Notice that the buttons on the vending machine are labeled with the first letters of the food items. When a button is pressed, the machine will give the corresponding food.

a Write a relation that represents the working principle of the machine. Is it a function?
b State the domain and range of the relation.

Answer

a Relation:

Is it a function? Yes

b Domain: C, D, O, P, S, W

Range: Chocolate, Donut, Orange Juice, Pizza, Sandwich, Water

Hint

a In the context of this problem, it would be more appropriate to illustrate the relation with a mapping diagram.
b The domain of a function consists of all the values or inputs, while the range consists of all the values or outputs. When creating sets, if there is a repeated element, it is written only once.

Solution

a A vending machine works by associating buttons with corresponding selections. The relation between buttons and snacks can be represented with a mapping diagram. In this case the buttons are labeled O, W, C, D, S and P, which form the first column of the mapping diagram. The names of the corresponding snacks form the second column.

Now each element in the first column can be connected with an arrow to its corresponding element in the second column.

Notice that each element of the input set is paired with exactly one element of the output set, so this is one-to-one mapping. Therefore, this relation is a function. This conclusion makes sense because it is not logical that pressing a button would result in two different snacks being dispensed.

b The domain of a function consists of all the values or inputs, while the range consists of all the values or outputs.
When sorted in alphabetical order, the domain and range of the function can be written as follows.
Example

Identifying Domain and Range

Maya and her students start their tour of the aquarium with a visit to the famous dolphins. The students excitedly gather around the dolphin exhibit and watch the playful animals swimming in the water.

External credits: @upklyak, @brgfx
The guide shares interesting facts about these intelligent creatures, capturing the students' attention and sparking their curiosity about the animals in the aquarium. Kevin notes this information as a set of ordered pairs.
Here, every pair of numbers represents the length of a dolphin in meters and its weight in kilograms. For example, the pair indicates that a dolphin is meters long and weighs kilograms.
a Is the relation a function?
b What is the domain of
What is the range of

Hint

a Graph the relation and use the vertical line test.
b The domain of a set of coordinate pairs is formed by all the coordinates written first, while the range is formed by all the coordinates written second. When writing sets, do not repeat elements.

Solution

a Start by graphing the ordered pairs on a coordinate plane. Then, use the vertical line test to determine if the relation represents a function.
It is stated that the first coordinates indicate the lengths of dolphins, while the second coordinates represent their weights. This means that the axis corresponds to length and the axis corresponds to weight. The points can now be plotted.
Now the vertical line test can be used to determine whether the relation represents a function. Draw a vertical line and move it horizontally across the graph.
As the vertical line moves across the graph, no two points appear on the line at the same time. This indicates that the relation is a function.
b Given a set of coordinate pairs, the domain includes all the first coordinates and the range includes all the second coordinates.
By listing the numbers from least to greatest and including each element only once, the domain and range of are as follows.
Illustration

Functions as Machines

One way to understand functions is to think of functions as machines. Inputs are like raw materials that go through the processing stage of the function. Outputs are the final product. In this applet, four preset inputs are available. The machine specifically processes numbers between and as materials. Try plugging in a few values and see the outcomes!

Machine simulating the function f(x)=x+2. Every number that enters in the machine is increased by 2.
Discussion

Independent and Dependent Variables

In the context of functions, the input is often referred to as the independent variable because it can be chosen arbitrarily from the domain. Conversely, the output is called the dependent variable because its value depends on the value of the independent variable. For instance, if the price of oranges is per pound, the total cost is determined by the product of the unit price and the weight in pounds.
As shown, the total cost of oranges depends on how many pounds of fruit are purchased. Therefore, the cost of oranges is the and the number of pounds purchased is the
Discussion

Evaluating a Function

Evaluating a function involves determining the value of the function when its independent variable is set to a specific value. This is done by substituting the given input value for the variable and evaluating the function rule. As an example, consider the value of the following function when
To evaluate a function for a particular input, there are two steps to follow.
1
Substitute the Input for
expand_more
Substitute the given input value for every instance of the independent variable in the function. In this case, is substituted for
2
Evaluate the Expression
expand_more
Next, evaluate the resulting expression by performing the required operations. The simplified value will be the output for the given input value.
As shown, when the input is the output of the function is
Example

How Much Fish Can the Dolphins Eat?

The dolphin trainer claims that the dolphin in front of him eats kilograms of fish per day.

External credits: macrovector
a Write and graph a function that relates the number of kilograms of fish that the dolphin eats in days.
b How many total kilograms of fish does the dolphin eat in days?

Answer

a Function:

Graph:

b kilograms

Hint

a The total amount of fish eaten by the dolphin is equal to the product of and the number of days. Make a table of values to graph the function.
b Substitute the given value into the function from Part A.

Solution

a The dolphin is reported to eat kilograms of fish per day, so the number of days determines how much fish the dolphin consumes. Because of this, the number of days is the independent variable and the amount of fish the dolphin consumes is the dependent variable.
Therefore, the total amount of fish eaten by the dolphin can be written as a function of It will be equal to the product of and the number of days
This equation can also be expressed using function notation. In this case, it would be appropriate to use the notation as it shows that is a function of
Next, make a table of values to help graph the function. For example, evaluate the function when is and

Now plot the ordered pairs as points in a coordinate plane.

Finally, connect the points with a line. Note that negative numbers have no meaning in the context of the problem, so the graph will only be in the first quadrant.

b To find how many kilograms of fish the dolphin eats in days, the function written in Part A can be used.
Substitute into the function and evaluate the right-hand side.
As shown, when the input is the output is In the context of the dolphin, this means that the dolphin eats kilograms of fish in days.
Discussion

Finding the Input of a Function

Given a function, it is possible to find the input that produces a certain output. This is done by substituting the given output value for the dependent variable and then solving for the independent variable. For the following function, try finding the value for which
To find the input that produces a certain output, there are two steps to follow.
1
Substitute the Output for
expand_more
Start by substituting the given output value for In this case, it means substituting for
2
Solve for
expand_more
After that, solve the resulting equation for
As shown, is equal to when
Example

Construction of New Pool in the Aquarium

The aquarium has an exhibit showing a planned expansion. The exhibit shows a model of a new pool. The walls of the pool will be meter thick on each side. The exterior of the pool will be meters long, meters wide, and meters tall.
a How much concrete will be required if the pool is designed to hold cubic meters of water?
b Following the completion of the pool construction, it was filled with water for testing. Unfortunately, due to a construction error, the pool leaks cubic meters of water per day. After how many days will there be cubic meters of water in the pool?

Hint

a The amount of concrete needed is the difference between the volumes of the outer and inner dimensions. The interior of the pool is meters long, meters wide, and meters tall. Use the volume of the pool to find Then, write a function for the amount of concrete needed.
b Let be the number of days. Write a function in terms of that shows the amount of water in the pool.

Solution

a According to the model, the exterior walls of the pool are meters long, meters wide, and meters tall. Since the wall is one meter thick, the pool inside is meters long and meters wide. The top of the pool is open, so only meter needs to be subtracted from its height. The water in the pool will be meters deep.
The volume of a prism is the product of its dimensions, so the volume of the pool can be written as a function of in this case.
Use the fact that the pool is designed to hold cubic meters of water can be used to find the value of
Solve for
The amount of concrete needed to construct the pool can also be described as a function of The amount of cement needed is the difference between the volumes of the outer and inner dimensions of the pool.
Simplify the right-hand side of the function and substitute
Simplify right-hand side
Evaluate right-hand side
The construction of the pool requires cubic meters of concrete.
b The pool has a capacity of cubic meters of water. With a leakage rate of cubic meters per day, the amount of water lost after days can be expressed as cubic meters. This means that the remaining amount of water in the pool after days is given by the following function.
To determine how many days it will take for the amount of water in the pool to drop to cubic meters, substitute into the equation and solve for
Solve for
This means that after days, there will be cubic meters of water left in the pool.
Closure

Relations to Functions

Consider the follow graph of a relation. If a vertical line is drawn between and it will intersect the graph multiple times, which means that the relation fails the vertical line test and therefore cannot be classified as a function. However, it is possible to transform the relation into a function by redefining certain characteristics, such as its domain.
Graph that is not a function but the domain can be restricted by moving x1 and x2
Now consider the graph of another relation, Its domain is all non-negative numbers and its range is all real numbers.
graph of the relation y= +- sqrt(x)
As can be seen by its graph, the relation is not a function. However, it can be transformed into a function by setting restrictions or modifying some of its characteristics. Move and to see if restricting the domain will make the relation a function.
Graph of the function y= +- sqrt(x) where the domain can be restricted by moving x1 and x2
The resulting graph cannot be transformed into a function unless its domain is restricted to only Because the graph crosses through the origin, there will be just a single output of zero when the input is zero. This is not the only way to make it function, though. What would happen if the range was restricted instead? Adjust the positions and to restrict the range.
Graph of the function y= +- sqrt(x) where the range can be restricted by moving y1 and y2
The graph becomes a function when the range is restricted to a set that includes only either non-negative or non-positive numbers.
In conclusion, when given a relation that is not a function, it is worth exploring whether restricting the domain or range of the relation can transform it into a function.