Function

Let
A function from to is the triple , where is the domain (Definitionsmenge), is the codomain (Zielmenge), and is a relation also called the graph of the function with the following property:
(each element of is related to exactly one element of ).
Notation:
Instead of , we write .
Instead of , we write or

The graph of a function is the set of ordered pairs , where :

Input shift.

shifts a function to the right by , because in order to get the same output as with .

Injective (one-to-one) function

A function is called injective if
Or conversely:

(an injective but not surjective function)

Surjective (onto) function

A function is called surjective if
In words: every element in the codomain is the image of at least one element in the domain.

Bijective 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)

preimage

Preimage (or inverse image) of a set

is the set of all elements in the domain that get mapped to elements in under .
Note that this notation does not require to be invertible - it just describes which inputs lead to outputs in .

Example

For and , we have:

since these are all the values of where lands in .

Link to original