Bijection, injection and surjection


surjectivenon-surjective
injective
bijective

injective-only
non-
injective

surjective-only

general

In mathematics, injections, surjections and bijections are classes of functions distinguished by the manner in which arguments and images are related or mapped to each other.
A function maps elements from its domain to elements in its codomain. Given a function :
An injective function need not be surjective, and a surjective function need not be injective. The four possible combinations of injective and surjective features are illustrated in the adjacent diagrams.

Injection

A function is injective if each possible element of the codomain is mapped to by at most one argument. Equivalently, a function is injective if it maps distinct arguments to distinct images. An injective function is an injection. The formal definition is the following.
The following are some facts related to injections:
A function is surjective if each possible image is mapped to by at least one argument. In other words, each element in the codomain has non-empty preimage. Equivalently, a function is surjective if its image is equal to its codomain. A surjective function is a surjection. The formal definition is the following.
The following are some facts related to surjections:
A function is bijective if it is both injective and surjective. A bijective function is a bijection. A function is bijective if and only if every possible image is mapped to by exactly one argument. This equivalent condition is formally expressed as follow.
The following are some facts related to bijections:
Suppose that one wants to define what it means for two sets to "have the same number of elements". One way to do this is to say that two sets "have the same number of elements", if and only if all the elements of one set can be paired with the elements of the other, in such a way that each element is paired with exactly one element. Accordingly, one can define two sets to "have the same number of elements"—if there is a bijection between them. In which case, the two sets are said to have the same cardinality.
Likewise, one can say that set "has fewer than or the same number of elements" as set, if there is an injection from to ; one can also say that set "has fewer than the number of elements" in set, if there is an injection from to, but not a bijection between and.

Examples

It is important to specify the domain and codomain of each function, since by changing these, functions which appear to be the same may have different properties.
;Injective and surjective
;Injective and non-surjective
;Non-injective and surjective
;Non-injective and non-surjective

Properties

In the category of sets, injections, surjections, and bijections correspond precisely to monomorphisms, epimorphisms, and isomorphisms, respectively.

History

The injective-surjective-bijective terminology was originally coined by the French Bourbaki group, before their widespread adoption.