Chapter 1.3 Functions
In this section, we will focus on special kinds of subsets that are used to describe quantities and change. In addition, these special subsets can be further decomposed into sets that describe certain features these subsets may possible.
Cartesian Products and Relations
To begin, we first describe an ordered pair.
Ordered Pair
An ordered pair \((a,b)\) (read: “ay comma bee”) is a pair of objects with the property that \((a,b) = (c,d)\) if and only if \[a = c \text{ and } b = d.\]
In the ordered pair \((a,b)\), the object in the \(a\) place is referred to as the first coordinate and the object in the \(b\) place is referred to as the second coordinate. This is what we mean by ordered.
This next set describes a specific set of ordered pairs.
Cartesian Product
The Cartesian Product, \(X\times Y\) (read: “x cross why”), of sets \(X\) and \(Y\) is the set \[X\times Y = \{(x,y) \colon x\in X\text{ and }y\in Y\}.\]
The Cartesian Product \(X\times Y\) is a collection of ordered pairs where the first coordinate comes from \(X\) and the second coordinate comes from \(Y.\)
Warning: Do not confuse ordered pair and interval notation! The context should clarify the meaning of the symbol.
Example 1
Take \(X = \{a,b,c\}\) and \(Y = \{a, g\}\). Write down all elements of \(X\times Y\).
The set \(X\times Y\) is all the ordered pairs \((x,y)\) where the first coordinate, \(x\), is in \(X\) and the second coordinate, \(y\), is in \(Y\). Therefore,
\[X\times Y=\{(a,a),(a,g),(b,a),(b,g),(c,a),(c,g)\}.\]
A Cartesian product can be thought of as pairing two objects in some way. Here is some terminology that we will use to specify how we are paring things.
Relation, Natural Domain, Co-Domain, Domain and Range
A relation \(r\) with natural domain \(X\) and co-domain \(Y\) is a non-empty subset of \(X\times Y\) that “matches up” elements of two different sets.
The domain of \(r\) is the set of all \(x\) in \(X\) appearing as a first entry in an element of \(r\).
The range of \(r\) is the set of all \(y\) in \(Y\) appearing as a second entry in an element of \(r\).
To understand the definition, complete the following example.
Example 2
Take \(Y\) and \(r\) to be the sets \[Y = \{a, b, c, d\}\] and \[r = \{(3, a), (3, b), (4, c), (5, b), (5, c)\}.\] View \(r\) as a subset of \(\mathbb N\times Y\).
What is the natural domain of \(r\)?
What is the co-domain of \(r\)?
What is the domain of \(r\) (denoted \(\mathcal D(r)\))?
What is the range of \(r\) (denoted \(\mathcal R(r)\))?
- The natural domain is \(\mathbb{N}.\)
- The co-domain is \(Y.\)
- The domain is \(\mathcal{D}(r)=\{3,4,5\}.\)
- The range is \(\mathcal{R}(r)=\{a,b,c\}.\)
The number \(3\), which is in the domain of the relation, was paired to both \(a\) and \(b\). It was paired to more than one letter in the range. We typically do not want to work with these kind of relations.
We have names to describe the relations in which this does not occur.
Function, Single-valued, Multi-valued
A relation, \(f\), in \(X\times Y\) is a function if no two distinct points in \(f\) have the same \(x\) coordinate.
A relation that has this property is single-valued. A relation without this property is multi-valued.
Some people say that a function is a relation that satisfies the vertical line test. Do you understand why this terminology makes sense and what should the vertical line test be?
Understand this by examining the next example carefully.
Example 3
The following relation in \(\mathbb R\times \mathbb R\) ( = \(\mathbb R^2\)) is not a function.
The following relation in \(\mathbb R\times \mathbb R\) ( = \(\mathbb R^2\)) is a function.
Having more than one viewpoint or interpretation of a concept can be helpful in tackling more complicated problems.
Think of a function as a machine that takes in things from one set and outputs things in another set.
Denote the function above by \(f\colon X \to Y\) (\(f\) takes \(X\) to \(Y\).)
In this case, \(X\) will be \(\mathcal D(f)\), the domain of \(f.\)
Example 4
Let \(X = \{a, b, c, d, e\}\) and \(Y = \{1, 2, 3\}\). Define a function from \(X\) to \(Y\).
Here are two examples of functions.
\(f=\{((a,1),(c,2),(d,3)\}\). Each element in the domain, \(\mathcal{D}(f)=\{a,c,d\}\), corresponds to only one element in \(Y.\)
\(f=\{((a,3),(b,1),(c,3),(d,1),(e,2)\}\). Each element in the domain, \(\mathcal{D}(f)=\{a,b,c,d,e\}\), corresponds to only one element in \(Y.\)
From now on, we will focus our attention on functions.
Basic Properties of Functions
Before we talk talk about functions here are two quick notes:
Course-Wide Assumption: Write \(f\colon X\to Y\), even when the domain is not all of \(X\).
Such a function is actually a partial function, but partial functions are usually simply referred to as functions. This is a common abuse of language that is convenient but can sometimes make things confusing. It is convenient to specify the natural domain without having to figure out what the domain of \(f\) actually is, especially when \(f\) is given by a complicated formula. Unless otherwise stated, a function \(f\) will be a real valued function on \(\mathbb R\), that is, \(f\colon \mathbb R\to \mathbb R\).
Given an ordered pair \((x,y)\) in \(f\), denote by \(f(x)\) to be the second coordinate, meaning \(y=f(x)\). The reason for notation is because for each \(x\), there may be a formula for \(f(x)\). In this case, the set \[\{(x,f(x))\colon x \in \text{ Domain of }f\}\] is often referred to as the graph of \(f\). This set, though, is \(f\).
Graph of a function
Any picture that represents \(f\) is a graphical representation of \(f\), when such a picture is very precisely determined, it is also often referred to as the graph of \(f\).
For certain functions that can be described by nice enough formulas, we can create a graphical representation of \(f\) using this formula. That is, we can say things like “sketch the graph of \(f\)” or “graph \(f\)” or “sketch \(f\).”
Such graphical representations allow us to read off certain information. For example, domain and range.
Example 5
Determine the domain and range of the function sketched below.
\(\mathcal{D}(f)=(-5,-1]\cup(2,5]\cup(6,7]\)
\(\mathcal{R}(f)=[-4,-2)\cup[1,5]\)
The sign of a function can be read from the graph of \(f\) as well.
Positive, Negative, and Zero
A real-valued function is positive at a point \(x\) in its domain if \[f(x) > 0.\]
A real-valued function is negative at a point \(x\) in its domain if \[f(x) < 0.\]
A real-valued function has a zero at \(x\) if \[f(x) = 0.\]
A function is positive provided at a point \(x_0\) if the point \((x_0,f(x_0))\) in \(f\) is above the \(x\)-axis and is negative when its below the \(x\)-axis. It is zero if that point is on the \(x\)-axis.
Positive or Negative on Interval
A function \(f\colon \mathbb R\to \mathbb R\) is positive or negative on an interval \(I\) in its domain if it is respectively positive or negative at every point in \(I\).
Check your understanding with this example.
Example 6
For the function \(f\) given below, find all intervals where \(f\) is non-negative, positive, non-positive, and negative.
\(f\) is non-negative on \([-5,-1]\cup(3,\infty)\)
\(f\) is positive on \((-5,-1)\cup(3,6)\cup(6,\infty)\)
\(f\) is non-positive on \((-\infty,-5]\cup[-1,3)\cup\{6\}\)
\(f\) is negative on \((-\infty,-5)\cup(-1,3)\)
Because a function can describe change, it is important to define what can of change we are looking at.
Increasing, Decreasing, Strictly Increasing and Strictly Decreasing
Suppose that \(f\colon \mathbb R \to \mathbb R\) and that \(I\) is an interval contained in \(\mathcal D(f)\).
The function \(f\) is increasing on \(I\) if for any \(a\) and \(b\) in \(I\), \[b>a \implies f(b) \ge f(a).\]
The function \(f\) is decreasing on \(I\) if for each \(a\) and \(b\) in \(I\), \[b>a \implies f(b) \leq f(a).\]
The function \(f\) is strictly increasing or strictly decreasing on \(I\) if the respective inequalities above are strict.
Visualize these concepts with the following images.
Practice using the graph to read where the function is increasing and decreasing. If a function happens to be increasing and decreasing on more than one interval, write each interval but separate them by a comma, as seen in the next example.
Example 7
The following function is defined on all real numbers except at \(x=3.\) Find the largest intervals on which \(f\) is strictly increasing and strictly decreasing.
\(f\) is strictly increasing on \((-\infty,-4],[6,\infty).\)
\(f\) is strictly decreasing on \([-1.5,3),(3,6].\)
The idea of a highest or lowest value of a function can be described mathematically by writing out the appropriate inequality.
Local Maximum, Local Minimum, Maximum and Minimum
A function \(f\colon \mathbb R\to \mathbb R\) has:
a local maximum at \(x\) if there is an open interval \(I\) containing \(x\) such that \(z \in I\cap \mathcal{D}(f)\) implies that \(f(x) \ge f(z).\)
a local minimum at \(x\) if there is an open interval \(I\) containing \(x\) such that \(z \in I\cap \mathcal{D}(f)\) implies that \(f(x) \leq f(z).\)
a maximum or global maximum at \(x\) if for any \(z\) in the domain of \(f\), \(f(x) \ge f(z)\)
a minimum or local minimum at \(x\) if for any \(z\) in the domain of \(f\), \(f(x) \leq f(z).\)
Here is a picture to visualize this.
A maximum is the \(x\) value in which the corresponding \(y\) value is greater than or equal to any other \(y\) value.
A minimum is the \(x\) value in which the corresponding \(y\) value is less than or equal to any other \(y\) value.
A local maximum is the \(x\) value in which there is a maximum provided the function is “zoomed” in enough.
A local minimum is the \(x\) value in which there is a minimum provided the function is “zoomed” in enough.
These values can be collectively referred to as extremal values.
Extremal Value
A value \(x\) in the domain of \(f\colon \mathbb R\to \mathbb R\) is said to be an extremal value if \(f\) has a local maximum or local minimum at \(x\)
Note that a maximum is always a local maximum and a minimum is always a local minimum.
Practice identifying extremal values with this example.
Example 8
Find all extremal values of \(f\) in \([-7,7]\).
local max at \(x=-5\), \(x=-1\), and \(x=5\).
local min at \(x=-7\), \(x=-3\), \(x=1\) and \(x=7\).
maximum at \(x=5\).
minimum at \(x=-7\).
Comparing Functions
Sketching functions can simplify the process of solving inequalities. That is, to find solutions to the inequalities \[f(x) > g(x)\quad\text{and}\quad f(x)\ge g(x),\] examine the sketches of \(f\) and \(g\) to “read off” the answer. See the next example.
Example 9
Describe the set of all \(x\) with \(f(x) \ge g(x)\).
The inequality \(f(x)\geq g(x)\) is valid provided that \(x\) is in the set \((-\infty,-4]\cup[2,6].\)
The final thing we do in this section is construct a function that satisfies certain requirements. If we look at the requirements at once, it may seem difficult to create such a function. However, with the principle of decomposition, we can do it by focusing on certain features, then combining and modifying as needed.
Example 10
Given the function \(g\) that is sketched below, sketch a function, \(f\), that is strictly increasing on \((-\infty, 0]\), strictly decreasing on \([0, 2]\), and strictly increasing on \([2, \infty)\), and that is less than \(g\) on \((-\infty, -1) \cup (3, \infty)\) and greater than or equal to \(g\) on \([-1,3]\). What are the local extrema of \(f\)?
The requirements are
- strictly increasing on \((-\infty,0)\)
- strictly decreasing on \((0,2)\)
- strictly increasing on \((2,\infty)\)
- \(f\leq g\) on \((-\infty,-1)\cup(3,\infty)\), \(f\) must be below \(g\)
- \(f\geq g\) on \([-1,3]\), \(f\) must be above \(g\).
Here is an example of a function \(f\).
So summarize, functions are just subsets of the plane. It’s helpful to decompose a function into parts and separately study its parts. For example, the function’s domain and range separate out the ordered pairs into first coordinates and second coordinates. The domain of a function can be further decomposed into intervals in which the function is increasing and decreasing. This decomposition can be used to try to locate extrema.