Function
A function is a many-to-one map between two sets.
Formal definition
Let $D,R \neq \emptyset$ be sets.
If
$$ \forall x \in D: \exists y \in R, f(x)=y $$
Then $f$ is a function of domain $D$ and range $R$, noted as $f: D \to R$.
Example:
$$ f(x)=2x^2, x \in \mathbb{C} $$
is a function, where $f: \mathbb{C} \to \mathbb{C}$
Image and preimage
Given function $f: A \to B$
If for $A_1 \subseteq A, B_1 \subseteq B$,
$$ B_1=f(A_1)=\{f(a)|\forall a \in A_1\} $$
Then $B_1$ is known as the image of $A_1$ in $B$ under $f$, and $A_1$ is known as the pre-image of $B_1$ under $f$.