Naive set theory: Functions
The concept of function
You have probably encountered the concept of function before as a kind of machine that produces output for given input. In this theory page, we will introduce a function as a binary relation between sets with special properties.
Definition of a function
Function
Let and be sets. A function from to , also called a map or mapping, is a relation from to , also referred to as the graph of , with the following two properties:
- For every , there exists a such that ;
- For every and all : if and , then .
In other words: is a function from to if for each element of the set there is exactly one element of such that is an element of . A function is often specified via a function rule; see the examples.
If , we usually denote this as and call the image of under and an original of under . We often denote a function as . The set is called the domain of the function, just like with any relation, and sometimes denoted as ; is called the codomain. The range or complete image of the function consists of the set of all images under . Instead of , we usually write or .
Let be a function from to and . Then the preimage of under is defined as
Examples
Equality of functions
Equality of functions
Two functions and are equal if they are defined over the same domain and for every in the domain:.
In other words, the functions and are equal if and only if their graphs are equal, i.e. .
Sometimes it is also required that the codomain of and are equal to each other. This, for example, results in the functions and not being equal.
Example
Restriction of a function
Restriction of a function
Let be a function from to and . The restriction of to is the function defined by for all . In other words, as a relation: .
The image of under is .
Examples
Identity function and characteristic function The identity function on a nonempty set is defined as for all .
Let be a nonempty set and . The characteristic function of in , also called indicator function of in and sometimes also denoted as , is the function defined by .