Skip to main content

Section 10.3 Important examples

identity function (on a set \(A \))
the function \(A \to A \) defined by \(a \mapsto a \)
\(\funcdef{\id_A}{A}{A} \)
the identity function on on set \(A \)
inclusion function (on subset \(A \subseteq X \))
the function \(A \to X \) defined by \(a \mapsto a \)
\(\funcdef{\inclfunc{A}{X}}{A}{X} \)
the inclusion function on subset \(A \subseteq X \)

Checkpoint 10.3.2.

Explain the difference between an identity function and an inclusion function.
projection functions (on Cartesian product \(A \cartprod B \))
the functions \(A \cartprod B \to A \) and \(A \cartprod B \to B \) defined by \((a,b) \mapsto a \) and \((a,b) \mapsto b \)
\(\funcdef{\projfunc{A}}{A \cartprod B}{A} \)
the projection function onto the first factor \(A \) in the Cartesian product \(A \cartprod B \)
\(\funcdef{\projfunc{B}}{A \cartprod B}{B} \)
the projection function onto the second factor \(B \) in the Cartesian product \(A \cartprod B \)

Example 10.3.4. Projection images.

Consider \((\frac{1}{2},\pi) \in \Q \cartprod \R \text{.}\) Then
\begin{align*} p_{\Q} \left( \frac{1}{2}, \pi \right) \amp = \frac{1}{2}, \amp p_{\R} \left( \frac{1}{2}, \pi \right) \amp = \pi \text{.} \end{align*}

Extend.

We may of course similarly define a projection function on a Cartesian product with any number of factors. Write
\begin{equation*} \funcdef{\projfunc{i}}{A_1 \cartprod A_2 \cartprod \dotsb \cartprod A_n}{A_i} \end{equation*}
to mean the projection function onto the \(\nth[i] \) factor \(A_i \) in the Cartesian product
\begin{equation*} A_1 \cartprod A_2 \cartprod \dotsb \cartprod A_n\text{.} \end{equation*}
Alternatively, we may write
\begin{equation*} \funcdef{\proj_i}{A_1 \cartprod A_2 \cartprod \dotsb \cartprod A_n}{A_i} \end{equation*}
for this function.

Note 10.3.5.

A projection is always surjective (except possibly when one or more of the factors in the Cartesian product is the empty set).
restricting the domain
the β€œinduced” function \(A \to Y \) created from function \(\funcdef{f}{X}{Y} \) and subset \(A \subseteq X \) by β€œforgetting” about elements of \(X \) that do not lie in \(A \)
\(\funcres{f}{A} \)
restriction of function \(\funcdef{f}{X}{Y} \) to subset \(A \subseteq X \)
\(\altfuncres{f}{A} \)
alternative domain restriction notation
\(\res_A^X f \)
alternative domain restriction notation
A Venn diagram of restricting the domain of a function.
Figure 10.3.6. A Venn diagram of restricting the domain of a function.

Example 10.3.7. Domain restriction.

For \(\funcdef{f}{\Z}{\N} \text{,}\) \(f(m) = \abs{m} \text{,}\) we have \(\funcres{f}{\N} = \id_{\N} \text{.}\)

Checkpoint 10.3.8. Properties of restrictions.

Consider function \(\funcdef{f}{X}{Y} \) and subset \(A \subseteq X \text{.}\)

(b)

If \(\funcres{f}{A} \) is injective, must \(f \) be injective?

(c)

Answer the previous two questions replacing β€œinjective” with β€œsurjective”.

Remark 10.3.9.

The concept of restricting the domain makes our previously defined concept image of a function on a subset unnecessary: for function \(\funcdef{f}{X}{Y} \) and subset \(A \subseteq X \text{,}\) the image of \(f \) on \(A \) is the same as the image of the restriction \(\funcres{f}{A} \text{.}\)
restricting the codomain
the β€œinduced” function \(X \to B \) created from function \(\funcdef{f}{X}{Y} \) and subset \(B \subseteq Y \) by β€œforgetting” about elements of \(Y \) that do not lie in \(B \text{,}\) where \(B \) must contain the image of \(f \)
A Venn diagram of restricting the codomain of a function.
Figure 10.3.10. A Venn diagram of restricting the codomain of a function.

Example 10.3.11. Codomain restriction.

Consider \(\funcdef{f}{\R}{\R} \text{,}\) \(f(x) = x^2 \text{.}\) It would be more precise to write \(\funcdef{f}{\R}{\nnegset{\R}} \text{,}\) since \(x^2 \ge 0 \) for all \(x \in \R \text{.}\)

Note 10.3.12.

If we restrict the codomain all the way down to the image set \(f(X) \text{,}\) the resulting map \(\funcdef{f}{X}{f(X)} \) is always surjective. In particular, if \(\ifuncdef{f}{X}{Y} \) is injective, then by restricting the codomain we can obtain a bijection \(\funcdef{f}{X}{f(X)} \text{.}\)
extension of a function
relative to function \(\funcdef{f}{A}{B} \) and superset \(X \supseteq A \text{,}\) a function \(\funcdef{g}{X}{B} \) so that \(g(a) = f(a) \) for all \(a \in A \)
A Venn diagram of a function extension.
Figure 10.3.13. A Venn diagram of a function extension.

Note 10.3.14.

The condition defining the concept extension function can be more succinctly stated as requiring function \(\funcdef{g}{X}{B} \) with \(A \subseteq X \) satisfy \(\funcres{g}{A} = f \text{.}\)

Example 10.3.15. Floor function.

Write \(\funcdef{\flr}{\R}{\Z} \) to mean the floor function: for real input \(x \text{,}\) the output \(\flr(x) \) is defined to be the greatest integer that is less than or equal to \(x \text{.}\) Usually we write
\begin{equation*} \flr(x) = \floor{x} \text{.} \end{equation*}
As every integer is less than or equal to itself, we have \(\flr(z) = z \) for every \(z \in \Z \text{.}\) This says that the floor function is an extension of the identity function \(\id_{\Z} \text{.}\)
One of the most common ways to extend a function to a larger domain is to pick an appropriate constant value in the codomain to assign to all β€œnew” inputs in the enlarged domain.
extenstion by zero
relative to function \(\funcdef{f}{A}{Z} \) and superset \(X \supseteq A \text{,}\) where \(Z \) is a set of β€œnumbers” containing a zero element, the extension function \(\funcdef{g}{X}{Z} \) defined by
\begin{equation*} g(x) = \begin{cases} f(x)\text{,} \amp x \in X \text{,} \\ 0\text{,} \amp \text{otherwise.} \end{cases} \end{equation*}

Example 10.3.16. Extending the identity function by zero.

Define \(\funcdef{{\widetilde{\id}}_{\Z}}{\R}{\Z} \) by
\begin{equation*} {\widetilde{\id}}_{\Z}(x) = \begin{cases} x\text{,} \amp x \in \Z \text{,} \\ 0\text{,} \amp \text{otherwise.} \end{cases} \end{equation*}
Then \({\widetilde{\id}}_{\Z} \) is the extension by zero of the identity function \(\id_{\Z} \text{.}\)

Checkpoint 10.3.17.

ExampleΒ 10.3.15 also involved an extension of the identity function \(\id_{\Z} \) to all of \(\R \) β€” was it an extension by zero?