3.1: Functions
Terminology
The idea of mapping one set of objects to another is basic to mathematics. Mapping and correspondence are undefined terms. We call the set mapped from the domain and the set mapped to the codomain . The range is the subset of the codomain to which a function is mapped.
A mapping is a function if and only if each input is mapped to exactly one output.
A mapping is onto if and only if for each element of the codomain there exists some element of the domain mapped to it.
Onto functions are also referred to as surjections .
A mapping is one-to-one if and only if \(f(x)=f(a)\) implies \(x=a\).
One-to-one functions are also referred to as injections .
A bijection is a function that is one-to-one (injective) and onto (surjective).
The inverse mapping for a mapping \(f:D \to C\) is the mapping \(f^{-1}:C \to D\) such that \(f^{-1}(y)=x\) if and only if \(f(x)=y\).
Note that the inverse mapping of a function is also a function if and only if the function is one-to-one.
Consider the examples in Table \(\PageIndex{6}\) \(D=\{-3,-2,-1,0,1,2,3\}, C=\{1,1/2,1/3,1/4,1/5,1/6,1/7\}\).
| Name | Function | Onto | 1-1 | |
| \(f\) |
\(f(1)=1, f(2)=1/2, f(3)=1/3, f(4)=1/4, f(5)=1/5\) |
Yes | No | Yes |
| \(g\) |
\(g(1)=1, g(2)=1/2, g(3)=1/3, g(4)=1/2, g(5)=1/3\) |
Yes | No | No |
| \(h\) |
\(h(1)=1, h(2)=1/2, h(3)=1/3, h(3)=1/6, h(4)=1/4, h(5)=1/5, h(5)=1/7h\) |
No | Yes | No |
Because many functions will have numbers as their domains and/or codomains we use shorthand notation for many common sets of numbers. We denote the integers with \(Z\). We denote the real numbers with \(R\). If we want to refer to only positive numbers we use a + superscript. For example \(Z^+\) refers to the positive integers (also known as the counting numbers). Note as well that 0 is neither negative nor positive. If we want all the positive integers and zero we use \(Z^+ \cup \{0\}\).
Practice
Checkpoint \(\PageIndex{7}\)
Write a function from \(D=\{−3,−2,−1,0,1,2,3\}\) to \(C=\{0,1,2,3,4,5,6,7,8,9,10\}\).
Checkpoint \(\PageIndex{8}\)
Is your function onto? 1-1?
Checkpoint \(\PageIndex{9}\)
Write a 1-1 function from \(D\) to \(C\).
Checkpoint \(\PageIndex{10}\)
Can you write a function from \(D\) onto \(C\)?
Checkpoint \(\PageIndex{11}\)
Write a function from \(Z\) onto \(\{0,1\}\).