Functions and Graphs

Functions and Relations

A function is a relation between two sets called the domain and range, in which each element of the domain corresponds to exactly one element of the range. The relationship can be represented by a mapping diagram, an algebraic rule, or a graph.

A relation is a set of ordered pairs. Relations can be represented in a variety of ways, including lists, diagrams, equations, and graphs. The domain of a relation is the set of the first coordinates of the ordered pairs in the relation. The first coordinate is often represented by the variable xx. The range of a relation is the set of the second coordinates of the ordered pairs in the relation. The second coordinate is often represented by the variable yy.

A type of relation that is particularly important is called a function. A function is a relation in which each element of the domain corresponds to exactly one element of the range.

The domain of a function is the set of the first coordinates of the ordered pairs. A value in the domain of the function is called the input. The independent variable represents the input values of a function.

The range of a function is the set of the second coordinates of the ordered pairs. A value in the range of the function is called the output. The dependent variable represents the output values of a function.

In a function, each input has a unique output. If yy is a function of xx, then every xx-value corresponds to only one yy-value.

Relation That Is Not a Function Relation That Is a Function
The mapping diagram represents
the set of ordered pairs {(1,5),(1,7),(2,7),(3,9)}\{(1,5),(1,7),(2,7),(3,9)\}. The relation is not a function because the value of 1 in the domain corresponds to both 5 and 7 in the range.
The mapping diagram represents the set of ordered pairs {(1,5),(2,7),(3,7)}\{(1,5),(2,7),(3,7)\}. Each value in the domain corresponds to only one value in the range, so the relation is a function. Note that a value in the range can correspond to more than one value in the domain.

A function can be named by a letter, such as ff. When the function ff is written as an equation, the dependent variable is sometimes written as f(x)f(x) rather than yy. Read f(x)f(x) as "ff of xx." It represents the value of the function ff at xx. While functions are frequently called ff, they may be named with any letter to distinguish among several functions or describe the output.

For example, three functions may be named ff, gg, and hh.
f(x)=x+3g(x)=5x+9h(x)=x2+2x+7f(x)=x+3\;\;\;\;\;g(x)=5x+9\;\;\;\;\;h(x)=x^2+2x+7
Another type of function, known as a cost function, might be labeled CC. This could describe the cost of producing a quantity, qq, of an item.
C(q)=q314q2+160C(q)=q^3-14q^2+160
If a relation is described by an equation in two variables xx and yy, to determine whether the relation is a function of xx, determine whether any value of xx could correspond to more than one value of yy. For example, the equation y=x2y=x^2 represents a function of xx because, for every value of xx, that is substituted into the equation, there is only one possible yy-value that results. However, the equation x=y2x=y^2 does not represent a function of xx because an xx-value, such as 1 corresponds to two yy-values, 1 and –1.

Domain and Range

The domain and range of a function are the sets of values that define a function. The domain is all possible inputs to the function. The range is all possible outputs from the function.
To describe the domain and range of a function, identify the set of all possible inputs and the corresponding set of outputs. When a function is represented in a table, the inputs, or xx-values, represent the domain. The outputs, or values of f(x)f(x), represent the range.
xx f(x)f(x)
15 30
20 40
25 50

The function f(x)f(x) is represented by a table. The domain is the set of inputs, or xx-values shown in the table: {15,20,25}\{15,20,25\}. The range is the set of outputs, or f(x)f(x) values shown in the table: {30,40,50}\{30,40,50\}.

When a function is represented by an equation, analyze the equation to determine all possible input and output values.

  • For the domain, look for values that would make the function undefined. This includes values that would make the denominator of a fraction equal to zero or values that would make an expression under a square root have a negative value.
  • For the range, look for any values that could not be the output of the function. For example, if an expression is squared or a square root, the value cannot be negative. A fraction with a nonzero numerator cannot be equal to zero.
Step-By-Step Example
Determining the Domain and Range
Identify the domain and range of the function:
f(x)=2xf(x) = 2x
Step 1
Determine the possible input values. Any value can be used for xx, so the domain is the set of all real numbers.
Step 2
Determine the possible output values. Any value could be the output of the function, so the range is also the set of all real numbers.
Solution

Write the domain and range. Both the domain and range are all real numbers.

Using inequality notation, the domain is written as:
<x<-\infty \lt x \lt \infty
The range is written as:
<y<-\infty \lt y \lt \infty
In interval notation, both the domain and range are written as (,)\left(-\infty,\infty\right).
Step-By-Step Example
Determining the Domain and Range of a Radical Function
Identify the domain and range of the function:
f(x)=x+5f(x)=\sqrt{x+5}
Step 1
Determine the possible input values. The expression under the radical cannot be negative. So, the value of xx must be greater than or equal to –5. Check this reasoning by setting the entire expression equal to zero and then solve for xx.
x+50x+5505x5\begin{aligned}x+5 &\ge 0\\x+5-5 &\ge 0-5 \\ x&\ge -5 \end{aligned}
Step 2
Determine the possible output values. The square root symbol represents the positive root, so all outputs of the function are positive. The possible outputs are all positive numbers and zero.
Solution
Write the domain and range. Using inequality notation, the domain is written as x5x\ge-5 and the range is y0y\ge0. Using interval notation, the domain is [5,)[-5,\infty) and the range is [0,)[0,\infty).

Evaluating Functions

A function can be evaluated for a specific element in the domain by finding the corresponding element of the range.
It is often necessary to evaluate a function, or find its output value for a given input. The xx-value is substituted into the equation, and the resulting expression is simplified. A "machine" can be used to represent a function, showing the input values going into the machine and the output values coming out after the rule is applied.
For the function gg, the input is 3. The rule 5x+95x+9 is applied to the input: Multiply by 5 and then add 9. The result is the output, 24.
To evaluate a function for a given value of an expression:
1. Write the equation.
2. Replace each xx with the desired value or expression.
3. Simplify the resulting expression.

The input of a function can also be an algebraic expression. In this case, the output will also be an algebraic expression, not just a number.

Step-By-Step Example
Evaluating a Function
The function ff is defined by the rule:
f(x)=x2+3x+6f(x)=x^2+3x+6
Determine f(2)f(2).
Step 1
Substitute 2 into the equation, replacing each xx.
f(x)=x2+3x+6f(2)=22+32+6\begin{aligned}f({\color{#c42126}x})&={\color{#c42126}x}^2+3{\color{#c42126}x}+6\\f({\color{#c42126}2})&={\color{#c42126}2}^2+3\cdot{\color{#c42126}2}+6\end{aligned}
Step 2
Simplify the resulting numerical expression.
f(2)=22+32+6=4+6+6=16\begin{aligned}f({\color{#c42126}2})&={\color{#c42126}2}^2+3\cdot{\color{#c42126}2}+6\\&=4+6+6\\&=16\end{aligned}
Solution
f(2)=16f(2)=16
Step-By-Step Example
Evaluating a Function for an Algebraic Expression
The function ff is defined by the rule:
f(x)=2x+7f(x)=2x+7
Determine f(x+1)f(x+1).
Step 1
Substitute x+1x+1 into the equation, replacing each xx.
f(x)=2x+7f(x+1)=2(x+1)+7\begin{aligned}f({\color{#c42126}x})&=2{\color{#c42126}x}+7\\f({\color{#c42126} {x+1}})&=2{\color{#c42126} {(x+1)}}+7\end{aligned}
Remember that the variable, xx, is simply a placeholder. Write it using blanks for the variables, and then fill in the blanks with the desired expression.
f()=2()+7f(\underline{\hspace{1.5cm}})=2(\underline{\hspace{1.5cm}})+7
Step 2
Simplify the resulting numerical expression.
f(x+1)=2(x+1)+7=2x+2+7=2x+9\begin{aligned}f({\color{#c42126} {x+1}})&=2{\color{#c42126} {(x+1)}}+7\\ &={\color{#c42126}{2x+2}}+7\\&=2x+9\end{aligned}
Solution
f(x+1)=2x+9f(x+1)=2x+9

Operations with Functions

Functions can be added, subtracted, multiplied, and divided.
Functions that are written as equations can be added, subtracted, multiplied, or divided. First, add, subtract, multiply, or divide the expressions, and then simplify if needed.

Operations with Functions

Operation f(x)=3xf(x)= 3x and g(x)=x1g(x)= x-1
Addition
(f+g)(x)=f(x)+g(x)=3x+(x1)=4x1\begin{aligned}(f+g)(x)&= {\color{#c42126}f(x)} + {\color{#0047af}g(x)}\\&= {\color{#c42126}3x} + {\color{#0047af}(x-1)}\\&=4x-1\end{aligned}
Subtraction
(fg)(x)=f(x)g(x)=3x(x1)=3xx+1=2x+1\begin{aligned}(f-g)(x) &= {\color{#c42126}f(x)} - {\color{#0047af}g(x)}\\ &={\color{#c42126}3x} \color{black}- {\color{#0047af}(x-1)}\\ &=3x-x+1\\ &=2x+1\end{aligned}
Multiplication
(fg)(x)=f(x)g(x)=3x(x1)=3x23x\begin{aligned}(f\cdot g)(x)&= {\color{#c42126}f(x)} \cdot {\color{#0047af}g(x)}\\&={\color{#c42126}3x} \cdot {\color{#0047af}(x-1)}\\&=3x^2-3x\end{aligned}
Division
(fg)(x)=f(x)g(x)=3xx1\begin{aligned}\left ( \frac{f}{g} \right ) (x) &= \frac{{\color{#c42126} f(x)}}{{\color{#0047af} g(x)}}\\&=\frac{{\color{#c42126} 3x}}{{\color{#0047af} x-1}}\end{aligned}