In this section, we provide a formal definition of a function and examine several ways in which functions are represented—namely, through tables, formulas, and graphs. We study formal notation and terms related to functions. We also define composition of functions and symmetry properties. Most of this material will be a review for you, but it serves as a handy reference to remind you of some of the algebraic techniques useful for working with functions.
Given two sets \(A\) and \(B\text{,}\) a set with elements that are ordered pairs \((𝑥,𝑦)\text{,}\) where \(𝑥\) is an element of \(A\) and \(𝑦\) is an element of \(B\text{,}\) is a relation from \(A\) to \(B\text{.}\) A relation from \(A\) to \(B\) defines a relationship between those two sets. A function is a special type of relation in which each element of the first set is related to exactly one element of the second set. The element of the first set is called the input; the element of the second set is called the output. Functions are used all the time in mathematics to describe relationships between two sets. For any function, when we know the input, the output is determined, so we say that the output is a function of the input. For example, the area of a square is determined by its side length, so we say that the area (the output) is a function of its side length (the input). The velocity of a ball thrown in the air can be described as a function of the amount of time the ball is in the air. The cost of mailing a package is a function of the weight of the package. Since functions have so many uses, it is important to have precise definitions and terminology to study them.
A function\(f\) consists of a set of inputs, a set of outputs, and a rule for assigning each input to exactly one output. The set of inputs is called the domain of the function. The set of outputs is called the range of the function.
For example, consider the function \(f\text{,}\) where the domain is the set of all real numbers and the rule is to square the input. Then, the input \(x=3\) is assigned to the output 32=9. Since every nonnegative real number has a real-value square root, every nonnegative number is an element of the range of this function. Since there is no real number with a square that is negative, the negative real numbers are not elements of the range. We conclude that the range is the set of nonnegative real numbers.
For a general function \(f\) with domain \(D\text{,}\) we often use \(x\) to denote the input and \(y\) to denote the output associated with \(x\text{.}\) When doing so, we refer to \(x\) as the independent variable and \(y\) as the dependent variable, because it depends on \(x\text{.}\) Using function notation, we write \(y=f(x)\text{,}\) and we read this equation as “\(y\) equals \(f\) of \(x\text{.}\)” For the squaring function described earlier, we write \(f(x)=x^2\text{.}\)
Figure1.1.2.A function maps every element in the domain to exactly one element in the range. Although each input can be sent to only one output, two different inputs can be sent to the same output.
Figure1.1.3.In this case, a graph of a function \(f\) has a domain of \(\{1,2,3\}\) and a range of \(\{1,2\}\text{.}\) The independent variable is \(x\) and the dependent variable is \(y\text{.}\)
We can also visualize a function by plotting points \((𝑥,𝑦)\) in the coordinate plane where \(𝑦=𝑓(𝑥)\text{.}\) The graph of a function is the set of all these points. For example, consider the function \(𝑓\text{,}\) where the domain is the set \(𝐷=\{1,2,3\}\) and the rule is \(𝑓(𝑥)=3−𝑥\text{.}\) In Figure 1.1.4, we plot a graph of this function.
Figure1.1.4.Here we see a graph of the function \(f\) has a domain of \(\{1,2,3\}\) and rule \(𝑓(𝑥)=3−𝑥\text{.}\) The graph consists of the points \((𝑥,𝑓(𝑥))\) for all \(𝑥\) in the domain.
Every function has a domain. However, sometimes a function is described by an equation, as in \(𝑓(𝑥)=𝑥^2\text{,}\) with no specific domain given. In this case, the domain is taken to be the set of all real numbers \(𝑥\) for which \(𝑓(𝑥)\) is a real number. For example, since any real number can be squared, if no other domain is specified, we consider the domain of \(𝑓(𝑥)=𝑥^2\) to be the set of all real numbers. On the other hand, the square root function \(𝑓(𝑥)=\sqrt{𝑥}\) only gives a real output if \(𝑥\) is nonnegative. Therefore, the domain of the function \(𝑓(𝑥)=\sqrt{𝑥}\) is the set of nonnegative real numbers, sometimes called the natural domain.
For the functions \(𝑓(𝑥)=𝑥^2\) and \(𝑓(𝑥)=\sqrt{𝑥}\text{,}\) the domains are sets with an infinite number of elements. Clearly we cannot list all these elements. When describing a set with an infinite number of elements, it is often helpful to use set-builder or interval notation. When using set-builder notation to describe a subset of all real numbers, denoted \(ℝ\text{,}\) we write
\begin{equation*}
\{𝑥|𝑥\text{ has some property}\}.
\end{equation*}
We read this as the set of real numbers \(𝑥\) such that \(𝑥\) has some property. For example, if we were interested in the set of real numbers that are greater than one but less than five, we could denote this set using set-builder notation by writing
The numbers 1 and 5 are called the endpoints of this set. If we want to consider the set that includes the endpoints, we would denote this set by writing
We can use similar notation if we want to include one of the endpoints, but not the other. To denote the set of nonnegative real numbers, we would use the set-builder notation
\begin{equation*}
\{𝑥|0≤𝑥\}.
\end{equation*}
The smallest number in this set is zero, but this set does not have a largest number. Using interval notation, we would use the symbol ∞, which refers to positive infinity, and we would write the set as
It is important to note that ∞ is not a real number. It is used symbolically here to indicate that this set includes all real numbers greater than or equal to zero. Similarly, if we wanted to describe the set of all nonpositive numbers, we could write
Here, the notation −∞ refers to negative infinity, and it indicates that we are including all numbers less than or equal to zero, no matter how small. The set
\begin{equation*}
(−∞,∞)=\{𝑥|𝑥 \text{ is any real number}\}
\end{equation*}
Some functions are defined using different equations for different parts of their domain. These types of functions are known as piecewise-defined functions. For example, suppose we want to define a function \(𝑓\) with a domain that is the set of all real numbers such that \(𝑓(𝑥)=3𝑥+1\) for \(𝑥≥2\) and \(𝑓(𝑥)=𝑥^2\) for \(𝑥<2\text{.}\) We denote this function by writing
When evaluating this function for an input \(𝑥\text{,}\) the equation to use depends on whether \(𝑥≥2\) or \(𝑥<2\text{.}\) For example, since \(5>2\text{,}\) we use the fact that \(𝑓(𝑥)=3𝑥+1\) for \(𝑥\geq2\) and see that \(f(5)=3(5)+1=16\text{.}\) On the other hand, for \(𝑥=−1\text{,}\) we use the fact that \(𝑓(𝑥)=𝑥^2\) for \(𝑥<2\) and see that \(𝑓(−1)=1\text{.}\)
Since \((𝑥−4)2≥0\text{,}\) we know \(𝑓(𝑥)=(𝑥−4)^2+5≥5\text{.}\) Therefore, the range must be a subset of \(\{𝑦|𝑦≥5\}\text{.}\) To show that every element in this set is in the range, we need to show that for a given \(𝑦\) in that set, there is a real number \(𝑥\) such that \(𝑓(𝑥)=(𝑥−4)^2+5=𝑦\text{.}\) Solving this equation for \(𝑥\text{,}\) we see that we need \(𝑥\) such that
\begin{equation*}
(𝑥−4)^2=𝑦−5.
\end{equation*}
This equation is satisfied as long as there exists a real number 𝑥 such that
\begin{equation*}
𝑥−4=±√𝑦−5.
\end{equation*}
Since \(𝑦≥5\text{,}\) the square root is well-defined. We conclude that for \(𝑥=4±√𝑦−5,𝑓(𝑥)=𝑦\text{,}\) and therefore the range is \(\{𝑦|𝑦≥5\}\text{.}\)
To find the domain of \(𝑓\text{,}\) we need the expression \(3𝑥+2≥0\text{.}\) Solving this inequality, we conclude that the domain is \(\{𝑥|𝑥≥−2/3\}\text{.}\)
To find the range of \(𝑓\text{,}\) we note that since \(√3𝑥+2≥0,𝑓(𝑥)=√3𝑥+2−1≥−1\text{.}\) Therefore, the range of \(𝑓\) must be a subset of the set \(\{𝑦|𝑦≥−1\}\text{.}\) To show that every element in this set is in the range of \(𝑓\text{,}\) we need to show that for all \(𝑦\) in this set, there exists a real number \(𝑥\) in the domain such that \(𝑓(𝑥)=𝑦\text{.}\) Let \(𝑦≥−1\text{.}\) Then, \(𝑓(𝑥)=𝑦\) if and only if
\begin{equation*}
√3𝑥+2−1=𝑦.
\end{equation*}
Solving this equation for \(𝑥\text{,}\) we see that \(𝑥\) must solve the equation
\begin{equation*}
√3𝑥+2=𝑦+1.
\end{equation*}
Since \(𝑦≥−1\text{,}\) such an \(𝑥\) could exist. Squaring both sides of this equation, we have \(3𝑥+2=(𝑦+1)^2\text{.}\) Therefore, we need \(3𝑥=(𝑦+1)^2−2\text{,}\) which implies
We just need to verify that \(𝑥\) is in the domain of \(𝑓\text{.}\) Since the domain of \(𝑓\) consists of all real numbers greater than or equal to \(−2/3\text{,}\) and
Therefore, as long as \(𝑦≠0\text{,}\) there exists a real number \(𝑥\) in the domain such that \(𝑓(𝑥)=𝑦\text{.}\) Thus, the range is \(\{𝑦|𝑦≠0\}\text{.}\)
We can identify a function in each form, but we can also use them together. For instance, we can plot on a graph the values from a table or create a table from a formula.
Functions described using a table of values arise frequently in real-world applications. Consider the following simple example. We can describe temperature on a given day as a function of time of day. Suppose we record the temperature every hour for a 24-hour period starting at midnight. We let our input variable 𝑥 be the time after midnight, measured in hours, and the output variable 𝑦 be the temperature 𝑥 hours after midnight, measured in degrees Fahrenheit. We record our data in Figure 1.1.7.
We can see from the table that temperature is a function of time, and the temperature decreases, then increases, and then decreases again. However, we cannot get a clear picture of the behavior of the function without graphing it.
Given a function 𝑓 described by a table, we can provide a visual picture of the function in the form of a graph. Graphing the temperatures listed in Table 1.1 can give us a better idea of their fluctuation throughout the day. Figure 1.6 shows the plot of the temperature function.
From the points plotted on the graph in Figure 1.6, we can visualize the general shape of the graph. It is often useful to connect the dots in the graph, which represent the data from the table. In this example, although we cannot make any definitive conclusion regarding what the temperature was at any time for which the temperature was not recorded, given the number of data points collected and the pattern in these points, it is reasonable to suspect that the temperatures at other times followed a similar pattern, as we can see in Figure 1.7.
Sometimes we are not given the values of a function in table form, rather we are given the values in an explicit formula. Formulas arise in many applications. For example, the area of a circle of radius 𝑟 is given by the formula 𝐴(𝑟)=𝜋𝑟2. When an object is thrown upward from the ground with an initial velocity 𝑣0 ft/s, its height above the ground from the time it is thrown until it hits the ground is given by the formula 𝑠(𝑡)=−16𝑡2+𝑣0𝑡. When 𝑃 dollars are invested in an account at an annual interest rate 𝑟 compounded continuously, the amount of money after 𝑡 years is given by the formula 𝐴(𝑡)=𝑃𝑒𝑟𝑡. Algebraic formulas are important tools to calculate function values. Often we also represent these functions visually in graph form.
Given an algebraic formula for a function 𝑓, the graph of 𝑓 is the set of points (𝑥,𝑓(𝑥)), where 𝑥 is in the domain of 𝑓 and 𝑓(𝑥) is in the range. To graph a function given by a formula, it is helpful to begin by using the formula to create a table of inputs and outputs. If the domain of 𝑓 consists of an infinite number of values, we cannot list all of them, but because listing some of the inputs and outputs can be very useful, it is often a good way to begin.
When creating a table of inputs and outputs, we typically check to determine whether zero is an output. Those values of 𝑥 where 𝑓(𝑥)=0 are called the zeros of a function. For example, the zeros of 𝑓(𝑥)=𝑥2−4 are 𝑥=±2. The zeros determine where the graph of 𝑓 intersects the 𝑥-axis, which gives us more information about the shape of the graph of the function. The graph of a function may never intersect the x-axis, or it may intersect multiple (or even infinitely many) times.
Since a function has exactly one output for each input, the graph of a function can have, at most, one 𝑦-intercept. If 𝑥=0 is in the domain of a function 𝑓, then 𝑓 has exactly one 𝑦-intercept. If 𝑥=0 is not in the domain of 𝑓, then 𝑓 has no 𝑦-intercept. Similarly, for any real number 𝑐, if 𝑐 is in the domain of 𝑓, there is exactly one output 𝑓(𝑐), and the line 𝑥=𝑐 intersects the graph of 𝑓 exactly once. On the other hand, if 𝑐 is not in the domain of 𝑓,𝑓(𝑐) is not defined and the line 𝑥=𝑐 does not intersect the graph of 𝑓. This property is summarized in the vertical line test.
Given a function 𝑓, every vertical line that may be drawn intersects the graph of 𝑓 no more than once. If any vertical line intersects a set of points more than once, the set of points does not represent a function.
Figure1.1.11.(a) The set of plotted points represents the graph of a function because every vertical line intersects the set of points, at most, once. (b) The set of plotted points does not represent the graph of a function because some vertical lines intersect the set of points more than once. shows temperature as a function of time.
To find the zeros, solve √𝑥+3+1=0. This equation implies √𝑥+3=−1. Since √𝑥+3≥0 for all 𝑥, this equation has no solutions, and therefore 𝑓 has no zeros.
To graph this function, we make a table of values. Since we need 𝑥+3≥0, we need to choose values of 𝑥≥−3. We choose values that make the square-root function easy to evaluate.
Table1.1.15.Using the defining properties of a degree \(n\) Taylor polynomial to find equations involving the coefficients \(c_k\text{.}\)
Making use of the table and knowing that, since the function is a square root, the graph of 𝑓 should be similar to the graph of 𝑦=√𝑥, we sketch the graph (Figure 1.1.16).
Now that we have reviewed the basic characteristics of functions, we can see what happens to these properties when we combine functions in different ways, using basic mathematical operations to create new functions. For example, if the cost for a company to manufacture 𝑥 items is described by the function 𝐶(𝑥) and the revenue created by the sale of 𝑥 items is described by the function 𝑅(𝑥), then the profit on the manufacture and sale of 𝑥 items is defined as 𝑃(𝑥)=𝑅(𝑥)−𝐶(𝑥). Using the difference between two functions, we created a new function.
Alternatively, we can create a new function by composing two functions. For example, given the functions 𝑓(𝑥)=𝑥^2 and 𝑔(𝑥)=3𝑥+1, the composite function 𝑓∘𝑔 is defined such that
To combine functions using mathematical operators, we simply write the functions with the operator and simplify. Given two functions 𝑓 and 𝑔, we can define four new functions:
When we compose functions, we take a function of a function. For example, suppose the temperature 𝑇 on a given day is described as a function of time 𝑡 (measured in hours after midnight) as in Table 1.1. Suppose the cost 𝐶, to heat or cool a building for 1 hour, can be described as a function of the temperature 𝑇. Combining these two functions, we can describe the cost of heating or cooling a building as a function of time by evaluating 𝐶(𝑇(𝑡)). We have defined a new function, denoted 𝐶∘𝑇, which is defined such that (𝐶∘𝑇)(𝑡)=𝐶(𝑇(𝑡)) for all 𝑡 in the domain of 𝑇. This new function is called a composite function. We note that since cost is a function of temperature and temperature is a function of time, it makes sense to define this new function (𝐶∘𝑇)(𝑡). It does not make sense to consider (𝑇∘𝐶)(𝑡), because temperature is not a function of cost.
Consider the function 𝑓 with domain 𝐴 and range 𝐵, and the function 𝑔 with domain 𝐷 and range 𝐸. If 𝐵 is a subset of 𝐷, then the composite function (𝑔∘𝑓)(𝑥) is the function with domain 𝐴 such that
A composite function 𝑔∘𝑓 can be viewed in two steps. First, the function 𝑓 maps each input 𝑥 in the domain of 𝑓 to its output 𝑓(𝑥) in the range of 𝑓. Second, since the range of 𝑓 is a subset of the domain of 𝑔, the output 𝑓(𝑥) is an element in the domain of 𝑔, and therefore it is mapped to an output 𝑔(𝑓(𝑥)) in the range of 𝑔. In Figure 1.12, we see a visual image of a composite function.
Since 𝑥^2+1≠0 for all real numbers 𝑥, the domain of (𝑔∘𝑓)(𝑥) is the set of all real numbers. Since 0<1/(𝑥2+1)≤1, the range is, at most, the interval (0,1]. To show that the range is this entire interval, we let 𝑦=1/(𝑥^2+1) and solve this equation for 𝑥 to show that for all 𝑦 in the interval (0,1], there exists a real number 𝑥 such that 𝑦=1/(𝑥^2+1). Solving this equation for 𝑥, we see that 𝑥^2+1=1/𝑦, which implies that
If 𝑦 is in the interval (0,1], the expression under the radical is nonnegative, and therefore there exists a real number 𝑥 such that 1/(𝑥^2+1)=𝑦. We conclude that the range of 𝑔∘𝑓 is the interval (0,1].
The domain of 𝑓∘𝑔 is the set of all real numbers 𝑥 such that 𝑥≠0. To find the range of 𝑓, we need to find all values 𝑦 for which there exists a real number 𝑥≠0 such that
For the following exercises, for each pair of functions, find a. (𝑓∘𝑔)(𝑥) and b. (𝑔∘𝑓)(𝑥) Simplify the results. Find the domain of each of the results.