Skip to main content

Section 3.1 Functions

Subsection 3.1.1 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.

Definition 3.1.1. Function.

A mapping is a function if and only if each input is mapped to exactly one output.

Definition 3.1.2. Onto.

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.

Definition 3.1.3. One-to-One.

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.

Definition 3.1.4. Bijection.

A bijection is a function that is one-to-one (injective) and onto (surjective).

Definition 3.1.5. Inverse Mapping.

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Ā 3.1.6. \(D=\{1,2,3,4,5\}\) \(C=\) \(\{1,1/2,\) \(1/3,1/4,1/5,1/6,1/7\}.\)

Table 3.1.6. Functions
Name Function Onto 1-1
\(f\)

\(f(1)=1\text{,}\) \(f(2)=1/2\text{,}\) \(f(3)=1/3\text{,}\) \(f(4)=1/4\text{,}\) \(f(5)=1/5\)

Yes No Yes
\(g\)

\(g(1)=1\text{,}\) \(g(2)=1/2\text{,}\) \(g(3)=1/3\text{,}\) \(g(4)=1/2\text{,}\) \(g(5)=1/3\)

Yes No No
\(h\)

\(h(1)=1\text{,}\) \(h(2)=1/2\text{,}\) \(h(3)=1/3\text{,}\) \(h(3)=1/6\text{,}\) \(h(4)=1/4\text{,}\) \(h(5)=1/5\text{,}\) \(h(5)=1/7\)

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\text{.}\) We denote the real numbers with \(\R\text{.}\) 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\}\text{.}\)

Subsection 3.1.2 Practice

Checkpoint 3.1.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 3.1.8.

Is your function onto? 1-1?

Checkpoint 3.1.9.

Write a 1-1 function from \(D\) to \(C.\)

Checkpoint 3.1.10.

Can you write a function from \(D\) onto \(C\text{?}\)

Checkpoint 3.1.11.

Write a function from \(\Z\) onto \(\{0,1\}.\)