2.101 Introduction to functions
See references 1, 2
Definition:
A function is a relation between a set of inputs A and a set of outputs B.
Each input maps to exactly one output.
Multiple items in A can map to a single item in B.
Example of a function:
- each item A has an output in B
- 65 has no output
- 62 has 2 outputs
Read as: function f maps A to B.
$$ x \in A: x \rightarrow f(x) = y \ \ \ (y \in B) $$
Definition of domain:
A is the set of inputs and is called the domain of f.
We write:
We write:
$$ D_f = A $$
Definition of co-domain:
B is the set of outputs and is called the co-domain of f.
We write:
$$ coD_f = B $$We write:
y is called the image of x,
whereas x is called the pre-image of y.
We write:
$$ f(x) = y $$
Definition of range:
R is the subset of B and a set of all outputs (images) and is called the range of f.
The range of a function is the set of all images.
The range of a function is a subset of its corresponding co-domain.
We write:
$$ R_f \subseteq coD_f $$Example:
A = {0, 1, 2, 3, 4, ...}
B = {0, 1, 2, 3, 4, ...}
$ x \rightarrow 2x+1 $$ D_f = A $
$ coD_f = B $
R = {1, 3, 5, 7, 9, ...}
f(0) = 1
f(1) = 3
Image of x, f(x) = y
Exercise:
$ f: Z \rightarrow Z \ with \ f(x) = |x| $ // integers, absolute value of x
$ D_f = Z $
$ coD_f = Z $
$ R_f = Z \{0\} = \{0, 1, 2, 3, ...\} $
f(-1) = f(1) = 1, hence pre-images of 1 = {-1, 1}
Exercise
$ g: R \rightarrow R \ with \ g(x) = x^2 + 1$
$ D_g = R $ // real numbers
$ coD_g = R $
- any number squared is positive
- +1 makes for bigger than 1
g(-2) = g(2) = 5 hence, pre-images of 5 = {-2, 2}
Plotting Functions
see reference #3
Linear Functions
$$ f(x) = ax + b $$
- straight line function
- passes through the point (0, b)
- a is the gradient
$$ f: R \rightarrow R \ with f(x) = ax + b $$
- if gradient a > 0 then the function is increasing
- $ x_1 < x_2 $ then $ f(x_1) < f(x_2) $
Quadratic Functions
$$ f(x) = ax^2 + bx = c $$
- where a, b, and c are the numbers and a $ \neq $ 0
Exponential Function
$$ f(x) = b^x \ where \ b > 0 \ and \ b \neq 1 $$
- variable b is called the base of the function
- Domain $ ]-\infty, \infty[ $
- Range $ ]0, \infty[ $
- Horizontal asymptote y= 0
Exponential decay function
Laws of Exponents
$ b^x \cdot b^y = b^{x+y} $
$ \frac{b^x}{b^y} = b^{x-y} $
$ (b^x)^y = b^{xy} $
$ (ab)^x = a^x \cdot b^x $
$ (\frac{a}{b})^x = \frac{a^x}{b^x} $Natural Logarithm function
see reference 4
2.106 Injective and surjective functions
see reference 5
Injective (one-to-one) Functions
- one-to-one function
- Let $ f: A \rightarrow B $ be a function
- Definition: f is said to be an injective (one-to-one) function if and only if:
- for all $ a,b \in A $, if $ a \neq b $ then $ f(a) \neq f(b) $
Surjective (onto) functions
Resources
- https://www.coursera.org/learn/uol-discrete-mathematics/lecture/dEASs/2-101-introduction
- https://www.coursera.org/learn/uol-discrete-mathematics/lecture/dEASs/2-101-introduction
- https://www.coursera.org/learn/uol-discrete-mathematics/lecture/LJ9wV/2-104-plotting-functions
- https://www.youtube.com/watch?v=8qs6QxGCIQU
- https://www.coursera.org/learn/uol-discrete-mathematics/lecture/XyWA9/2-106-injective-and-surjective-functions