# Injective function

https://arbital.com/p/injective_function

by Patrick Stevens Jun 14 2016 updated Jun 29 2016

A Function $f: X \to Y$ is injective if it has the property that whenever $f(x) = f(y)$, it is the case that $x=y$. Given an element in the image, it came from applying $f$ to exactly one element of the domain.

This concept is also commonly called being "one-to-one". That can be a little misleading to someone who does not already know the term, however, because many people's natural interpretation of "one-to-one" (without otherwise having learnt the term) is that every element of the domain is matched up in a one-to-one way with every element of the domain, rather than simply with some element of the domain. That is, a rather natural way of interpreting "one-to-one" is as "bijective" rather than "injective".

# Examples

• The function $\mathbb{N} \to \mathbb{N}$ (where $\mathbb{N}$ is the set of natural numbers) given by $n \mapsto n+5$ is injective: since $n+5 = m+5$ implies $n = m$. Note that this function is not surjective: there is no natural number $k$ such that $k+5 = 2$, for instance, so $2$ is not in the range of the function.
• The function $f: \mathbb{N} \to \mathbb{N}$ given by $f(n) = 6$ for all $n$ is not injective: since $f(1) = f(2)$ but $1 \not = 2$, for instance.