Section4.1Functions as relations
ΒΆ
Definition4.1.1Function
A function \(f\) from \(A\) to \(B\text{,}\) denoted \(f : A \to B\text{,}\) is a relation from \(A\) to \(B\) such that for every \(x \in A\) there exists a unique \(y \in B\) for whcih \((x,y) \in f\text{.}\) Instead, we use the more familiar notation \(f(x) = y\) to mean the same thing. In this context, \(x\) is called the argument, \(y\) the value. We could also refer to \(f\) as a map (or mapping), and sometimes we call \(y\) the image of \(x\) under \(f\text{.}\) The set \(A\) is called the domain, and \(B\) is the codomain. A function cannot be specified without also specifying it domain and codomain!
So, functions are just special relations, and relations are just sets. Thus, all your familiar mathematical objects are turning into sets! Now, since functions are just sets, what we mean when we say that two functions are equal is that they are equal as sets! Thankfully, the following theorem establishes that this means precisely what we would expect.
Theorem4.1.2
Functions \(f,g\) are equal if and only if
- \(\dom f = \dom g\text{,}\) and
- for all \(x \in \dom f\text{,}\) \(f(x) = g(x)\text{.}\)
Theorem4.1.3
Let \(f: A \to B\text{,}\) \(g: B \to C\) be functions. Then the composite relation \(g \circ f\) is also a function.
Let \(x \in A\text{.}\) Then since \(f\) is a function, there is a unique \(y \in B\) for which \((x,y) \in f\text{.}\) Since \(g\) is a function, there is a unique \(z \in C\) for which \((y,z) \in g\text{.}\) Therefore, \((x,z) \in g \circ f\text{.}\) Now suppose \((x,c) \in g \circ f\text{.}\) Then there exists some \(b \in B\) for which \((x,b) \in f\) and \((b,c) \in g\text{.}\) Since \(y\) is unique, \(b=y\text{,}\) and then since \(z\) is unique \(c=z\text{.}\) Thus, for every \(x \in A\) there exists a unique \(z \in C\) for which \((x,z) \in g \circ f\text{,}\) so \(g \circ f\) is a function.
Some functions are related to others by changing only the domain. For example, one could have a larger domain than the other, but on the smaller domain, the functions are equal. The next definition provides us the means to talk about such functions.
Definition4.1.5Restriction
Let \(f: A \to B\) and suppose \(D \subseteq A\text{.}\) The restriction of \(f\) to \(D\) is the function
\begin{equation*}
f|_D = \{ (x,y) \mid x \in D, y = f(x) \}.
\end{equation*}
If \(g,h\) are functions and \(g\) is a restriction of \(h\text{,}\) we also say that \(h\) is an extension of \(g\text{.}\)
Theorem4.1.6
Composition of functions is associative. That is, if \(f : A \to B\text{,}\) \(g : B \to C\text{,}\) \(h : C \to D\text{,}\) then \((h \circ g) \circ f = h \circ (g \circ f)\text{.}\)
Suppose \((w,z) \in (h \circ g) \circ f\text{.}\) Then there exists some \(x \in B\) for which \((w,x) \in f\) and \((x,z) \in h \circ g\text{.}\) Then there also exists some \(y \in C\) for which \((x,y) \in g\) and \((y,z) \in h\text{.}\) Thus, \((w,y) \in (g \circ f)\) and hence \((w,z) \in h \circ (g \circ f)\text{.}\) Therefore \((h \circ g) \circ f \subseteq h \circ (g \circ f)\text{.}\)
Suppose \((w,z) \in h \circ (g \circ f)\text{.}\) Then there exists some \(y \in C\) for which \((w,y) \in g \circ f\) and \((y,z) \in h\text{.}\) Then there also exists some \(x \in B\) for which \((w,x) \in f\) and \((x,y) \in g\text{.}\) Thus, \((x,z) \in (h \circ g)\) and hence \((w,z) \in (h \circ g) \circ f)\text{.}\) Therefore \(h \circ (g \circ f) \subseteq (h \circ g) \circ f\text{.}\)
Theorem4.1.7
Let \(f : A \to B\) and \(g : C \to D\text{.}\) If the functions agree on their common domain \(A \cap C\text{,}\) i.e., if the restrictions satisfy \(f|_{A \cap C} = g|_{A \cap C}\text{,}\) then the set \(f \cup g\) is a function from \(A \cup C\) to \(B \cup D\) and it is defined by
\begin{equation*}
(f \cup g)(x) :=
\begin{cases}
f(x) & \text{if}\ x \in A, \\
g(x) & \text{if}\ x \in C. \\
\end{cases}
\end{equation*}
Definition4.1.8
Let \(A,B\) be sets with (strict) partial orders \(\prec_A, \prec_B\text{.}\) A function \(f : A \to B\) is said to be (resp., strictly) increasing if whenever \(x,y \in A\) with \(x \prec_A y\text{,}\) then \(f(x) \prec_B f(y)\text{.}\) Simiarly, it is said to be (resp., strictly) decreasing if whenever \(x,y \in A\) with \(x \prec_A y\text{,}\) then \(f(y) \prec_B f(x)\text{.}\)
Prove that the function \(f : (0,\infty) \to \mathbb{R}\) given by the formula \(f(x) = \frac{1}{x}\) is strictly decreasing.