Function
Let
A (typed) function from to is the triple , where is the domain, is the codomain, and is a relation also called the graph of the function with the following property:
(each element of is related to exactly one (=unique) element of ).
Notation:
Instead of , we write ( maps to )
Instead of , we write or ( is mapped to )
Link to originalFunction graph
Link to originalDomain of a function
If is a function from set to set , then the domain of is the set .
Link to originalCodomain
Link to originalImage / Range
The image of a function is the set of all output values it can produce:
It is a subset of the codomain . Iff is surjective, then .
Link to originalPreimage (or inverse image) of a set
Input shift.
shifts a function to the right by , because in order to get the same output as with .
Link to originalInjective (one-to-one) function
A function is called injective if
Or conversely:
(an injective but not surjective function)
Link to originalSurjective (onto) function
Link to originalBijective function
A function is called bijective if it is both injective and surjective.
A bijection basically means that there is a one-to-one correspondence between all elements of the domain and the codomain: For every unique element in , there is a unique element in .
EXAMPLE
is not injective, because and it is not surjective, because (negative real numbers are not in the codomain).
is injective, but not surjective because we canot reach negative numbers.
is not injective but surjective ( has a solution for all ).
is bijective.
If a function from two finite sets of equal length is injective, it is also surjective (→ bijective).
Let be finite sets, , .
Proof:
Injective surjective:
are pairwise different: (injective)
(“slight abuse of notation” … in logic, they use for the image of under )]
→ surjective
Surjective injective:
Assumption
Assume it’s not injective
not surjective.
Strictly formally, we would need to first define the cardinality with bijective functions to get to the definition of equality for bijective images…
But uhm this thing makes quite obviously sense if you just look at the definition.
The theorem above can be extended to inifinite sets: Two infinite sets have the same size if there is a bijection between them.
→ Not all infinite sets are the same size! (since we cannot find a bijection between them)
Transclude of composition
Identity function
The identity function on a set is the function .
Inverse function
exists if and only if is bijective.
EXAMPLE
→
EXAMPLE
(always for any x)
An inverse function exists if and only if the function is bijective and the inverse has to be bijective too.
(since the inverse of is which we assumed to be bijective so the theorem applies to too).Proof:
“”
Let , we want to show is surjective and injective.
(one of the conditions for the inverse function)
(e.g , as in the line above: )
surjective
injective
“”
bijective, we want to proof there is an inverse.
(definition of surjective)
injective
Let the unique such that
( is the identity function)
( is the identity function)
Function evaluation
denotes the set of all functions (hom-class or exponential object).
Read: The evaluation applies a function to an argument and returns the result .