Functions and Relations
Definition 53: Relation
A relation from a set to a set is a subset of the Cartesian product :
If , we say that is related to by , and we write .
Definition 54: Function
A relation is a function iff the following two conditions hold:
- Totality. .
- Uniqueness. .
Terminology: Domain, Codomain, Range
For a function , the set is called the domain of , the set is called the codomain of , and the set is called the range of .
Notation
Denoting under asserts that maps to , i.e. that .
Definition 55: Graph of a Function
The graph of a function is the set of ordered pairs for all :
Terminology: Partial Function
A partial function from to is a relation that satisfies the uniqueness condition of functions but not necessarily the totality condition. In other words, a partial function may not be defined for every element of .
Terminology: Endofunction
An endofunction or square function over a set is a function from to itself, i.e. a function .
Definition 56: Identity Function
For any set , the identity function on , denoted , is the endofunction from to defined by for all .
Functions with Multiple Arguments
Definition 57: -ary Function
An -ary function is a function that takes arguments. Formally, an -ary function from sets to a set is a function .
Terminology: Unary, Binary, Ternary Functions
In Definition 57, when , we call a unary function; when , we call a binary function; and when , we call a ternary function. Also, when , we call a nullary function, which is just a constant element of .
Function Composition and Iteration
Definition 58: Composition of Functions
Let and be functions. The composition of and , denoted , is the function from to defined by for all .
Theorem 13: Compositions Involving the Identity Function
Let be a function. Then .
Definition 59: Idempotent Function
A endofunction is idempotent if .
Iteration, Transients, and Periods
Definition 60: Iterated Function
Let be an endofunction. The th iterate of , denoted , is defined recursively as follows:
Definition 61: Trajectory of an Element under a Function
Let be an endofunction and let . The trajectory of under , denoted , is the sequence of elements obtained by iteratively applying to :
Example.
Let be defined by . Then the trajectory of under is:
Remark
While we are currently using to denote the th iterate of a function, the notation may also be used to denote the th power of a function in the context of function algebras, which is a different concept.
Definition 62: Periodic Element under a Function
Let be an endofunction and let . We say that is periodic under if there exists a positive integer such that . The smallest such positive integer is called the period of under .
Theorem 14: Periodicity of Endofunctions with Finite Domains
Classification of Functions
Definition 63: Injective Function
A function is injective or one-to-one if no two distinct elements in map to the same element in . Formally:
Definition 64: Surjective Function
A function is surjective or onto if every element in is the image of at least one element in . Formally:
Theorem 15: Alternative Characterization of Surjectivity
A function is surjective iff the range of equal to its codomain .
Definition 65: Bijection
A function is bijective if it is both injective and surjective. In other words, a bijection is a function that establishes a one-to-one correspondence between the elements of and the elements of .
Theorem 16: Inverse of a Bijection
Let be a bijection. Then there exists a unique function such that and . The function is called the inverse of .
For this reason, bijective functions are also called invertible functions.