# 1.6: Functions as Graphs

**At Grade**Created by: CK-12

## Learning Objectives

- Graph a function from a rule or table.
- Write a function rule from a graph.
- Analyze the graph of a real world situation.
- Determine whether a relation is a function.

## Introduction

We represent functions graphically by plotting points on a **coordinate plane** (also sometimes called the **Cartesian plane**). The coordinate plane is a grid formed by a horizontal number line and a vertical number line that cross at a point called the **origin**. The origin has this name because it is the “starting” location; every other point on the grid is described in terms of how far it is from the origin.

The horizontal number line is called the **\begin{align*}x-\end{align*} x−axis** and the vertical line is called the

**\begin{align*}y-\end{align*}**y− axis. We can represent each value of a function as a point on the plane by representing the \begin{align*}x-\end{align*}

We write the location of this point as (4, 2).

**Example 1**

*Plot the following coordinate points on the Cartesian plane.*

a) (5, 3)

b) (-2, 6)

c) (3, -4)

d) (-5, -7)

**Solution**

Here are all the coordinate points on the same plot.

Notice that we move to the right for a positive \begin{align*}x-\end{align*}

The \begin{align*}x-\end{align*}**quadrants**. The quadrants are numbered counter-clockwise starting from the upper right, so the plotted point for (a) is in the **first** quadrant, (b) is in the **second** quadrant, (c) is in the **fourth** quadrant, and (d) is in the **third** quadrant.

## Graph a Function From a Rule or Table

If we know a rule or have a table of values that describes a function, we can draw a graph of the function. A table of values gives us coordinate points that we can plot on the Cartesian plane.

**Example 2**

*Graph the function that has the following table of values.*

\begin{align*}& x \quad -2 \quad -1 \quad 0 \quad \ \ 1 \quad \ 2\\
& y \qquad 6 \qquad \ 8 \quad 10 \quad 12 \quad 14\end{align*}

**Solution**

The table gives us five sets of coordinate points: (-2, 6), (-1, 8), (0, 10), (1, 12), and (2, 14).

To graph the function, we plot all the coordinate points. Since we are not told the domain of the function or given a real-world context, we can just assume that the domain is the set of all real numbers. To show that the function holds for all values in the domain, we connect the points with a smooth line (which, we understand, continues infinitely in both directions).

**Example 3**

*Graph the function that has the following table of values.*

\begin{align*}& \text{Side of square} \ \quad 0 \quad 1 \quad 2 \quad 3 \quad 4\\
& \text{Area of square} \quad 0 \quad 1 \quad 4 \quad 9 \quad 16\end{align*}

The table gives us five sets of coordinate points: (0, 0), (1, 1), (2, 4), (3, 9), and (4, 16).

To graph the function, we plot all the coordinate points. Since we are not told the domain of the function, we can assume that the domain is the set of all non-negative real numbers. To show that the function holds for all values in the domain, we connect the points with a smooth curve. The curve does not make sense for negative values of the independent variable, so it stops at \begin{align*}x = 0\end{align*}, but it continues infinitely in the positive direction.

**Example 4**

*Graph the function that has the following table of values.*

\begin{align*}& \text{Number of balloons} \quad 12 \quad 13 \quad 14 \quad 15 \quad 16\\ & \text{Cost} \qquad \qquad \qquad \quad \ \ 41 \quad 44 \quad 47 \quad 50 \quad 53\end{align*}

This function represents the total cost of the balloons delivered to your house. Each balloon is $3 and the store delivers if you buy a dozen balloons or more. The delivery charge is a $5 flat fee.

**Solution**

The table gives us five sets of coordinate points: (12, 41), (13, 44), (14, 47), (15, 50), and (16, 53).

To graph the function, we plot all the coordinate points. Since the \begin{align*}x-\end{align*}values represent the number of balloons for 12 balloons or more, the domain of this function is all integers greater than or equal to 12. In this problem, the points are not connected by a line or curve because it doesn’tmake sense to have non-integer values of balloons.

In order to draw a graph of a function given the function rule, we must first make a table of values to give us a set of points to plot. Choosing good values for the table is a skill you’l develop throughout this course. When you pick values, here are some of the things you should keep in mind.

- Pick only values from the domain of the function.
- If the domain is the set of real numbers or a subset of the real numbers, the graph will be a continuous curve.
- If the domain is the set of integers of a subset of the integers, the graph will be a set of points not connected by a curve.
- Picking integer values is best because it makes calculations easier, but sometimes we need to pick other values to capture all the details of the function.
- Often we start with one set of values. Then after drawing the graph, we realize that we need to pick different values and redraw the graph.

**Example 5**

*Graph the following function: \begin{align*}f(x) = |x - 2|\end{align*}*

**Solution**

Make a table of values. Pick a variety of negative and positive values for \begin{align*}x\end{align*}. Use the function rule to find the value of \begin{align*}y\end{align*} for each value of \begin{align*}x\end{align*}. Then, graph each of the coordinate points.

\begin{align*}x\end{align*} | \begin{align*}y = f(x) = \mid x - 2 \mid\end{align*} |
---|---|

-4 | \begin{align*}\mid -4 - 2 \mid = \mid -6 \mid = 6\end{align*} |

-3 | \begin{align*}\mid -3 - 2 \mid = \mid -5 \mid = 5\end{align*} |

-2 | \begin{align*}\mid -2 - 2 \mid = \mid -4 \mid = 4\end{align*} |

-1 | \begin{align*}\mid -1 - 2 \mid = \mid -3 \mid = 3\end{align*} |

0 | \begin{align*}\mid 0 - 2 \mid = \mid -2 \mid = 2 \end{align*} |

1 | \begin{align*}\mid 1 - 2 \mid = \mid -1 \mid = 1\end{align*} |

2 | \begin{align*}\mid 2 - 2 \mid = \mid 0 \mid = 0\end{align*} |

3 | \begin{align*}\mid 3 - 2 \mid = \mid 1 \mid = 1\end{align*} |

4 | \begin{align*}\mid 4 - 2 \mid = \mid 2 \mid = 2\end{align*} |

5 | \begin{align*}\mid 5 - 2 \mid = \mid 3 \mid = 3\end{align*} |

6 | \begin{align*}\mid 6 - 2 \mid = \mid 4 \mid = 4\end{align*} |

7 | \begin{align*}\mid 7 - 2 \mid = \mid 5 \mid = 5\end{align*} |

8 | \begin{align*}\mid 8 - 2 \mid = \mid 6 \mid = 6\end{align*} |

It is wise to work with a lot of values when you begin graphing. As you learn about different types of functions, you will start to only need a few points in the table of values to create an accurate graph.

**Example 6**

*Graph the following function: \begin{align*}f(x)=\sqrt{x}\end{align*}*

**Solution**

Make a table of values. We know \begin{align*}x\end{align*} can’t be negative because we can't take the square root of a negative number. The domain is all positive real numbers, so we pick a variety of positive integer values for \begin{align*}x\end{align*}. Use the function rule to find the value of \begin{align*}y\end{align*} for each value of \begin{align*}x\end{align*}.

\begin{align*}x\end{align*} | \begin{align*}y = f(x) = \sqrt{x}\end{align*} |
---|---|

0 | \begin{align*}\sqrt{0} = 0\end{align*} |

1 | \begin{align*}\sqrt{1} = 1\end{align*} |

2 | \begin{align*}\sqrt{2} \approx 1.41\end{align*} |

3 | \begin{align*}\sqrt{3} \approx 1.73\end{align*} |

4 | \begin{align*}\sqrt{4} = 2\end{align*} |

5 | \begin{align*}\sqrt{5} \approx 2.24\end{align*} |

6 | \begin{align*}\sqrt{6} \approx 2.45\end{align*} |

7 | \begin{align*}\sqrt{7} \approx 2.65\end{align*} |

8 | \begin{align*}\sqrt{8} \approx 2.83\end{align*} |

9 | \begin{align*}\sqrt{9} = 3\end{align*} |

Note that the range is all positive real numbers.

**Example 7**

*The post office charges 41 cents to send a letter that is one ounce or less and an extra 17 cents for each additional ounce or fraction of an ounce. This rate applies to letters up to 3.5 ounces.*

**Solution**

Make a table of values. We can’t use negative numbers for \begin{align*}x\end{align*} because it doesn’t make sense to have negative weight. We pick a variety of positive values for \begin{align*}x\end{align*}, making sure to include some decimal values because prices can be decimals too. Then we use the function rule to find the value of \begin{align*}y\end{align*} for each value of \begin{align*}x\end{align*}.

\begin{align*}& x \quad 0 \quad 0.2 \quad 0.5 \quad 0.8 \quad 1 \quad 1.2 \quad 1.5 \quad 1.8 \quad 2 \quad 2.2 \quad 2.5 \quad 2.8 \quad 3 \quad 3.2 \quad 3.5\\ & y \quad 0 \quad 41 \quad \ 41 \quad \ 41 \quad 41 \quad 58 \quad 58 \quad \ 58 \quad 58 \quad 75 \quad 75 \quad \ 75 \quad 75 \quad 92 \quad 92\end{align*}

## Write a Function Rule from a Graph

Sometimes you’ll need to find the equation or rule of a function by looking at the graph of the function. Points that are on the graph can give you values of dependent and independent variables that are related to each other by the function rule. However, you must make sure that the rule works for all the points on the curve. In this course you will learn to recognize different kinds of functions and discover the rules for all of them. For now we’ll look at some simple examples and find patterns that will help us figure out how the dependent and independent variables are related.

**Example 8**

*The graph to the right shows the distance that an ant covers over time. Find the function rule that shows how distance and time are related to each other.*

**Solution**

Let’s make a table of values of several coordinate points to see if we can spot how they are related to each other.

\begin{align*}& \text{Time} \qquad \ 0 \quad \ 1 \quad \ \ 2 \quad \ 3 \quad \ 4 \quad \ 5 \quad \ 6\\ & \text{Distance} \quad 0 \quad 1.5 \quad 3 \quad 4.5 \quad 6 \quad 7.5 \quad 9\end{align*}

We can see that for every second the distance increases by 1.5 feet. We can write the function rule as

\begin{align*}\text{Distance} = 1.5 \times \text{time}\end{align*}

The equation of the function is \begin{align*}f(x) = 1.5x\end{align*}.

**Example 9**

*Find the function rule that describes the function shown in the graph.*

**Solution**

Again, we can make a table of values of several coordinate points to identify how they are related to each other.

\begin{align*}& x \quad -4 \quad -3 \quad -2 \quad -1 \quad 0 \quad 1 \quad \ 2 \quad \ 3 \quad \ 4\\ & y \qquad \ 8 \quad \ \ 4.5 \quad \ \ 2 \quad \ \ .5 \quad 0 \quad .5 \quad 5 \quad 4.5 \quad 8\end{align*}

Notice that the values of \begin{align*}y\end{align*} are half of perfect squares: 8 is half of 16 (which is 4 squared), 4.5 is half of 9 (which is 3 squared), and so on. So the equation of the function is \begin{align*}f(x) = \frac{1}{2} x^2 \end{align*}.

**Example 10**

*Find the function rule that shows the volume of a balloon at different times, based on the following graph:*

(Notice that the graph shows negative time. The negative time can represent what happened on days before you started measuring the volume.)

**Solution**

Once again, we make a table to spot the pattern:

\begin{align*}& \text{Time} \quad \ -1 \quad 0 \quad \ 1 \quad \ \ 2 \quad \ \ 3 \qquad 4 \qquad 5\\ & \text{Volume} \quad 10 \quad 5 \quad 2.5 \quad 1.2 \quad 0.6 \quad 0.3 \quad 0.15\end{align*}

We can see that every day, the volume of the balloon is half what it was the previous day. On day 0, the volume is 5; on day 1, the volume is \begin{align*}5 \times \frac{1}{2}\end{align*}; on day 2, it is \begin{align*}5 \times \frac{1}{2} \times \frac{1}{2}\end{align*}, and in general, on day \begin{align*}x\end{align*} it is \begin{align*}5 \times \left ( \frac{1}{2} \right )^x\end{align*}. The equation of the function is \begin{align*}f(x) = 5 \times \left ( \frac{1}{2} \right )^x\end{align*}.

## Determine Whether a Relation is a Function

A function is a special kind of **relation**. In a function, for each input there is exactly one output; in a relation, there can be more than one output for a given input.

Consider the relation that shows the heights of all students in a class. The domain is the set of people in the class and the range is the set of heights. This relation is a function because each person has exactly one height. If any person had more than one height, the relation would not be a function.

Notice that even though the same person can’t have more than one height, it’s okay for more than one person to have the same height. In a function, more than one input can have the same output, as long as more than one output never comes from the same input.

**Example 11**

*Determine if the relation is a function.*

a) (1, 3), (-1, -2), (3, 5), (2, 5), (3, 4)

b) (-3, 20), (-5, 25), (-1, 5), (7, 12), (9, 2)

c) \begin{align*}& x \quad 2 \quad \ \ 1 \quad \ 0 \quad 1 \quad 2\\ & y \quad 12 \quad 10 \quad 8 \quad 6 \quad 4\end{align*}

**Solution**

The easiest way to figure out if a relation is a function is to look at all the \begin{align*}x-\end{align*}values in the list or the table. If a value of \begin{align*}x\end{align*} appears more than once, and it’s paired up with different \begin{align*}y-\end{align*}values, then the relation is not a function.

a) You can see that in this relation there are two different \begin{align*}y-\end{align*}values paired with the \begin{align*}x-\end{align*}value of 3. This means that this relation is **not** a function.

b) Each value of \begin{align*}x\end{align*} has exactly one \begin{align*}y-\end{align*}value. The relation is a function.

c) In this relation there are two different \begin{align*}y-\end{align*}values paired with the \begin{align*}x-\end{align*}value of 2 and two \begin{align*}y-\end{align*}values paired with the \begin{align*}x-\end{align*}value of 1. The relation is **not** a function.

When a relation is represented graphically, we can determine if it is a function by using the **vertical line test**. If you can draw a vertical line that crosses the graph in more than one place, then the relation is not a function. Here are some examples.

Not a function. It fails the vertical line test.

A function. No vertical line will cross more than one point on the graph.

A function. No vertical line will cross more than one point on the graph.

Not a function. It fails the vertical line test.

## Additional Resources

Once you’ve had some practice graphing functions by hand, you may want to use a graphing calculator to make graphing easier. If you don’t have one, you can also use the applet at http://rechneronline.de/function-graphs/. Just type a function in the blank and press Enter. You can use the options under Display Properties to zoom in or pan around to different parts of the graph.

## Review Questions

- Plot the coordinate points on the Cartesian plane.
- (4, -4)
- (2, 7)
- (-3, -5)
- (6, 3)
- (-4, 3)

- Give the coordinates for each point in this Cartesian plane.
- Graph the function that has the following table of values. (a) \begin{align*}& x \quad -10 \quad \ -5 \quad \ 0 \quad \ 5 \quad 10\\ & y \quad \ -3 \quad -0.5 \quad 2 \quad 4.5 \quad 7\end{align*} (b) \begin{align*}& \text{Side of cube (in.)} \quad 0 \quad 1 \quad 2 \quad \ 3\\ & \text{Volume (in}^3) \qquad \ \ \ 0 \quad 1 \quad 8 \quad 27\end{align*} (c) \begin{align*}& \text{Time (hours)} \qquad \qquad \qquad \qquad \quad \ -2 \quad -1 \quad 0 \quad \ 1 \quad \ 2\\ & \text{Distance from town center (miles)} \quad 50 \quad \ 25 \quad \ 0 \quad 25 \quad 50\end{align*}
- Graph the following functions.
- Brandon is a member of a movie club. He pays a $50 annual membership and $8 per movie.
- \begin{align*}f(x) = (x - 2)^2\end{align*}
- \begin{align*}f(x) = 3.2^x\end{align*}

- Determine whether each relation is a function: (a) (1, 7), (2, 7), (3, 8), (4, 8), (5, 9) (b) (1, 1), (1, -1), (4, 2), (4, -2), (9, 3), (9, -3) (c) \begin{align*}& x \quad -4 \quad -3 \quad -2 \quad -1 \quad 0\\ & y \quad \ \ 16 \qquad 9 \qquad \ 4 \qquad 1 \quad 0\end{align*} (d) \begin{align*}& \text{Age} \qquad \qquad \qquad \qquad \qquad \quad 20 \quad 25 \quad 25 \quad 30 \quad 35\\ & \text{Number of jobs by that age} \quad 3 \quad \ 4 \quad \ 7 \quad \ \ 4 \quad \ 2\end{align*}
- Write the function rule for each graph.
- The students at a local high school took The Youth Risk Behavior Survey. The graph below shows the percentage of high school students who reported that they were current smokers. (A current smoker is anyone who has smoked one or more cigarettes in the past 30 days.) What percentage of high-school students were current smokers in the following years?
- 1991
- 1996
- 2004
- 2005

- The graph below shows the average life-span of people based on the year in which they were born. This information comes from the National Vital Statistics Report from the Center for Disease Control. What is the average life-span of a person born in the following years?
- 1940
- 1955
- 1980
- 1995

- The graph below shows the median income of an individual based on his/her number of years of education. The top curve shows the median income for males and the bottom curve shows the median income for females. (Source: US Census, 2003.) What is the median income of a male that has the following years of education?
- 10 years of education
- 17 years of education

- What is the median income of a female that has the same years of education?
- 10 years of education
- 17 years of education

- Use the vertical line test to determine whether each relation is a function.

### Notes/Highlights Having trouble? Report an issue.

Color | Highlighted Text | Notes | |
---|---|---|---|

Show More |