Skip to main content
\(\require{mathrsfs}\newcommand{\abs}[1]{\left| #1 \right|} \renewcommand{\emptyset}{\varnothing} \DeclareMathOperator{\dom}{dom} \DeclareMathOperator{\range}{rng} \DeclareMathOperator{\perm}{perm} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

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.

See the textbook.

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.

Remark4.1.4

Recall the identity relation on \(A\) defined by \(I_A := \{ (a,a) \mid a \in A \}\text{.}\) Note that \(I_A\) is actually a function because if \((a,b) \in I_A\text{,}\) then \(b=a\text{,}\) so there is only one value associated to the argument \(a\text{,}\) namely, \(a\) itself. So, \(I_A : A \to A\) is just the function \(I_A(a) = a\text{.}\)

By properties of relations that we discussed before, if \(f:A \to B\) is any function, then \(f \circ I_A = f\) and \(I_B \circ f = f\text{.}\)

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{.}\)

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{.}\)

Exercise for the reader.

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.