1.2: Functions
( \newcommand{\kernel}{\mathrm{null}\,}\)
If A and B are sets, we call a relation R⊂A×B a function with domain A if for every a∈A there exists one, and only one, b∈B such that (a,b)∈R. We typically indicate such a relation with the notation f:A→B, and write f(a)=b to indicate that (a,b)∈R. We call the set of all b∈B such that f(a)=b for some a∈A the range of f. With this notation, we often refer to R as the graph of f.
We say f:A→B is one-to-one if for every b in the range of f there exists a unique a∈A such that f(a)=b. We say f is onto if for every b∈B there exists at least one a∈A such that f(a)=b. For example, the function f:Z+→Z+ defined by f(z)=z2 is one-to-one, but not onto, whereas the function f:Z→Z defined by f(z)=z+1 is both one-to-one and onto.
Given two functions, g:A→B and f:B→C, we define the composition, denoted f∘g:A→C, to be the function defined by f∘g(a)=f(g(a)).
If f:A→B is both one-to-one and onto, then we may define a function f−1:B→A by requiring f−1(b)=a if and only if f(a)=b. Note that this implies that f∘f−1(b)=b for all b∈B and f−1∘f(a)=a for all a∈A. We call f−1 the inverse of f.
Given any collection of nonempty sets, {Aα},α∈I, we assume the existence of a function ϕ:I→B=⋃α∈IAα, with the property that ϕ(α)∈Aα. We call such a function a choice function. The assumption that choice functions always exist is known as the Axiom of Choice.