Functions associate inputs with outputs in a well-defined way.
A function from a set to a set is a rule that assigns each input in to exactly one output in .
Suppose and are sets. A function from to (denoted as ) is a relation from to , satisfying the property that for each the relation contains exactly one ordered pair of form . The statement is abbreviated .
Injective
A function is injective if different inputs map to different outputs. That is, for a function , if for all , implies .
Surjective
A function is surjective if there is an input that maps to every output in the codomain. For a function , is surjective if for every there is an with .
Bijective
A function is bijective if it is both injective and surjective.
The Pigeonhole Principle
Suppose and are finite sets and is any function.
- If , then is not injective.
- If , then is not surjective.
Identity function
The identity function on a set is the function that sends any element of the set to itself. For a set , the identity function on is the function defined as for every
Inverse relation
Given a relation from to , the inverse relation of is the relation from to defined as . In other words, the inverse of is the relation obtained by interchanging the elements in every ordered pair in .
If is bijective then its inverse is the function . The functions f and obey the equations ◦ f = i_Af ◦ f^{−1} = i_B$.