Functions are frequently used in mathematics to define and describe certain relationships between sets and other mathematical objects. In addition, functions can be used to impose certain mathematical structures on sets. In this section, we will study special types of functions that are used to describe these relationships that are called injections and surjections. Before defining these types of functions, we will revisit what the definition of a function tells us and explore certain functions with finite domains.
Working with a Function of Two Variables
It takes time and practice to become efficient at working with the formal definitions of injection and surjection. As we have seen, all parts of a function are important (the domain, the codomain, and the rule for determining outputs). This is especially true for functions of two variables.
For example, we define \(f: \mathbb{R} \times \mathbb{R} \to \mathbb{R} \times \mathbb{R}\) by
\(f(a, b) = (2a + b, a - b)\) for all \((a, b) \in \mathbb{R} \times \mathbb{R}\).
Notice that both the domain and the codomain of this function is the set \(\mathbb{R} \times \mathbb{R}\). Thus, the inputs and the outputs of this function are ordered pairs of real numbers. For example,
\(f(1, 1) = (3, 0)\) and \(f(-1, 2) = (0, -3)\).
To explore wheter or not \(f\) is an injection, we assume that \((a, b) \in \mathbb{R} \times \mathbb{R}\), \((c, d) \in \mathbb{R} \times \mathbb{R}\), and \(f(a,b) = f(c,d)\). This means that
\((2a + b, a - b) = (2c + d, c - d)\).
Since this equation is an equality of ordered pairs, we see that
\[\begin{array} {rcl} {2a + b} &= & {2c + d, \text{ and }} \\ {a - b} &= & {c - d.} \end{array}\]
By adding the corresponding sides of the two equations in this system, we obtain \(3a = 3c\) and hence, \(a = c\). Substituting \(a = c\) into either equation in the system give us \(b = d\). Since \(a = c\) and \(b = d\), we conclude that
\((a, b) = (c, d)\).
Hence, we have shown that if \(f(a, b) = f(c, d)\), then \((a, b) = (c, d)\). Therefore, \(f\) is an injection.
Now, to determine if \(f\) is a surjection, we let \((r, s) \in \mathbb{R} \times \mathbb{R}\), where \((r, s)\) is considered to be an arbitrary element of the codomain of the function f . Can we find an ordered pair \((a, b) \in \mathbb{R} \times \mathbb{R}\) such that \(f(a, b) = (r, s)\)? Working backward, we see that in order to do this, we need
\((2a + b, a - b) = (r, s).\)
That is, we need
\(2a + b = r\) and \(a - b = s\).
Solving this system for \(a\) and \(b\) yields
\(a = \dfrac{r + s}{3}\) and \(b = \dfrac{r - 2s}{3}\).
Since \(r, s \in \mathbb{R}\), we can conclude that \(a \in \mathbb{R}\) and \(b \in \mathbb{R}\) and hence that \((a, b) \in \mathbb{R} \times \mathbb{R}\).
We now need to verify that for. these values of \(a\) and \(b\), we get \(f(a, b) = (r, s)\). So
\[\begin{array} {rcl} {f(a, b)} &= & {f(\dfrac{r + s}{3}, \dfrac{r - 2s}{3})} \\ {} &= & {(2(\dfrac{r + s}{3}) + \dfrac{r - 2s}{3}, \dfrac{r + s}{3} - \dfrac{r - 2s}{3})} \\ {} &= & {(\dfrac{2r + 2s + r - 2s}{3}, \dfrac{r + s - r + 2s}{3})} \\ {} &= & {(r, s).} \end{array}\]
This proves that for all \((r, s) \in \mathbb{R} \times \mathbb{R}\), there exists \((a, b) \in \mathbb{R} \times \mathbb{R}\) such that \(f(a, b) = (r, s)\). Hence, the function \(f\) is a surjection. Since \(f\) is both an injection and a surjection, it is a bijection.
Progress Check 6.16 (A Function of Two Variables)
Let \(g: \mathbb{R} \times \mathbb{R} \to \mathbb{R}\) be defined by \(g(x, y) = 2x + y\), for all \((x, y) \in \mathbb{R} \times \mathbb{R}\).
Note: Be careful! One major difference between this function and the previous example is that for the function \(g\), the codomain is \(\mathbb{R}\), not \(\mathbb{R} \times \mathbb{R}\). It is a good idea to begin by computing several outputs for several inputs (and remember that the inputs are ordered pairs).
- Notice that the ordered pair \((1, 0) \in \mathbb{R} \times \mathbb{R}\). That is (1, 0) is in the domain of \(g\). Also notice that \(g(1, 0) = 2\). Is it possible to find another ordered pair \((a, b) \in \mathbb{R} \times \mathbb{R}\) such that \(g(a, b) = 2\)?
- Let \(z \in \mathbb{R}\). Then \((0, z) \in \mathbb{R} \times \mathbb{R}\) and so \((0, z) \in \text{dom}(g)\). Now determine \(g(0, z)\)?
- Is the function \(g\) an injection? Is the function \(g\) a surjection? Justify your conclusions.
- Answer
-
Add texts here. Do not delete this text first.
Exercise 6.3
- (a) Draw an arrow diagram that represents a function that is an injection but is not a surjection.
(b) Draw an arrow diagram that represents a function that is an injection and is a surjection.
(c) Draw an arrow diagram that represents a function that is not an injection and is not a surjection.
(d) Draw an arrow diagram that represents a function that is not an injection but is a surjection.
(e) Draw an arrow diagram that represents a function that is not a bijection.
- Let \(\mathbb{Z}_5 = \{0, 1, 2, 3, 4\}\) and let \(\mathbb{Z}_6 = \{0, 1, 2, 3, 4, 5\}\). For each of the following functions, determine if the function is an injection and determine if the function is a surjection. Justify all conclusions.
(a) \(f: \mathbb{Z}_5 \to \mathbb{Z}_5\) by \(f(x) = x^2 + 4\) (mod 5), for all \(x \in \mathbb{Z}_5\)
(b) \(g: \mathbb{Z}_6 \to \mathbb{Z}_6\) by \(g(x) = x^2 + 4\) (mod 6), for all \(x \in \mathbb{Z}_6\)
(c) \(F: \mathbb{Z}_5 \to \mathbb{Z}_5\) by \(F(x) = x^3 + 4\) (mod 5), for all \(x \in \mathbb{Z}_5\)
- For each of the following functions, determine if the function is an injection and determine if the function is a surjection. Justify all conclusions.
(a) \(f: \mathbb{Z} \to \mathbb{Z}\) defined by \(f(x) = 3x + 1\), for all \(x \in \mathbb{Z}\).
(b) \(F: \mathbb{Q} \to \mathbb{Q}\) defined by \(F(x) = 3x + 1\), for all \(x \in \mathbb{Q}\).
(c) \(g: \mathbb{R} \to \mathbb{R}\) defined by \(g(x) = x^3\), for all \(x \in \mathbb{R}\).
(d) \(G: \mathbb{Q} \to \mathbb{Q}\) defined by \(G(x) = x^3\), for all \(x \in \mathbb{Q}\).
(e) \(k: \mathbb{R} \to \mathbb{R}\) defined by \(k(x) = e^{-x^2}\), for all \(x \in \mathbb{R}\).
(f) \(K: \mathbb{R}^{\ast} \to \mathbb{R}\) defined by \(K(x) = e^{-x^2}\), for all \(x \in \mathbb{R}^{\ast}\).
Note: \(\mathbb{R}^{\ast} = \{x \in \mathbb{R}\ |\ x \ge 0\}.\)
(g) \(K_1: \mathbb{R}^{\ast} \to T\) defined by \(K_1(x) = e^{-x^2}\), for all \(x \in \mathbb{R}^{\ast}\), where \(T = \{y \in \mathbb{R}\ |\ 0 < y \le 1\}\).
(h) \(h: \mathbb{R} \to \mathbb{R}\) defined by \(h(x) = \dfrac{2x}{x^2 + 4}\), for all \(x \in \mathbb{R}\).
(i) \(H: \{x \in \mathbb{R}\ |\ x \ge 0\} \to \{y \in \mathbb{R}\ |\ 0 \le y \le \dfrac{1}{2}\}\) defined by \(H(x) = \dfrac{2x}{x^2 + 4}\), for all \(x \in \{x \in \mathbb{R}\ |\ x \ge 0\}\).
- For each of the following functions, determine if the function is a bijection. Justify all conclusions.
(a) \(F: \mathbb{R} \to \mathbb{R}\) defined by \(F(x) = 5x + 3\), for all \(x \in \mathbb{R}\).
(b) \(G: \mathbb{Z} \to \mathbb{Z}\) defined by \(G(x) = 5x + 3\), for all \(x \in \mathbb{Z}\).
(c) \(f: (\mathbb{R} - \{4\}) \to \mathbb{R}\) defined by \(f(x) = \dfrac{3x}{x - 4}\), for all \(x \in (\mathbb{R} - \{4\})\).
(d) \(g: (\mathbb{R} - \{4\}) \to (\mathbb{R} - \{3\})\) defined by \(g(x) = \dfrac{3x}{x - 4}\), for all \(x \in (\mathbb{R} - \{4\})\).
- Let \(s: \mathbb{N} \to \mathbb{N}\), where for each \(n \in \mathbb{N}\), \(s(n)\) is the sum of the distinct natural number divisors of \(n\). This is the sum of the divisors function that was introduced in Preview Activity \(\PageIndex{2}\) from Section 6.1. Is \(s\) an injection? Is \(s\) a surjection? Justify your conclusions.
- Let \(d: \mathbb{N} \to \mathbb{N}\), where \(d(n)\) is the number of natural number divisors of \(n\). This is the number of divisors function introduced in Exercise (6) from Section 6.1. Is the function \(d\) an injection? Is the function \(d\) a surjection? Justify your conclusions.
- In Preview Activity \(\PageIndex{2}\) from Section 6.1 , we introduced the birthday function. Is the birthday function an injection? Is it a surjection? Justify your conclusions.
- (a) Let \(f: \mathbb{Z} \times \mathbb{Z} \to \mathbb{Z}\) be defined by \(f(m,n) = 2m + n\). Is the function \(f\) an injection? Is the function \(f\) a surjection? Justify your conclusions.
(b) Let \(g: \mathbb{Z} \times \mathbb{Z} \to \mathbb{Z}\) be defined by \(g(m,n) = 6m + 3n\). Is the function \(g\) an injection? Is the function \(g\) a surjection? Justify your conclusions.
- (a) Let \(f: \mathbb{R} \times \mathbb{R} \to \mathbb{R} \times \mathbb{R}\) be defined by \(f(x,y) = (2x, x + y)\). Is the function \(f\) an injection? Is the function \(f\) a surjection? Justify your conclusions.
(b) Let \(g: \mathbb{Z} \times \mathbb{Z} \to \mathbb{Z} \times \mathbb{Z}\) be defined by \(g(x,y) = (2x, x + y)\). Is the function \(g\) an injection? Is the function \(g\) a surjection? Justify your conclusions.
- Let \(f: \mathbb{R} \times \mathbb{R} \to \mathbb{R}\) be the function defined by \(f(x, y) = -x^2y + 3y\), for all \((x, y) \in \mathbb{R} \times \mathbb{R}\). Is the function \(f\) and injection? Is the function \(f\) a surjection? Justify your conclusions.
- Let \(g: \mathbb{R} \times \mathbb{R} \to \mathbb{R}\) be the function defined by \(g(x, y) = (x^3 + 2)sin y\), for all \((x, y) \in \mathbb{R} \times \mathbb{R}\). Is the function \(g\) and injection? Is the function \(g\) a surjection? Justify your conclusions.
- Let \(A\) be a nonempty set. The identity function on the set \(A\), denoted by \(I_A\), is the function \(I_A: A \to A\) defined by \(I_A (x) = x\) for every \(x\) in \(A\). Is \(I_A\) an injection? Is \(I_A\) a surjection? Justify your conclusions.
- Let \(A\) and \(B\) be two nonempty sets. Define
\[p_1: A \times B \to A \text{ by } p_1(a, b) = a\]
for every \((a, b) \in A \times B\). That is the first projection function introduced in Exercise (5) in Section 6.2.
(a) Is the function \(p_1\) a surjection? Justify your conclusion.
(b) If \(B = \{b\}\), is the function \(p_1\) an injection? Justify your conclusion.
(c) Under what condition(s) is the function \(p_1\) not an injection? Make a conjecture and prove it.
- Define \(f: \mathbb{N} \to \mathbb{Z}\) be defined as follows: For each \(n \in \mathbb{N}\),
\[f(n) = \dfrac{1 + (-1)^n (2n - 1)}{4}.\]
Is the function \(f\) an injection? Is the function \(f\) a surjection? Justify your conclusions.
Suggestions. Start by calculating several outputs for the function before you attempt to write a proof. In exploring whether or not the function is an injection, it might be a good idea to uses cases based on whether the inputs are even or odd. In exploring whether f is a surjection, consider using cases based on whether the output is positive or less than or equal to zero.
- Let \(C\) be the set of all real functions that are continuous on the closed interval [0, 1]. Define the function \(A: C \to \mathbb{R}\) as follows: For each \(f \in C\).
\[A(f) = \int_0^1 f(x)dx.\]
Is the function \(A\) an injection? Is it a surjection? Justify your conclusions.
- Let \(A = \{(m, n)\ |\ m \in \mathbb{Z}, n \in \mathbb{Z}, \text{ and } n \ne 0\}\). Define \(f: A \to \mathbb{Q}\) as follows:
For each \((m, n) \in A\), \(f(m, n) = \dfrac{m + n}{n}\).
(a) Is the function f an injection? Justify your conclusion.
(b) Is the function f a surjection? Justify your conclusion.
- Evaluation of proofs
See the instructions for Exercise (19) on page 100 from Section 3.1.
(a)
Proposition. The function \(f: \mathbb{R} \times \mathbb{R} \to \mathbb{R} \times \mathbb{R}\) defined by \(f(x, y) = (2x + y, x - y)\) is an injection.
- Proof
-
For each \((a, b)\) and \((c, d)\) in \(\mathbb{R} \times \mathbb{R}\), if \(f(a, b) = f(c, d)\), then
\((2a + b, a - b) = (2c + d, c - d).\)
We will use systems of equations to prove that \(a = c\) and \(b = d\).
\[\begin{array} {rcl} {2a + b} &= & {2c + d} \\ {a - b} &= & {c - d} \\ {3a} &= & {3c} \\ {a} &= & {c} \end{array}\]
Since \(a = c\), we see that
\((2c + b, c - b) = (2c + d, c - d).\)
So \(b = d\). Therefore, we have proved that the function \(f\) is an injection.
(b)
Proposition. The function \(f: \mathbb{R} \times \mathbb{R} \to \mathbb{R} \times \mathbb{R}\) defined by \(f(x, y) = (2x + y, x - y)\) is an surjection.
- Proof
-
We need to find an ordered pair such that \(f(x, y) = (a, b)\) for each \((a, b)\) in \(\mathbb{R} \times \mathbb{R}\). That is, we need \((2x + y, x - y) = (a, b)\), or
\(2x + y = a\) and \(x - y = b\).
Treating these two equations as a system of equations and solving for \(x\) and \(y\), we find that
\(x = \dfrac{a + b}{3}\) and \(y = \dfrac{a - 2b}{3}\).
Hence, \(x\) and \(y\) are real numbers, \((x, y) \in \mathbb{R} \times \mathbb{R}\), and
\[\begin{array} {rcl} {f(x, y)} &= & {f(\dfrac{a + b}{3}, \dfrac{a - 2b}{3})} \\ {} &= & {(2(\dfrac{a + b}{3}) + \dfrac{a - 2b}{3}, \dfrac{a + b}{3} - \dfrac{a - 2b}{3})} \\ {} &= & {(\dfrac{2a + 2b + a - 2b}{3}, \dfrac{a + b - a + 2b}{3})} \\ {} &= & {(\dfrac{3a}{3}, \dfrac{3b}{3})} \\ {} &= & {(a, b).} \end{array}\]
Therefore, we. have proved that for every \((a, b) \in \mathbb{R} \times \mathbb{R}\), there exists an \((x, y) \in \mathbb{R} \times \mathbb{R}\) such that \(f(x, y) = (a, b)\). This proves that the function \(f\) is a surjection.
Explorations and Activities
- Piecewise Defined Functions. We often say that a function is a piecewise defined function if it has different rules for determining the output for different parts of its domain. For example, we can define a function \(f: \mathbb{R} \to \mathbb{R}\) by giving a rule for calculating \(f(x)\) when \(x \ge 0\) and giving a rule for calculating \(f(x)\) when x < 0 as follows:
\[f(x) = \begin{cases} x^2 + 1, & \text{ if \(x\) \(\ge\) 0;} \\ x - 1 & \text{ if \(x\) < 0.} \end{cases}\]
(a) Sketch a graph of the function \(f\). Is the function \(f\) and injection? Is the function \(f\) a surjection? Justify your conclusions.
For each of the following functions, determine if the function is an injection and determine if the function is a surjection. Justify all conclusions.
(b) \(g: [0, 1] \to (0, 1)\) by
\[g(x) = \begin{cases} 0.8, & \text{ if \(x = 0\);} \\ 0.5x & \text{ if \(0 < x < 1\);} \\ 0.6 & \text{ if \(x = 1\).} \end{cases}\]
(c) \(h: \mathbb{Z} \to \{0, 1\}\) by
\[h(x) = \begin{cases} 0, & \text{ if \(x\) is even;} \\ 1, & \text{ if \(x\) is odd.} \end{cases}\]
- Functions Whose Domain is \(\mathcal{M}_2(\mathbb{R})\). Let \(\mathcal{M}_2(\mathbb{R})\). represent the set of all 2 by 2 matrices over \(\mathbb{R}\).
(a) Defien det: \(\mathcal{M}_2(\mathbb{R}) \to \mathbb{R}\) by
\[det
\left [{\begin{array} {cc}
a & b\\
c & d\\
\end{array}} \right]
= ad - bc.\]
This is the determinant function introduced in Exercise (9) from Section 6.2. Is the determinant function an injection? Is the determinant function a surjection? Justify your conclusions.
(b) Define tran: \(\mathcal{M}_2(\mathbb{R}) \to \mathcal{M}_2(\mathbb{R})\) by
\[tran
\left [{\begin{array} {cc}
a & b\\
c & d\\
\end{array}} \right]
= A^T =
\left [{\begin{array} {cc}
a & c\\
b & d\\
\end{array}} \right].\]
This is the transpose function introduced in Exercise (10) from Section 6.2. Is the transpose function an injection? Is the transpose function a surjection? Justify your conclusions.
(c) Define \(F: \mathcal{M}_2(\mathbb{R}) \to \mathbb{R}\) by
\[F
\left [{\begin{array} {cc}
a & b\\
c & d\\
\end{array}} \right]
= a^2 + d^2 - b^2 - c^2.\]
Is the function \(F\) an injection? Is the function \(F\) a surjection? Justify your conclusions.
- Answer
-
Add texts here. Do not delete this text first.