# 3.7: Introduction to Functions

- Page ID
- 24100

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

Learning Objectives

- Identify a function.
- State the domain and range of a function.
- Use function notation.

## Relations, Functions, Domain, and Range

Relationships between sets occur often in everyday life. For example, for each month in Cape Canaveral, we can associate an average amount of rainfall. In this case, the amount of precipitation depends on the month of the year, and the data can be written in tabular form or as a set of ordered pairs.

Month |
Precipitation |
Ordered pairs |
---|---|---|

January | 2.4 in | (January, 2.4) |

February | 3.3 in | (February, 3.3) |

March | 3.1 in | (March, 3.1) |

April | 2.0 in | (April, 2.0) |

May | 3.8 in | (May, 3.8) |

June | 6.8 in | (June, 6.8) |

July | 8.1 in | (July, 8.1) |

August | 7.6 in | (August, 7.6) |

September | 7.3 in | (September, 7.3) |

October | 4.1 in | (October, 4.1) |

November | 3.3 in | (November, 3.3) |

December | 2.4 in | (December, 2.4) |

*Table 3.7.1*

We define a relation as any set of ordered pairs. Usually we write the independent component of the relation in the first column and the dependent component in the second column. In the opening example, notice that it makes sense to relate the average amount of precipitation as dependent on the month of year. The set of all elements in the first column of a relation is called the domain. The set of all elements that compose the second column is called the range. In this example, the domain consists of the set of all months of the year, and the range consists of the values that represent the average rainfall for each month.

In the context of algebra, the relations of interest are sets of ordered pairs \((x, y)\) in the rectangular coordinate plane. In this case, the \(x\)-values define the domain and the \(y\)-values define the range. Of special interest are relations where every \(x\)-value corresponds to exactly one \(y\)-value; these relations are called functions.

Example \(\PageIndex{1}\)

Determine the domain and range of the following relation and state whether or not it is a function:

\(\{(−1, 4), (0, 7), (2, 3), (3, 3), (4, −2)\}\)

**Solution**:

Here we separate the domain and range and depict the correspondence between the values with arrows.

*Figure 3.7.1*

**Answer**:

The domain is \(\{−1, 0, 2, 3, 4\}\), and the range is \(\{−2, 3, 4, 7\}\). The relation is a function because each \(x\)-value corresponds to exactly one \(y\)-value.

Example \(\PageIndex{2}\)

Determine the domain and range of the following relation and state whether or not it is a function:

\(\{(−4, −3), (−2, 6), (0, 3), (3, 5), (3, 7)\}\).

**Solution**:

*Figure 3.7.2*

**Answer**:

The domain is \(\{−4, −2, 0, 3\}\), and the range is \(\{−3, 3, 5, 6, 7\}\). This relation is not a function because the \(x\)-value \(3\) has two corresponding \(y\)-values.

In the previous example, the relation is not a function because it contains ordered pairs with the same \(x\)-value, \((3, 5)\) and \((3, 7)\). We can recognize functions as relations where no \(x\)-values are repeated.

In algebra, equations such as \(y=\frac{3}{4}x−2\) define relations. This linear equation can be graphed as follows:

*Figure 3.7.3*

The graph is a relation since it represents the infinite set of ordered pair solutions to \(y=\frac{3}{4}x−2\). The domain is the set of all \(x\)-values, and in this case consists of all real numbers. The range is the set of all possible \(y\)-values, and in this case also consists of all real numbers. Furthermore, the graph is a function because for each \(x\)-value there is only one corresponding \(y\)-value. In fact, any nonvertical or nonhorizontal line is a function with domain and range consisting of all real numbers.

Any graph is a set of ordered pairs and thus defines a relation. Consider the following graph of a circle:

*Figure 3.7.4*

Here the graph represents a relation where many \(x\)-values in the domain correspond to two y-values. If we draw a vertical line, as illustrated, we can see that \((3, 2)\) and \((3, −2)\) are two ordered pairs with the same \(x\)-value. Therefore, the \(x\)-value \(3\) corresponds to two \(y\)-values; hence the graph does not represent a function. The illustration suggests that if any vertical line intersects a graph more than once, then the graph does not represent a function. This is called the vertical line test.

Example \(\PageIndex{3}\)

Given the following graph, determine the domain and range and state whether or not it is a function.

*Figure 3.7.5*

**Solution**:

The given shape is called a parabola and extends indefinitely to the left and right as indicated by the arrows. This suggests that if we choose any \(x\)-value, then we will be able to find a corresponding point on the graph; therefore, the domain consists of all real numbers. Furthermore, the graph shows that \(−1\) is the minimum \(y\)-value, and any \(y\)-value greater than that is represented in the relation. Hence the range consists of all \(y\)-values greater than or equal to \(−1\), or in interval notation, \([−1, ∞)\).

*Figure 3.7.6*

Lastly, any vertical line will intersect the graph only once; therefore, it is a function.

**Answer**:

The domain is all real numbers \(R = (−∞, ∞)\), and the range is \([−1, ∞)\). The graph represents a function because it passes the vertical line test.

Exercise \(\PageIndex{1}\)

Given the graph, determine the domain and range and state whether or not it is a function:

*Figure 3.7.7*

**Answer**-
Domain: \([−4, ∞)\); range: \((−∞, ∞)\); function: no

## Function Notation and Linear Functions

With the definition of a function comes special notation. If we consider each \(x\)-value to be the input that produces exactly one output, then we can use the notation

\[f(x)=y\]

The notation \(f(x)\) reads “\(f\) of \(x\)” and should not be confused with multiplication. Most of our study of algebra involves functions, so the notation becomes very useful when performing common tasks. Functions can be named with different letters; some common names for functions are \(g(x), h(x), C(x)\), and \(R(x)\). First, consider nonvertical lines that we know can be expressed using slope-intercept form, \(y=mx+b\). For any real numbers \(m\) and \(b\), the equation defines a function, and we can replace \(y\) with the new notation \(f(x)\) as follows:

\[y=mx+b\]

\[f(x)=mx+b\]

Therefore, a linear function is any function that can be written in the form \(f(x)=mx+b\). In particular, we can write the following:

\(\begin{aligned} y&=\frac{3}{4}x-2 \\ f(x)&=\frac{3}{4}x-2 \end{aligned}\)

The notation also shows values to evaluate in the equation. If the value for \(x\) is given as \(8\), then we know that we can find the corresponding \(y\)-value by substituting \(8\) in for \(x\) and simplifying. Using function notation, this is denoted \(f(8)\) and can be interpreted as follows:

\(\begin{aligned} f(x)&=\frac{3}{4}x-2 \\ f(\color{Cerulean}{8}\color{black}{)}&=\frac{3}{4}(\color{Cerulean}{8}\color{black}{)-2} \end{aligned}\)

Finally, simplify:

\(\begin{aligned} f(8)&=\frac{3}{4}(8)-2 \\ &=3\cdot 2-2\\&=6-2 \\ &=4 \end{aligned}\)

We have \(f(8)=4\). This notation tells us that when \(x = 8\) (* the input*), the function results in \(4\) (

*).*

**the output**Example \(\PageIndex{4}\)

Given the linear function \(f(x)=−5x+7\), find \(f(−2)\).

**Solution**:

In this case, \(f(−2)\) indicates that we should evaluate when \(x=−2\).

\(\begin{aligned} f(x)&=-5x+7 \\ f(\color{OliveGreen}{-2}\color{black}{)}&=-5(\color{OliveGreen}{-2}\color{black}{)+7} &\color{Cerulean}{Replace\:x\:with\:-2.} \\ &=10+7 \\ &=17 \end{aligned}\)

**Answer**:

\(f(-2)=17\)

Example \(\PageIndex{5}\)

Given the linear function \(f(x)=−5x+7\), find \(x\) when \(f(x)=10\).

**Solution**:

In this case, \(f(x)=10\) indicates that the function should be set equal to \(10\).

\(\begin{aligned} f(x)&=-5x+7 \\ \color{OliveGreen}{10}&=-5x+7 &\color{Cerulean}{Replace\:f(x)\:with\:10.} \\ 10\color{Cerulean}{-7}&=-5x+7\color{Cerulean}{-7}&\color{Cerulean}{Solve\:for\:x.} \\ 3&=-5x\\ \frac{3}{\color{Cerulean}{-5}}&=\frac{-5x}{\color{Cerulean}{-5}} -\frac{3}{5}&=x \end{aligned}\)

**Answer**:

Here \(x=−\frac{3}{5}\), and we can write \(f(−\frac{3}{5})=10\).

Example \(\PageIndex{6}\)

Given the graph of a linear function \(g(x)\),

- Find \(g(2)\).
- Find \(x\) when \(g(x)=3\).

*Figure 3.7.8*

**Solution**:

a. The notation \(g(2)\) implies that \(x = 2\). Use the graph to determine the corresponding \(y\)-value.

*Figure 3.7.9*

b. The notation \(g(x)=3\) implies that the \(y\)-value is given as \(3\). Use the graph to determine the corresponding \(x\)-value.

*Figure 3.7.10*

**Answer**:

- \(g(2)=1\)
- \(x=4\)

Example \(\PageIndex{7}\)

Graph the linear function \(f(x)=−\frac{5}{3}x+6\) and state the domain and range.

**Solution**:

From the function, we see that \(b = 6\) and thus the \(y\)-intercept is \((0, 6)\). Also, we can see that the slope is \(m=\frac{−5}{3}=−\frac{5}{3}=\frac{rise}{run}\). Starting from the \(y\)-intercept, mark a second point down \(5\) units and right \(3\) units.

*Figure 3.7.11*

Given any coordinate on the \(x\)-axis, we can find a corresponding point on the graph; the domain consists of all real numbers. Also, for any coordinate on the \(y\)-axis, we can find a point on the graph; the range consists of all real numbers.

**Answer**:

Both the domain and range consist of all real numbers \(R\).

Exercise \(\PageIndex{2}\)

Given the linear function \(g(x)=−x+5\),

- Find \(g(-\frac{1}{2})\).
- Find \(x\) when \(g(x)=18\).

**Answer**-
a. \(g(-\frac{1}{2})=\frac{1}{12}\)

b. \(x=-13\)

## Key Takeaways

- A relation is any set of ordered pairs. However, in the context of this course, we will be working with sets of ordered pairs \((x, y)\) in the rectangular coordinate system. The set of \(x\)-values defines the domain and the set of \(y\)-values defines the range.
- Special relations where every \(x\)-value (
*input*) corresponds to exactly one \(y\)-value (*output*) are called functions. - We can easily determine whether an equation represents a function by performing the vertical line test on its graph. If any vertical line intersects the graph more than once, then the graph does not represent a function. In this case, there will be more than one point with the same \(x\)-value.
- Any nonvertical or nonhorizontal line is a function and can be written using function notation \(f(x)=mx+b\). Both the domain and range consist of all real numbers.
- If asked to find \(f(a)\), we substitute \(a\) in for the variable and then simplify.
- If asked to find \(x\) when \(f(x)=a\), we set the function equal to \(a\) and then solve for \(x\).

Exercise \(\PageIndex{3}\) Functions

For each problem below, does the correspondence represent a function?

- Algebra students to their scores on the first exam.
- Family members to their ages.
- Lab computers to their users.
- Students to the schools they have attended.
- People to their citizenships.
- Local businesses to their number of employees.

**Answer**-
1. Yes

3. No

5. No

Exercise \(\PageIndex{4}\) Functions

Determine the domain and range and state whether the relation is a function or not.

- \(\{(3, 2), (5, 3), (7, 4)\}\)
- \(\{(−5, −3), (0, 0), (5, 0)\}\)
- \(\{(−10, 2), (−8, 1), (−8, 0)\}\)
- \(\{(9, 12), (6, 6), (6, 3)\}\)

5.

*Figure 3.7.12*

6.

*Figure 3.7.13*

7.

*Figure 3.7.1**4*

8.

*Figure 3.7.15*

9.

*Figure 3.7.16*

10.

*Figure 3.7.17*

11.

*Figure 3.7.18*

12.

*Figure 3.7.19*

13.

*Figure 3.7.20*

14.

*Figure 3.7.21*

15.

*Figure 3.7.22*

16.

*Figure 3.7.23*

17.

*Figure 3.7.24*

18.

*Figure 3.7.25*

19.

*Figure 3.7.26*

20.

*Figure 3.7.27*

**Answer**-
1. Domain: \(\{3, 5, 7\}\); range: \(\{2, 3, 4\}\); function: yes

3. Domain: \(\{−10,−8\}\); range: \(\{0, 1, 2\}\); function: no

5. Domain: \(\{−4, −1, 2\}\); range: \(\{1, 2, 3\}\); function: yes

7. Domain: \(\{−2, 2\}\); range: \(\{2, 3, 5\}\); function: no

9. Domain: \((−∞, ∞)\); range: \(\{2\}\); function: yes

11. Domain: \((−∞, ∞)\); range: \((−∞, ∞)\); function: yes

13. Domain: \([−2, ∞)\); range: \((−∞, ∞)\); function: no

15. Domain: \([−4, ∞)\); range: \([0, ∞)\); function: yes

17. Domain: \((−∞, ∞)\); range: \([0, ∞)\); function: yes

19. Domain: \((−∞, ∞)\); range: \([2, ∞)\); function: yes

Exercise \(\PageIndex{5}\) Function Notation

Given the following functions, find the function values.

- \(f(x)=3x\), find \(f(−2)\).
- \(f(x)=−5x+1\), find \(f(−1)\).
- \(f(x)=\frac{3}{5}x−4\), find \(f(15)\).
- \(f(x)=\frac{2}{5}x−\frac{1}{5}\), find \(f(3)\).
- \(f(x)=\frac{5}{2}x−\frac{1}{3}\), find \(f(−\frac{1}{3})\).
- \(f(x)=−6\), find \(f(7)\).
- \(g(x)=5\), find \(g(−4)\).
- \(g(x)=−5x\), find \(g(−3)\).
- \(g(x)=−\frac{1}{8}x+\frac{5}{8}\), find \(g(\frac{5}{8})\).
- \(g(x)=\frac{5}{3}x−5\), find \(g(3)\).
- \(f(x)=5x−9\), find \(x\) when \(f(x)=1\).
- \(f(x)=−7x+2\), find \(x\) when \(f(x)=0\).
- \(f(x)=−\frac{7}{5}x−2\), find \(x\) when \(f(x)=−9\).
- \(f(x)=−x−4\), find \(x\) when \(f(x)=12\).
- \(g(x)=x\), find \(x\) when \(g(x)=12\).
- \(g(x)=−x+1\), find \(x\) when \(g(x)=\frac{2}{3}\).
- \(g(x)=−5x+\frac{1}{3}\), find \(x\) when \(g(x)=−\frac{1}{2}\).
- \(g(x)=−\frac{5}{8}x+3\), find \(x\) when \(g(x)=3\).

**Answer**-
1. \(f(−2)=−6\)

3. \(f(15)=5\)

5. \(f(−\frac{1}{3})=−\frac{7}{6}\)

7. \(g(−4)=5\)

9. \(g(\frac{5}{8})=\frac{35}{64}\)

11. \(x=2\)

13. \(x=5\)

15. \(x=12\)

17. \(x=\frac{1}{6}\)

Exercise \(\PageIndex{6}\) Function Notation

Given \(f(x)=\frac{2}{3}x−1\) and \(g(x)=−3x+2\) calculate the following.

- \(f(6)\)
- \(f(−\frac{1}{2})\)
- \(f(0)\)
- \(f(1)\)
- \(g(\frac{2}{3})\)
- \(g(0)\)
- \(g(−1)\)
- \(g(−\frac{1}{2})\)
- Find \(x\) when \(f(x)=0\).
- Find \(x\) when \(f(x)=−3\).
- Find \(x\) when \(g(x)=−1\).
- Find \(x\) when \(g(x)=0\).

**Answer**-
1. \(f(6)=3\)

3. \(f(0)=−1\)

5. \(g(\frac{2}{3})=0\)

7. \(g(−1)=5\)

9. \(x=\frac{3}{2}\)

11. \(x=1\)

Exercise \(\PageIndex{7}\) Function Notation

Given the graph, find the function values.

1. Given the graph of \(f(x)\), find \(f(−4), f(−1), f(0),\) and \(f(2)\).

*Figure 3.7.28*

2. Given the graph of \(g(x)\), find \(g(−3), g(−1), g(0),\) and \(g(1)\).

*Figure 3.7.29*

3. Given the graph of \(f(x)\), find \(f(−4), f(−1), f(0),\) and \(f(2)\).

*Figure 3.7.30*

4. Given the graph of \(g(x)\), find \(g(−4), g(−1), g(0)\), and \(g(2)\).

*Figure 3.7.31*

5. Given the graph of \(f(x)\), find \(f(−1), f(0), f(1)\), and \(f(3)\).

*Figure 3.7.32*

6. Given the graph of \(g(x)\), find \(g(−2), g(0), g(2)\), and \(g(6)\).

*Figure 3.7.33*

7. Given the graph of \(g(x)\), find \(g(−4), g(−3), g(0)\), and \(g(4)\).

*Figure 3.7.34*

8. Given the graph of \(f(x)\), find \(f(−4), f(0), f(1),\) and \(f(3)\).

*Figure 3.7.35*

**Answer**-
1. \(f(−4)=−3, f(−1)=0, f(0)=1,\) and \(f(2)=3\)

3. \(f(−4)=−4, f(−1)=−4, f(0)=−4,\) and \(f(2)=−4\)

5. \(f(−1)=1, f(0)=−2, f(1)=−3,\) and \(f(3)=1\)

7. \(g(−4)=0, g(−3)=1, g(0)=2,\) and \(g(4)=3\)

Exercise \(\PageIndex{8}\) Function Notation

Given the graph, find the \(x\)-values.

1. Given the graph of \(f(x)\), find \(x\) when \(f(x)=3, f(x)=1,\) and \(f(x)=−3\).

*Figure 3.7.36*

2. Given the graph of \(g(x)\), find \(x\) when \(g(x)=−1, g(x)=0,\) and \(g(x)=1\).

*Figure 3.7.37*

3. Given the graph of \(f(x)\), find \(x\) when \(f(x)=3\).

*Figure 3.7.38*

4. Given the graph of \(g(x)\), find \(x\) when \(g(x)=−2, g(x)=0\), and \(g(x)=4\).

*Figure 3.7.39*

5. Given the graph of \(f(x)\), find \(x\) when \(f(x)=−16, f(x)=−12\), and \(f(x)=0\).

*Figure 3.7.40*

6. Given the graph of \(g(x)\), find \(x\) when \(g(x)=−3, g(x)=0\), and \(g(x)=1\).

*Figure 3.7.41*

7. Given the graph of \(f(x)\), find \(x\) when \(f(x)=−4, f(x)=0\), and \(f(x)=−2\).

*Figure 3.7.42*

8. Given the graph of \(g(x)\), find \(x\) when \(g(x)=5, g(x)=3\), and \(g(x)=2\).

*Figure 3.7.43*

9. The cost in dollars of producing pens with a company logo is given by the function \(C(x)=1.65x+120\), where \(x\) is the number of pens produced. Use the function to calculate the cost of producing \(200\) pens.

10. The revenue in dollars from selling sweat shirts is given by the function \(R(x)=29.95x\), where \(x\) is the number of sweat shirts sold. Use the function to determine the revenue if \(20\) sweat shirts are sold.

11. The value of a new car in dollars is given by the function \(V(t)=−2,500t+18,000\), where \(t\) represents the age of the car in years. Use the function to determine the value of the car when it is 5 years old. What was the value of the car when new?

12. The monthly income in dollars of a commissioned car salesman is given by the function \(I(n)=550n+1,250\), where \(n\) represents the number of cars sold in the month. Use the function to determine the salesman’s monthly income if he sells \(3\) cars this month. What is his income if he does not sell any cars in a month?

13. The perimeter of an isosceles triangle with a base measuring \(10\) centimeters is given by the function \(P(x)=2x+10\), where \(x\) represents the length of each of the equal sides. Find the length of each side if the perimeter is \(40\) centimeters.

14. The perimeter of a square depends on the length of each side \(s\) and is modeled by the function \(P(s)=4s\). If the perimeter of a square measures \(140\) meters, then use the function to calculate the length of each side.

15. A certain cellular phone plan charges $\(18\) per month and $\(0.10\) per minute of usage. The cost of the plan is modeled by the function \(C(x)=0.10x+18\), where \(x\) represents the number of minutes of usage per month. Determine the minutes of usage if the cost for the month was $\(36\).

16. The monthly revenue generated by selling subscriptions to a tutoring website is given by the function \(R(x)=29x\), where \(x\) represents the number of subscription sales per month. How many subscriptions were sold if the revenues for the month totaled $\(1,508\)?

**Answer**-
1. \(f(−1)=3, f(0)=1,\) and \(f(2)=−3\)

3. \(f(1)=3\) (answers may vary)

5. \(f(−4)=−16\); \(f(−6)=−12\) and \(f(−2)=−12\); \(f(−8)=0\) and \(f(0)=0\)

7. \(f(−4)=−4\) and \(f(4)=−4\); \(f(0)=0\); \(f(−2)=−2\) and \(f(2)=−2\)

9. $\(450\)

11. New: $\(18,000\); 5 years old: $\(5,500\)

13. \(15\) centimeters

15. \(180\) minutes

Exercise \(\PageIndex{9}\) Function Notation

Graph the linear function and state the domain and range.

- \(f(x)=−\frac{5}{2}x+10\)
- \(f(x)=\frac{3}{5}x−10\)
- \(g(x)=6x+2\)
- \(g(x)=−4x+6\)
- \(h(t)=\frac{1}{2}t−3\)
- \(h(t)=−\frac{3}{4}t+3\)
- \(C(x)=100+50x\)
- \(C(x)=50+100x\)

**Answer**-
1. Domain and range: \(R\)

*Figure 3.7.44*3. Domain and range: \(R\)

*Figure 3.7.45*5. Domain and range: \(R\)

*Figure 3.7.46*7. Domain and range: \(R\)

*Figure 3.7.47*

Exercise \(\PageIndex{10}\) Discussion Board Topics

- Is a vertical line a function? What are the domain and range of a vertical line?
- Is a horizontal line a function? What are the domain and range of a horizontal line?
- Come up with your own correspondence between real-world sets. Explain why it does or does not represent a function.
- Can a function have more than one \(y\)-intercept? Explain.

**Answer**-
1. Answers may vary

3. Answers may vary