Section 3.1 – Basic Terminology¶
definition: A function from a set $A$ to $B$ is a binary relation where every element in $A$ corresponds to exactly one element in $B$. We write,
"$f$ is a function from $A$ to $B$".
We typically define functions using equations (e.g. $f(x) = x^2$) but they can also be lists.
Example
Sub-example¶
This is a function since everything in $A$ corresponds to one thing in $B$. It's okay for multiple things in $A$ to go to one thing in $B$.
Sub-example¶
This is not a function since $4$ is not mapped to anything.
Sub-example¶
This is a function.
Sub-example¶
This is not a function since $2$ corresponds to two values.
Recall¶
The vertical line test.
This is a function since every point in $x$ maps to one point in $y$.
This is not a function since some points in $x$ correspond to two values of $y$.
Notation¶
if $(a,b) \in f$ then we write,
where $b$ is the image of $a$.
Onto and One-to-One¶
definitions: For a function $f: A \mapsto B$,
- $f$ is onto (or subjective) if $\forall b \in B, \exists a \in A$ such that $f(a) = b$.
- $f$ is one-to-one (or injective) if all elements of $A$ map to different elements of $B$.
- intuitive definition: if $x_1 \neq n_2 \Rightarrow f(x_1) \neq f(x_2)$
- proof definition: if $f(x_1) = f(x_2) \Rightarrow x_1 = x_2$
Example
Solution
This is onto since every element in $B$ is mapped to. It is also one-to-one since every element in $A$ points to something different.
Domain¶
For a function $f: A \mapsto B$,
- the domain of $f$ is $A$
- the target of $f$ is $B$
- the range of $f$ the set ${ b \in B, \exists a \in A, f(a) = b }$
Functions with Formulas¶
Example
where $f: \mathbb Z \mapsto \mathbb R$.
Is $f$ one-to-one or onto?
Solution
Required to Prove One-to-One¶
Suppose $f(x_1) = f(x_2)$ then $x_1 = x_2$.
So¶
Suppose $f(x_1) = f(x_2)$,
Required to Prove Onto¶
We need $b \in \mathbb R$ such that $a \in \mathbb Z$ where $f(a) = b$.
So¶
Suppose $b \in \mathbb R$ such that $a \in \mathbb Z$ where $f(a) = b$.
Consider $b = 1$,
Solution
If $f: \mathbb R \mapsto \mathbb R$ instead.
Supposed $b \in \mathbb R$ and suppose $\exists a in \mathbb R$ such that $f(a) = b$.
Then,
Example
Let $f: \mathbb R \mapsto \mathbb R$ where,
Solution
Not one-to-one since,
Not onto since,
Bijection¶
definition: If a function $f$ is both one-to-one and onto it is a bijection.
Functional Equality¶
definition: Two functions, $f$ and $g$ are equal if,
- They have the same target
- They have the same domain
- $f(x) = g(x)$, $\forall x \in$ domain
Floor and Ceiling¶
definition: The floor of $x$ is the function,
Example
definition: The ceiling of $x$ is the function,
Function Equality¶
definition: Two functions $f$ and $g$ are equal if:
- They have the same target
- They have the same domain
- $f(x) = g(x)$ for all $x$ in the domain of $f$
Example
Let $f: \mathbb R \mapsto \mathbb Z$ defined by,
and let $g: \mathbb Z \mapsto \mathbb Z$ defined by,
and let $h: \mathbb Z \mapsto \mathbb R$ defined by,
Solution
$f \neq g$ since they have different domains but the range of $h$ is equal to the range of $g$. However since they have different targets $h \neq g$.
Special Functions¶
definition: For any set $A$ the identity function, $i_A: A \mapsto A$, where,
we can also say this is the set of ordered pairs, $i_A = { (a,a): a \in A }
definition: The absolute value of $x$, $|x|$ is defined as,