§ 2. Functions¶
Definition 2.1 : Rule of Assignment
A rule of assignment is a subset \(r\) of the cartesian product \(C \times D\) of two sets, having the property that each element of \(C\) appears as the first coordinate of at most one ordered pair belonging to \(r\).
Thus, a subset \(r\) of \(C \times D\) is a rule of assignment if
We think of \(r\) as a way of assigning, to the element \(c\) of \(C\), the element \(d\) of \(D\) for which \((c, d) \in r\).
Definition 2.2 : Domain / Image Set
Given a rule of assignment \(r\), the domain of \(r\) is defined to be the subset of \(C\) consisting of all first coordinates of elements of \(r\), and the image set of \(r\) is defined as the subset of \(D\) consisting of all second coordinates of elements of \(r\). Formally,
Note that given a rule of assignment \(r\), its domain and image are entirely determined.
Definition 2.3 : Function
A function \(f\) is a rule of assignment \(r\), together with a set \(B\) that contains the image set of \(r\).
The domain \(A\) of the rule \(r\) is also called the domain of the function \(f\).
The image set of \(r\) is also called the image set of \(f\).
The set \(B\) is called the range of \(f\).
If \(f\) is a function having domain \(A\) and range \(B\), we express this fact by writing
which is read "\(f\) is a function from \(A\) to \(B\)", or "\(f\) is a mapping from \(A\) into \(B\)", or simply "\(f\) maps \(A\) into \(B\)".
If \(f: A \rightarrow B\) and if \(a\) is an element of \(A\), we denote by \(f(a)\) the unique element of \(B\) that the rule determining \(f\) assigns to \(a\); it is called the value of \(f\) at \(a\), or sometimes the image of \(a\) under \(f\). Formally, if \(r\) is the rule of the function \(f\), then \(f(a)\) denotes the unique element of \(B\) such that \((a, f(a)) \in r\).
Definition 2.4 : Restriction
If \(f: A \rightarrow B\) and if \(A_{0}\) is a subset of \(A\), we define the restriction of \(f\) to \(A_{0}\) to be the function mapping \(A_{0}\) into \(B\) whose rule is
It is denoted by \(f \mid A_{0}\), which is read "\(f\) restricted to \(A_{0}\)".
Definition 2.5 : Composite
Given functions \(f: A \rightarrow B\) and \(g: B \rightarrow C\), we define the composite \(g \circ f\) of \(f\) and \(g\) as the function \(g \circ f: A \rightarrow C\) defined by the equation \((g \circ f)(a)=g(f(a))\).
Formally, \(g \circ f: A \rightarrow C\) is the function whose rule is
Note that \(g \circ f\) is defined only when the range of \(f\) equals the domain of \(g\).
Definition 2.6 : Injective / Surjective / Bijective
A function \(f: A \rightarrow B\) is said to be injective (or one-to-one) if for each pair of distinct points of \(A\), their images under \(f\) are distinct.
It is said to be surjective (or \(f\) is said to map \(A\) onto \(B\)) if every element of \(B\) is the image of some element of \(A\) under the function \(f\).
If \(f\) is both injective and surjective, it is said to be bijective (or is called a one-to-one correspondence).
More formally, \(f\) is injective if
and \(f\) is surjective if
Definition 2.7 : Inverse
If \(f\) is bijective, there exists a function from \(B\) to \(A\) called the inverse of \(f\). It is denoted by \(f^{-1}\) and is defined by letting \(f^{-1}(b)\) be that unique element \(a\) of \(A\) for which \(f(a)=b\).
Lemma 2.1
Let \(f: A \rightarrow B\). If there are functions \(g: B \rightarrow A\) and \(h: B \rightarrow A\) such that \(g(f(a))=a\) for every \(a\) in \(A\) and \(f(h(b))=b\) for every \(b\) in \(B\), then \(f\) is bijective and \(g=h=f^{-1}\).
Definition 2.8 : Image / Preimage
Let \(f: A \rightarrow B\). If \(A_{0}\) is a subset of \(A\), we denote by \(f\left(A_{0}\right)\) the set of all images of points of \(A_{0}\) under the function \(f\); this set is called the image of \(A_{0}\) under \(f\). Formally,
If \(B_{0}\) is a subset of \(B\), we denote by \(f^{-1}\left(B_{0}\right)\) the set of all elements of \(A\) whose images under \(f\) lie in \(B_{0}\); it is called the preimage of \(B_{0}\) under \(f\) (or the "counterimage", or the "inverse image", of \(B_{0}\) ). Formally,