Injective, Surjective, and Bijective Functions

# Injective, Surjective, and Bijective Functions

The notion of a function is fundamentally important in practically all areas of mathematics, so we must review some basic definitions regarding functions.

 Definition: A Function from a set $A$ called the Domain to a set $B$ called the Codomain is a rule $f : A \to B$ which maps every element $x \in A$ to exactly one element $y \in B$ which we write $f(x) = y$. The element $y \in B$ is said to be the Image of $x$ under $f$, and the Range of $f$ is the set of elements $y \in B$ such that there exists $x \in A$ for which $f(x) = y$.

Many of the functions we are familiar with are of the form $f : \mathbb{R} \to \mathbb{R}$ such as the function $f(x) = x$ which maps every real number $x \in \mathbb{R}$ to itself. Another such example is the function $g : \mathbb{R} \to \mathbb{R}$ defined by $g(x) = x^2$ which maps every real number $x \in \mathbb{R}$ to its square.

In the first example we have that the range of $f$, commonly denoted as $R(f)$ is all of $\mathbb{R}$, so $R(f) = \mathbb{R}$. In the second example, we see that $R(g) = \mathbb{R}^+ \cup \{ 0 \}$ since there exists no real number $x \in \mathbb{R}$ for which $f(x) = y$ if $y < 0$.

 Definition: A function $f : A \to B$ is said to be Injective or One-to-One if whenever $x \neq y$, $f(x) \neq f(y)$, or equivalently, whenever $f(x) = f(y)$ we have that $x = y$.

For example, consider the function $f : \mathbb{R} \to \mathbb{R}$ defined by $f(x) = 3x$. Suppose that $f(x) = f(y)$. Then:

(1)
\begin{align} \quad 3x = 3y \\ \quad x = y \end{align}

Therefore whenever $f(x) = f(y)$ we have that $x = y$ so $f$ is injective.

For a more complicated example, consider the function $g : \mathbb{R} \to \mathbb{R}$ defined by $g(x) = x^2$. Again suppose that $g(x) = g(y)$. Then:

(2)
\begin{align} \quad x^2 &= y^2 \\ \quad \sqrt{x^2} &= \sqrt{y^2} \\ \quad \pm x &= \pm y \end{align}

Choose $x > 0$. Then $x = \pm y$ and hence $x = y$ and $x = -y$, so $g$ is not injective. To verify this, note that $g(2) = 2^2 = 4 = (-2)^2 = g(-2)$ but clearly $2 \neq -2$.

 Definition: A function $f : A \to B$ is said to be Surjective or Onto if $R(f) = B$, that is for all $y \in B$ there exists an $x \in A$ such that $f(x) = y$.

For example, consider the function $f : \mathbb{R} \to \mathbb{R}$ defined by $f(x) = 3x$ once again. Let $y \in \mathbb{R}$ and suppose that $f(x) = y$. Then $3x = y$ so $x = \frac{y}{3}$, so:

(3)
\begin{align} \quad f(x) = f \left ( \frac{y}{3} \right ) = y \end{align}

Therefore $f$ is surjective.

For another example, consider the function $g : \mathbb{R} \to \mathbb{R}$ defined by $g(x) = x^2$ from earlier. Let $y \in \mathbb{R}$ be such that $y < 0$ and suppose that $g(x) = y$. Then $x^2 = y$ and $x = \sqrt{y}$. But $\sqrt{y} \not \in \mathbb{R}$, so $g$ is not surjective.

 Definition: A function $f : A \to B$ is said to be Bijective if it is both injective and surjective.

In the examples from earlier, we see that $f$ is both injective and surjective, so $g$ is bijective. On the other hand, $g$ is not injective and not surjective so $g$ is definitely not bijective.