Skip to main content

Section Introduction

Many topological properties are defined using continuous functions. We will focus on continuity later — for now we review some important concepts related to functions. Much of this should be familiar, but some might be new.
First we present the basic definitions. Much of our previous work has probably been with functions that map from the reals to the reals, but we will be considering functions form a more general perspective. We start with a formal definition of a function.

Definition 2.1.

A function \(f\) from a nonempty set \(A\) to a set \(B\) is a collection of ordered pairs \((a,b)\) so that
  • for each \(a \in A\) there is a pair \((a,b)\) in \(f\text{,}\) and
  • if \((a,b)\) and \((a,b')\) are in \(f\text{,}\) then \(b=b'\text{.}\)
Note that the first property is an existence property — that if \(a \in A\) then there is an element \(b\) in \(B\) that matches up with \(a\text{.}\) This first property also says that every element in \(A\) is used, or that every element in \(A\) is paired with an element in \(B\text{,}\) and the element in \(B\) depends on the element in \(A\) that is chosen. The second property is a uniqueness one — that there is only one element \(b\) in \(B\) that is paired with a given element \(a\) in \(A\text{.}\)
We generally use an alternate notation for a function. If \((a,b)\) is an element of a function \(f\text{,}\) we write
\begin{equation*} f(a)=b\text{,} \end{equation*}
and in this way we think of \(f\) as a mapping from the set \(A\) to the set \(B\text{.}\) We indicate that \(f\) is a mapping from set \(A\) to set \(B\) with the notation
\begin{equation*} f : A \to B\text{.} \end{equation*}
If \(f\) maps the element \(a \in A\) to the element \(b \in B\) we also use the notation
\begin{equation*} f : a \mapsto b\text{.} \end{equation*}
There is some familiar terminology and notation associated with functions. Let \(f\) be a function from a set \(A\) to a set \(B\text{.}\)
  • The set \(A\) is called the domain of \(f\text{,}\) and we write \(\text{ dom } (f) = A\text{.}\)
  • The set \(B\) is called the codomain of \(f\text{,}\) and we write \(\text{ codom } (f) = B\text{.}\)
  • The subset \(\{f(a) \mid a \in A\}\) of \(B\) is called the range of \(f\text{,}\) which we denote by \(\text{ range } (f)\text{.}\)
  • If \(a \in A\text{,}\) then \(f(a)\) is the image of \(a\) under \(f\text{.}\) Since each \(a\) in \(A\) is paired with a unique \(b \in B\text{,}\) there is only one image of \(a\) under \(f\text{.}\) That is why it is appropriate to use the work “the” when referring to the image of an element.
  • If \(b \in B\) and \(b = f(a)\) for some \(a \in A\text{,}\) then \(a\) is called a preimage of \(b\text{.}\) For a given \(b \in B\text{,}\) there may be many different preimages of \(b\text{,}\) no preimages of \(b\text{,}\) or just one preimage of \(b\text{.}\) It can be instructive to construct examples of each situation. The fact that a preimage of an element \(b\) may not be unique is the reason we use the word “a” when referring to a preimage.
Knowing the domains and codomains is very important when working with functions, and we will pay a lot of attention to these sets.
We have likely been exposed to one-to-one and onto function in our past mathematical experiences. One-to-one functions (or injections) and onto functions (or surjections) are special types of functions and we present their definitions here.

Definition 2.2.

Let \(f\) be a function from a set \(A\) to a set \(B\text{.}\)
  1. The function \(f\) is an injection if, whenever \((a,b)\) and \((a',b)\) are in \(f\text{,}\) then \(a=a'\text{.}\) Alternatively, using the function notation, \(f\) is an injection if \(f(a)=f(a')\) implies \(a=a'\text{.}\)
  2. The function \(f\) is a surjection if, whenever \(b \in B\text{,}\) then there is an \(a \in A\) so that \((a,b)\) is in \(f\text{.}\) Alternatively, using the function notation, \(f\) is a surjection if for each \(b \in B\) there exists an \(a \in A\) so that \(f(a)=b\text{.}\)
  3. The function \(f\) is a bijection if \(f\) is both an injection and a surjection.

Preview Activity 2.1.

We often define functions with rules, but functions can also be defined by tables or graphs. We will work with functions defined by rules in this activity. The goal of this activity is to illustrate why the domain and the codomain are just as important as the rule defining the outputs when want to determine if a function is one-to-one and/or onto. As an example, let \(f(x) = x^2+1\text{.}\) (Note that \(f\) is the function and \(f(x)\) is the image of \(x\) under \(f\text{.}\)) Notice that
\begin{equation*} f(2) = 5 \text{ and } f(-2) = 5\text{.} \end{equation*}
This observation is enough to prove that the function \(f\) is not an injection since we can see that there exist two different inputs that produce the same output.
Since \(f(x) = x^2 + 1\text{,}\) we know that \(f(x) \geq 1\) for all \(x \in \R\text{.}\) This implies that the function \(f\) is not a surjection. For example, \(-2\) is in the codomain of \(f\) and \(f(x) \neq -2\) for all \(x\) in the domain of \(f\text{.}\)

(a)

We can change the domain of a function so that the function is defined on a subset of the original domain. Such a function is called a restriction.
Definition 2.3.
Let \(f\) be a function from a set \(A\) to a set \(B\) and let \(C\) be a subset of \(A\text{.}\) The restriction of \(f\) to \(C\) is the function \(F: C \to B\) satisfying
\begin{equation*} F(c) = f(c) \text{ for all } c \in C\text{.} \end{equation*}
A notation used for the restriction is also \(F = f\mid_C\text{.}\) We also call \(f\) an extension of \(F\text{.}\) Let \(f: \R \to \R\) be defined by \(f(x) = x^2+1\text{,}\) and let \(h = f \mid_{\R^+}\text{,}\) where \(\R^+\) is the set of positive real numbers. So \(h\) has the same codomain as \(f\text{,}\) but a different domain.
(i)
Show that \(h\) is an injection.
(ii)
Is \(h\) a surjection? Justify your conclusion.

(b)

Let \(T = \{y \in \R \mid y \geq 1\}\text{,}\) and let \(F: \R \to T\) be defined by \(F(x) = f(x)\text{.}\) Notice that the function \(F\) uses the same formula as the function \(f\) and has the same domain as \(f\text{,}\) but has a different codomain than \(f\text{.}\)
(i)
Explain why \(F\) is not an injection.
(ii)
Is \(F\) a surjection? Justify your conclusion.

(c)

Let \(\R^*= \{x \in \R \mid x \geq 0\}\text{.}\) Define \(g : \R^* \to T\) by \(g(x) = x^2 + 1\text{.}\)
(i)
Prove or disprove: the function \(g\) is an injection.
(ii)
Prove or disprove: the function \(g\) is a surjection.
In our preview activity, the same mathematical formula was used to determine the outputs for the functions. However:
  • One of the functions was neither an injection nor a surjection.
  • One of the functions was not an injection but was a surjection.
  • One of the functions was an injection but was not a surjection.
  • One of the functions was both an injection and a surjection.
This illustrates the important fact that whether a function is injective or surjective not only depends on the formula that defines the output of the function but also on the domain and codomain of the function.
An important special function that is always an injection and surjection is the identity function on a set. If \(A\) is a set, the identity function on \(A\) is denoted as \(i_A\text{,}\) and \(i_A(a) = a\) for every \(a \in A\text{.}\)