7.8: Graphing Functions
Introduction
Picturing Tickets and Rides
Marc and Kara have been having a terrific time at the amusement park. For them it has been a wonderful way to end their month with their Grandparents.
Think about the table from the last section. We can use this data to create a visual display of the information. This information is not necessary for Marc and Kara to have a great time at the amusement park, but let’s say that you were someone who worked at the amusement park and you were trying to figure out how to organize packs of tickets for people to purchase. If you wanted to create a group of tickets to sell, then you could figure out how many rides someone could go on for the number of tickets in the booklet.
If the person decided to go on two rides, they would need 6 tickets. If the person decided to go on 4 rides, they would need 12 tickets. You can see how the number of tickets needed is a function of the number of rides desired. Using this chart can help the managers and the amusement park design new booklets of tickets.
\begin{align*}x\end{align*} Rides | \begin{align*}y\end{align*} Tickets |
---|---|
1 | 3 |
2 | 6 |
3 | 9 |
4 | 12 |
7 | 21 |
We can create a visual display of this data. How do we do this?
This is where graphing functions is important. A graph of a function can show the relationship between the \begin{align*}x\end{align*} value and the \begin{align*}y\end{align*} value. In this lesson you will learn about graphs. We will come back to this problem at the end of the lesson.
What You Will Learn
By the end of this lesson you will be able to complete the following:
- Graph linear functions in the coordinate plane.
- Write and graph linear functions given a verbal model.
- Distinguish between linear and nonlinear functions.
- Model and solve real-world problems involving patterns of change with multiple representations of functions.
Teaching Time
I. Graph Linear Functions in the Coordinate Plane
Remember what a function is?
A function is a set of ordered pairs where one element in the domain is paired with exactly one element in the range. There is a relationship identified with a function rule between the values in the domain and the values in the range.
In this lesson, we will begin by focusing on a specific type of function called a linear function. You may notice that the word “line” is part of the word “linear”. That fact can help you remember that when a linear function is graphed on a coordinate plane, its graph will be a straight line.
You have already learned how to represent functions through a set of ordered pairs and through a table. We can also take information given as a set of ordered pairs or in a table and represent that data as a function in a graph.
How do we graph a linear function?
Let’s look at a table of values and see how we can represent the function on a coordinate grid.
Example
On a coordinate plane, graph the linear function that is represented by the ordered pairs in the table below.
\begin{align*}x\end{align*} | \begin{align*}y\end{align*} |
---|---|
-4 | 5 |
-2 | 3 |
0 | 1 |
2 | -1 |
4 | -3 |
The ordered pairs shown in the table are (–4, 5), (–2, 3), (0, 1), (2, –1) and (4, –3).
Plot those five points on the coordinate plane. Then connect them as shown below.
Notice that the graph of this function is a straight line. That is because this function is a linear function.
You can also graph a linear function if you are given an equation that represents the function. This will involve a few more steps. When you have an equation, you can use the equation to create a function table. Then plot several of the ordered pairs in the table and connect them with a line.
Example
The equation \begin{align*}y=2x-1\end{align*} represents a linear function. Graph that function on a coordinate plane.
First, use the equation to create a function table and find several ordered pairs for the function. It is a good idea to use some negative \begin{align*}x-\end{align*}values, some positive \begin{align*}x-\end{align*}values and 0. For example, you can create a table to find the values of \begin{align*}y\end{align*} when \begin{align*}x\end{align*} is equal to –2, –1, 0, 1, and 2. You may need to use what you know about computing with integers to help you find those \begin{align*}y-\end{align*}values.
\begin{align*}x\end{align*} | \begin{align*}y\end{align*} | |
---|---|---|
-2 | -5 | \begin{align*}\leftarrow 2x-1=2(-2)-1=-4-1=-4+(-1)=-5\end{align*} |
-1 | -3 | \begin{align*}\leftarrow 2x-1=2(-1)-1=-2-1=-2+(-1)=-3\end{align*} |
0 | -1 | \begin{align*}\leftarrow 2x-1=2(0)-1=0-1=0+(-1)=-1\end{align*} |
1 | 1 | \begin{align*}\leftarrow 2x-1=2(1)-1=2-1=1\end{align*} |
2 | 3 | \begin{align*}\leftarrow 2x-1=2(2)-1=4-1=3\end{align*} |
The ordered pairs shown in the table are (–2, –5), (–1, –3), (0, –1), (1, 1) and (2, 3). This is the first way to show a function by using a table.
Plot those five points on the coordinate plane. Then connect them as shown below.
This example shows three different ways to represent the same linear function. It shows how that function can be represented by an equation, \begin{align*}y=2x-1\end{align*}, by a function table and by a graph. It is important to remember that the same function can be represented in multiple ways.
II. Write and Graph Linear Functions Given a Verbal Model
We can write an equation or create a graph to represent a function if we know its rule. We can say that the writing of a rule is a verbal model. It is a function expressed in words. The values of the function might change, but the pattern of the function does not because it is represented in words.
Let's see how knowing the rule for a function can help us represent that function in two different ways––as an equation and as a graph.
Example
The rule for a linear function is: subtract 3 from each \begin{align*}x-\end{align*}value to find each \begin{align*}y-\end{align*}value.
a. Write an equation to represent this linear function.
b. Graph the function.
Consider part \begin{align*}a\end{align*} first.
According to the rule, to find each \begin{align*}y-\end{align*}value, you must subtract 3 from each \begin{align*}x-\end{align*}value. So, the equation would be:
\begin{align*}y=x-3\end{align*}.
Next, consider how to graph the function for part \begin{align*}b\end{align*}.
Now that you have an equation for the function, use that equation to create a table of values.
\begin{align*}x\end{align*} | \begin{align*}y\end{align*} | |
---|---|---|
-2 | -5 | \begin{align*}x-3=-2-3=-2+(-3)=-5\end{align*} |
-1 | -4 | \begin{align*}x-3=-1-3=-1+(-3)=-4\end{align*} |
0 | -3 | \begin{align*}x-3=0-3=0+(-3)=-3\end{align*} |
1 | -2 | \begin{align*}x-3=1-3=1+(-3)=-2\end{align*} |
2 | -1 | \begin{align*}x-3=2-3=2+(-3)=-1\end{align*} |
The ordered pairs shown in the table are (–2, –5), (–1, –4), (0, –3), (1, –2), and (2, –1).
Plot those five points on the coordinate plane. Then connect them with a straight line as shown below.
This shows how the verbal model of a function can be expressed three ways as an equation, as a table of values and in a graph.
III. Distinguish Between Linear and Non-Linear Functions
Up until this point, you have only been working with linear functions. Remember that a linear function will form a straight line when the values of the domain and the range are graphed on a coordinate grid. We can also have non-linear functions. The values of a non-linear function do not form a straight line when they are graphed on a coordinate grid.
How do we distinguish between a linear and a non-linear function?
One of the easiest ways is to look at the graphs of the functions. Look at the two graphs below and you will see the difference between the two functions.
The first graph above shows a linear function because its graph is a straight line. The second graph shows a nonlinear function. Notice that the graph of this function is not a straight line. It is curved.
A nonlinear function does not have to look exactly like the function graphed above. Any function whose graph is not a straight line is a nonlinear function.
Example
The equation \begin{align*}y=x^2\end{align*} represents a function.
a. Graph that function on a coordinate plane.
b. Is the function linear or nonlinear?
First, consider part \begin{align*}a\end{align*}.
Then use the equation to create a function table and find several ordered pairs for the function. Then you will be able to use the ordered pairs to graph the function.
You will need to use what you know about computing with integers and what you know about evaluating exponents to create the table.
\begin{align*}x\end{align*} | \begin{align*}y\end{align*} | |
---|---|---|
-2 | 4 | \begin{align*}\leftarrow y=x^2=(-2)^2=(-2) \cdot (-2)=4\end{align*} |
-1 | 1 | \begin{align*}\leftarrow y=x^2=(-1)^2=(-1) \cdot (-1)=1\end{align*} |
0 | 0 | \begin{align*}\lnot \ y=x^2=(0)^2=0 \times 0=0\end{align*} |
1 | 1 | \begin{align*}\lnot \ y=x^2=(1)^2=1 \times 1=1\end{align*} |
2 | 4 | \begin{align*}\lnot \ y=x^2=(2)^2=2 \times 2=4\end{align*} |
The ordered pairs shown in the table are (–2, 4), (–1, 1), (0, 0), (1, 1) and (2, 4).
Plot those five points on the coordinate plane. Then connect them. Notice that you cannot connect these points with a straight line. You will need to draw a curved line to connect them.
Consider part \begin{align*}b\end{align*} next.
Look at the function you graphed. The graph is curved. Since the graph is not a straight line, the equation \begin{align*}y=x^2\end{align*} represents a nonlinear function.
Now, let's turn our attention back to linear functions. Specifically, let's explore how we can use a linear function to represent a function whose rule is described in words.
IV. Model and Solve Real-World Problems Involving Patterns of Change with Multiple Representations of Functions
Linear functions can also allow us to represent real-world situations. Specifically, linear functions can help us understand situations in which two pairs of values are related by a rule.
Remember, we can represent the problem with a function table, an equation, or a graph. Representing a problem in more than one way can sometimes help us understand how to solve it.
Example
This table shows how the total cost of buying tomatoes at the farmer's market changes depending on the number of pounds of tomatoes purchased.
Number of Pounds Purchased \begin{align*}(x)\end{align*} | Total Cost in Dollars \begin{align*}(y)\end{align*} |
---|---|
1 | 2 |
2 | 4 |
3 | 6 |
4 | ? |
5 | ? |
a. Write an equation to describe the relationship between the pairs of values in the table above.
b. Create a graph to represent the relationship between the number of pounds of tomatoes purchased, \begin{align*}x\end{align*}, and the total cost, \begin{align*}y\end{align*}.
c. Determine the cost of buying 5 pounds of tomatoes at the farmer's market.
Consider part \begin{align*}a\end{align*} first.
Use guess and check to determine how to each pair of values is related.
For example, notice that each \begin{align*}y-\end{align*}value is greater than its corresponding \begin{align*}x-\end{align*}value. So, the rule will involve either addition or multiplication.
Since each \begin{align*}y-\end{align*}value in the table is 2 more than its previous \begin{align*}y-\end{align*}value, the rule may involve multiplying by 2.
Look for a rule that involves multiplying by 2.
Consider the ordered pair (1, 2).
\begin{align*}1 \times 2=2\end{align*}, so the rule could be to multiply each \begin{align*}x-\end{align*}value by 2 to find its corresponding \begin{align*}y-\end{align*}value. Check to see if that rule works for the other pairs of values in the table.
Consider the ordered pair (2, 4).
\begin{align*}2 \times 2=4\end{align*}, so the rule works for that ordered pair.
Consider the ordered pair (3, 6).
\begin{align*}3 \times 2=6\end{align*}, so the rule works for that ordered pair.
So, the rule for this function table is: multiply each \begin{align*}x-\end{align*}value by 2 to find its corresponding \begin{align*}y-\end{align*}value.
Now that we have a rule in words, let's write an equation to show the same relationship. Remember, to find each \begin{align*}y-\end{align*}value, you must multiply each \begin{align*}x-\end{align*}value by 2. So, the equation would be \begin{align*}y=2x\end{align*}
Next, consider part \begin{align*}b\end{align*}.
First, let's consider how the graph for this function should look. We should use the horizontal axis to show the number of pounds, \begin{align*}x\end{align*}.
We should use the vertical axis to show the total cost, \begin{align*}y\end{align*}, in dollars.
Consider how to number the axes. The \begin{align*}x-\end{align*}values represent the number of pounds of tomatoes purchased. Since no one can buy a negative number of pounds of tomatoes, the graph should only show \begin{align*}x-\end{align*}values that are greater than or equal to 0. So, we can number each axis starting from 0. The greatest \begin{align*}x-\end{align*}value we must show is 3. The greatest \begin{align*}y-\end{align*}value we must show is 6. So, the numbers on the vertical axis must go up to at least 6. Let's allow some room for the graph to be extended and number each axis from 0 to 10.
Next, we can plot the ordered pairs (1, 2), (2, 4) and (3, 6) and draw a line through them to create our graph. We can plot these values because they are the known values from the table.
The graph above represents the relationship between the number of pounds of tomatoes purchased, \begin{align*}x\end{align*}, and the total cost, \begin{align*}y\end{align*}.
Finally, consider part \begin{align*}c\end{align*}.
One strategy for determining the total cost, \begin{align*}y\end{align*}, of buying 5 pounds of tomatoes is to use the equation. We can substitute 5 for \begin{align*}x\end{align*} and then solve to find the value of \begin{align*}y\end{align*}.
\begin{align*}y &= 2x\\ y &= 2 \times 5\\ y &= 10\end{align*}
When \begin{align*}x = 5, y = 10\end{align*}. So, it would cost 10 dollars to buy 5 pounds of tomatoes.
Now let’s go back to the problem in the introduction and use what we have learned to solve this problem.
Real Life Example Completed
Picturing Tickets and Rides
Here is the original problem once again. Reread it and look at the graph at the end of it. Notice how the data from the table is represented in a visual way.
Marc and Kara have been having a terrific time at the amusement park. For them it has been a wonderful way to end their month with their Grandparents.
Think about the table from the last section. We can use this data to create a visual display of the information. This information is not necessary for Marc and Kara to have a great time at the amusement park, but let’s say that you were someone who worked at the amusement park and you were trying to figure out how to organize packs of tickets for people to purchase. If you wanted to create a group of tickets to sell, then you could figure out how many rides someone could go on for the number of tickets in the booklet.
If the person decided to go on two rides, they would need 6 tickets. If the person decided to go on 4 rides, they would need 12 tickets. You can see how the number of tickets needed is a function of the number of rides desired. Using this chart can help the managers and the amusement park design new booklets of tickets.
\begin{align*}x\end{align*} Rides | \begin{align*}y\end{align*} Tickets |
---|---|
1 | 3 |
2 | 6 |
3 | 9 |
4 | 12 |
7 | 21 |
We can create a visual display of this data. How do we do this?
Here is a graph representing the data from the table.
Notice that this is a linear graph showing the relationship between rides and tickets.
Vocabulary
Here are the vocabulary words that are found in this lesson.
- Function
- A pattern where one element of the domain is paired with exactly one element of the range.
- Function Rule
- the pattern rule for a function.
- Linear Function
- a function that forms a straight line when graphed
- Non-Linear Function
- a function that does not form a straight line when graphed
Technology Integration
Khan Academy Functions as Graphs
James Sousa, Graph a Linear Function Using a Table of Values
Time to Practice
Directions: State if each graph shows a linear function or a nonlinear function.
1.
2.
3.
4. The table of ordered pairs below represents a function.
\begin{align*}x\end{align*} | \begin{align*}y\end{align*} |
---|---|
-3 | 2 |
-1 | 0 |
1 | -2 |
3 | -4 |
5 | -6 |
a. Plot those points on the coordinate plane below. Then connect those points to create the graph for this function.
b. Is the function you graphed a linear function or a nonlinear function?
5. The equation \begin{align*}y=\frac{x}{2}+4\end{align*} represents a function.
a. Complete the function table below to identify five ordered pairs for this function.
\begin{align*}x\end{align*} | \begin{align*}y\end{align*} |
---|---|
-4 | |
-2 | |
0 | |
2 | |
4 |
b. Plot those points on the coordinate plane below. Then connect those points to create the graph for this function.
c. Is the function you graphed a linear function or a nonlinear function?
6. The equation \begin{align*}y=x^2+2\end{align*} represents a function.
a. Complete the function table below to identify five ordered pairs for this function.
\begin{align*}x\end{align*} | \begin{align*}y\end{align*} |
---|---|
-2 | |
-1 | |
0 | |
1 | |
2 |
b. Plot those points on the coordinate plane below. Then connect those points to create the graph for this function.
c. Is the function you graphed a linear function or a nonlinear function?
7. The rule for a linear function is: add 1 to each \begin{align*}x-\end{align*}value to find each \begin{align*}y-\end{align*}value.
a. Write an equation to represent this linear function.
b. Graph the function on this coordinate plane.
8. The rule for a linear function is: multiply each \begin{align*}x-\end{align*}value by 2 and then subtract 2 to find each \begin{align*}y-\end{align*}value.
a. Write an equation to represent this linear function.
b. Graph the function on this coordinate plane.
9. This table shows how the total cost of buying gasoline at Gary's Gas Station changes depending on the number of gallons purchased.
Number of Gallons Purchased \begin{align*}(x)\end{align*} | Total Cost in Dollars \begin{align*}(y)\end{align*} |
---|---|
0 | 0 |
1 | 3 |
2 | 6 |
3 | ? |
a. Write an equation to describe the relationship between the pairs of values in the table above.
b. Create a graph to represent the relationship between the number of gallons purchased, \begin{align*}x\end{align*}, and the total cost, \begin{align*}y\end{align*}. Use the blank axes below to create your graph.
c. Determine the cost of buying 3 gallons of gasoline at Gary's Gas Station.
10. Franklin has a $10 bus card. Each time he rides the bus, $2 is deducted from his card. This equation shows the relationship between \begin{align*}x\end{align*}, the number of times he uses his card to ride the bus, and \begin{align*}y\end{align*}, the number of dollars that are left on his card:
\begin{align*}y=10-2x\end{align*}.
a. Create a table to show how many dollars will be left on Franklin's bus card after he has used it for a total of 0, 1, 2, or 3 bus rides.
b. Create a graph to represent the relationship between the total number of bus rides Franklin uses the card to take, \begin{align*}x\end{align*}, and the number of dollars left on the card, \begin{align*}y\end{align*}. Use the blank axes below to create your graph.
c. If Franklin takes a total of 4 bus rides, how many dollars will be left on his bus card?
Notes/Highlights Having trouble? Report an issue.
Color | Highlighted Text | Notes | |
---|---|---|---|
Please Sign In to create your own Highlights / Notes | |||
Show More |