Functions
Introduction
For non-empty sets and , a "function from to " is a relation from to such that for each , there is exactly one such that .
We write to denote that is a function from to .
For :
- 
Domain: 
- 
Codomain: 
- 
is the image of under 
- 
is a preimage of under 
- 
The Range is the specific set of codomains that were assigned. It is always a subset of the codomain. 
- 
is a real-valued function 
- 
is an integer-valued function 
Combination of functions by addition or multiplication retain the same domain and codomain, i.e.
| Characteristic | Definition | 
|---|---|
| Injection / One-to-one | |
| Surjection / Onto | |
| Bijection / One-to-one Correspondence | Both one-to-one and onto | 
| Total | |
| Partial | Not total | 
The inverse function will inverse the mapping: .
Only Bijection function can have an inverse function.
The composition of functions can be written as . The order is important.
The composition of function and its inverse will produce the input:
Special functions
You should be familiar with the exponential, logarithmic and factorial functions already.
Graph of functions
A relation is a function if and only if no vertical line intersects the graph at more than one point.
Growth of functions
Big O notation simplifies a function to its growth rate in respect to the input size.
| Notation | Condition | Asymptotic boundary | Name | 
|---|---|---|---|
| Upper | Big O | ||
| Lower | Big Omega | ||
| Tight | Big Theta / Order of growth |