# Function

Let $X$ and $Y$ be sets. We say that a relation $f \colon X \rightarrow Y$ is a function if the relation associates to each $x \in X$ exactly one $f(x) \in Y$. We say that $f$ is one-to-one (or injective) if for all $x_1,x_2 \in X$, $f(x_1)=f(x_2)$ implies $x_1=x_2$. We say that $f$ is onto (or surjective) if for all $y \in Y$ there exists $x \in X$ so that $f(x)=y$. We say that $f$ is a bijection if it is both one-to-one and onto.
• If $f$ is one-to-one then there exists a unique function $f^{-1} \colon Y \rightarrow X$ called the inverse function of $f$ with the property that for all $x \in X$ and $y \in Y$, $f^{-1}(f(x)) = x$ and $f(f^{-1}(y)) = y$.
• Let $O \subset Y$. We define $f^{-1}[O]$, the inverse image of $O$, by the formula
$$f^{-1}[O] = \left\{ x \in X \colon f(x) \in O \right\}.$$