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.
Every element x in the domain of a function has one output f(x).
Example of a function:
each item A has an output in B
Example of a relationship that is not a function:
65 has no output
62 has 2 outputs
$$ f: A \rightarrow B $$
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:
$$ 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 $$
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
$ R_g = [1, +\infty] $
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