Skip to main content

Section 5.1 Function Basics

Definition 5.1.

Let \(A\) and \(B\) be sets. A function (also called a map) \(f\) from \(A\) to \(B\text{,}\) denoted \(f : A \to B\text{,}\) is a subset \(F \subseteq A \times B\) such that for each \(a\in A\text{,}\) there is one and only one pair in \(F\) of the form \((a, b)\text{.}\) The set \(A\) is called the domain of \(f\) and the set \(B\) is called the codomain of \(f\text{.}\)

Example 5.2.

  • A constant map \(f : A \to B\) is any function of the form \(f (x) = b\) for all \(x\in A\text{,}\) where \(b\in B\) is some fixed element.
  • The identity map on \(A\) is the function \(1_A : A \to A\) defined by \(1_A(x) = x\) for all \(x\in A\text{.}\)
  • The inclusion map from \(S\) to \(A\) is the function \(j : S \to A\) defined by \(j(x) = x\) for all \(x\in S\)
  • If \(f : A \to B\) is a function, the restriction of \(f\) to \(S\text{,}\) denoted \(f|_S\text{,}\) is the function \(f|_S : S \to B\) defined by \(f|_S(x) = f (x)\) for all \(x\in S\text{.}\)
  • If \(g : S \to B\) is a function, an extension of \(g\) to \(A\) is any function \(G : A \to B\) such that \(G|S = g\text{.}\)
  • The projection maps from \(A \times B\) are the functions \(π_1 : A \times B \to A\) and \(π_2 : A \times B \to B\) defined by \(π_1((a, b)) = a\) and \(π_2((a, b)) = b\) for all \((a, b)\in A \times B\text{.}\) For any finite collection of sets \(A1, \dots, A p\text{,}\) projection maps
    \begin{equation*} π_i : A1 \times\cdots \times A p \to A_i \end{equation*}
    for all \(i\in {1, \dots, p}\) can be defined similarly.
  • Let \(X\) be a non-empty set, and let \(S \subseteq X\) be a subset. The characteristic map for \(S\) in \(X\text{,}\) denoted \(χS\text{,}\) is the function \(χS : X \to {0, 1}\) defined by
    \begin{equation*} χS(y) = \begin{cases} 1, & if y\in S// 0, & if y\in X - S. \end{cases} \end{equation*}
Let \(A\text{,}\) \(B \subseteq X\) be subsets. Prove that \(χA = χB\) if and only if \(A = B\text{.}\)
Hint.
Observe that “\(χA = χB\)” is a statement of equality of functions, whereas “\(A = B\)” is a statement of equality of sets.
Let \(A\) and \(B\) be sets. A partial function from \(A\) to \(B\) is a function of the form \(f J : J \to B\text{,}\) where \(J \subseteq A\text{.}\) We can think of partial functions from \(A\) to \(B\) as subsets of \(A \times B\) that satisfy a certain condition. Let \(f J\) and \(gK\) be partial functions from \(A\) to \(B\text{.}\) Prove that \(f J \subseteq g K\) if and only if \(J \subseteq K\) and \(gK |J = f J\text{.}\)