Functions
A relation $R \subseteq X \times Y$ is a function if for every $x \in X$ there is a unique $y \in Y$ such that $xRy$.
$f(x)$ is the value of $f$ at $x$. It is the image of $x$.
If $y = f(x)$, $x$ is a pre-image of $y$.
The complete pre-image of $y$ would be denoted $f^{-1}(y)$. This is
$\{x \in X : f(x) = y\}$.
The range of a function $f$ is the set $f(X)$ where $X$ is the domain.
$f(X) = \{f(x) : x \in X\}$.
Failure to be a function
A relation fails to be a function if
-
There is an item in the domain which is not mapped to the co-domain.
-
An item in the domain maps to more than one item in the co-domain.
Composition of functions
Given two relations $R \subseteq A \times B$ and $Q \subseteq B \times C$, $R \circ Q$ was their composition. This was the set of pairs from the Cartesian product of $A$ and $C$ such that they are linked by some $b \in B$.
Given two functions $f:X \to Y$ and $g:Y \to Z$, the composition , $f \circ g$ is also a function.
Properties of functions
A function is injective or one to one if each item in the co-domain is mapped to by exactly one item in the domain.
A function is surjective if every value in the co-domain is mapped to by an item in the domain.
A function is bijective if it is injective and surjective.
A function $f:X \to Y$ is bijective if and only if the inverse relation $f^{-1} \subseteq Y \times X$ is a function.