Bijection, injection and surjection 1830142 198626278 2008-03-16T13:37:36Z Mike Fikes 922901 Expand scope of cardinality description so that it is not limited to bijection but also discusses injection. In [[mathematics]], '''injections''', '''surjections''' and '''bijections''' are classes of [[function (mathematics)|functions]] distinguished by the manner in which ''[[parameter|arguments]]'' (input [[expression (mathematics)|expressions]] from the [[domain (mathematics)|domain]]) and ''[[image (mathematics)|images]]'' (output expressions from the [[codomain]]) are related or ''mapped to'' each other. *A function <math>f: \; A \to B</math> is '''[[injective function|injective]]''' ('''one-to-one''') if :<math>\forall x, y \in A, f(x)=f(y) \Rightarrow x=y\ </math> or, equivalently, if :<math>\forall x,y \in A, x \neq y \Rightarrow f(x) \neq f(y).\ </math> One could also say that elements of the codomain (sometimes called range by mistake) are mapped to by at most one element (argument) of the [[domain (mathematics)|domain]]; not every element of the codomain, however, need to have an argument mapped to it. An injective function is an '''injection'''. *A function is '''[[surjective function|surjective]]''' ('''onto''') if every element of the [[codomain]] is mapped to by some element (argument) of the domain; this is expressed logically by saying that, :<math>\forall y \in B, \exists x \in A \text{ such that } y = f(x).\ </math> Note that with this definition, some images may be mapped to by more than one argument. (Equivalently, a function where the [[range (mathematics)|range]] is equal to the codomain.) A surjective function is a '''surjection'''. *A function is '''[[bijective function|bijective]]''' ('''one-to-one and onto''') [[if and only if]] (iff) it is ''both'' injective and surjective. (Equivalently, ''every'' element of the codomain is mapped to by ''exactly one'' element of the domain.) A bijective function is a '''bijection''' ('''one-to-one correspondence'''). (''Note: a '''one-to-one''' function is injective, but may fail to be surjective, while a '''one-to-one correspondence''' is both injective and surjective.'') An injective function need not be surjective (not all elements of the codomain may be associated with arguments), and a surjective function need not be injective (some images may be associated with ''more than one'' argument). The four possible combinations of injective and surjective features are illustrated in the following diagrams. {| style="margin: 0 0 0 0;" |- | [[Image:Bijection.svg|thumb|200px|Injective and surjective (bijective).]] | [[Image:Injection.svg|thumb|200px|Injective and non-surjective.]] |- | [[Image:Surjection.svg|thumb|200px|Non-injective and surjective.]] | [[Image:Total function.svg|thumb|200px|Non-injective and non-surjective.]] |} ==Injection== {{main|injective function}} [[Image:Injective composition.svg|thumb|300px|Injective composition: the second function need not be injective.]] A function is '''injective''' ('''one-to-one''') if every 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 function <math>f: A \to B</math> is injective [[iff]] for all <math>a,b \in A</math>, we have <math>f(a) = f(b) \Rarr a = b.</math> *A function ''f'' : ''A'' &rarr; ''B'' is injective if and only if ''A'' is empty or ''f'' is left-invertible, that is, there is a function ''g'': ''B'' &rarr; ''A'' such that ''g'' o ''f'' = identity function on ''A''. *Since every function is surjective when its [[codomain]] is restricted to its [[range (mathematics)|range]], every injection induces a bijection onto its range. More precisely, every injection ''f'' : ''A'' &rarr; ''B'' can be factored as a bijection followed by an inclusion as follows. Let ''f''<sub>''R''</sub> : ''A'' &rarr; ''f''(''A'') be ''f'' with codomain restricted to its image, and let ''i'' : ''f''(''A'') &rarr; ''B'' be the inclusion map from ''f''(''A'') into ''B''. Then ''f'' = ''i'' o ''f''<sub>''R''</sub>. A dual factorisation is given for surjections below. *The composition of two injections is again an injection, but if ''g'' o ''f'' is injective, then it can only be concluded that ''f'' is injective. See the figure at right. *Every [[embedding]] is injective. ==Surjection== {{main|surjective function}} [[Image:Surjective composition.svg|thumb|300px|Surjective composition: the first function need not be surjective.]] A function is '''surjective''' ('''onto''') if every possible image is mapped to by at least one argument. In other words, every element in the codomain has non-empty [[preimage]]. Equivalently, a function is surjective if its range is equal to its codomain. A surjective function is a '''surjection'''. The formal definition is the following. :The function <math>f: A \to B</math> is surjective [[iff]] for all <math>b \in B</math>, there is <math>a \in A</math> such that <math>f(a) = b.</math> *A function ''f'' : ''A'' &rarr; ''B'' is surjective if and only if it is right-invertible, that is, if and only if there is a function ''g'': ''B'' &rarr; ''A'' such that ''f'' o ''g'' = identity function on ''B''. (This statement is equivalent to the [[axiom of choice]].) *By collapsing all arguments mapping to a given fixed image, every surjection induces a bijection defined on a quotient of its domain. More precisely, every surjection ''f'' : ''A'' &rarr; ''B'' can be factored as a projection followed by a bijection as follows. Let ''A''/~ be the equivalence classes of ''A'' under the following equivalence relation: ''x'' ~ ''y'' if and only if ''f''(''x'') = ''f''(''y''). Equivalently, ''A''/~ is the [[set]] of all preimages under ''f''. Let ''P''(~) : ''A'' &rarr; ''A''/~ be the projection map which sends each ''x'' in ''A'' to its equivalence class [''x'']<sub>~</sub>, and let ''f''<sub>''P''</sub> : ''A''/~ &rarr; ''B'' be the well-defined function given by ''f''<sub>''P''</sub>([''x'']<sub>~</sub>) = ''f''(''x''). Then ''f'' = ''f''<sub>''P''</sub> o ''P''(~). A dual factorisation is given for injections above. *The composition of two surjections is again a surjection, but if ''g'' o ''f'' is surjective, then it can only be concluded that ''g'' is surjective. See the figure at right*. ==Bijection== {{main|bijective function}} [[Image:Bijective composition.svg|thumb|300px|Bijective composition: the first function need not be surjective and the second function need not be injective.]] A function is '''bijective''' if it is both injective and surjective. A bijective function is a '''bijection''' ('''one-to-one correspondence'''). 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 follows. :The function <math>f: A \to B</math> is bijective [[iff]] for all <math>b \in B</math>, there is a unique <math>a \in A</math> such that <math>f(a) = b.</math> *A function ''f'' : ''A'' &rarr; ''B'' is bijective if and only if it is invertible, that is, there is a function ''g'': ''B'' &rarr; ''A'' such that ''g'' o ''f'' = identity function on ''A'' and ''f'' o ''g'' = identity function on ''B''. This function maps each image to its unique preimage. *The composition of two bijections is again a bijection, but if ''g'' o ''f'' is a bijection, then it can only be concluded that ''f'' is injective and ''g'' is surjective. (See the figure at right and the remarks above regarding injections and surjections.) *The bijections from a set to itself form a [[group (mathematics)|group]] under composition, called the [[symmetric group]]. ==Cardinality== Suppose you want 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, we can define two sets to "have the same number of elements" if there is a bijection between them. We say that the two sets have the same [[cardinality]]. Likewise, we can say that set <math>A</math> "has fewer than or the same number of elements" as set <math>B</math> if there is an injection from <math>A</math> to <math>B</math>. We can also say that set <math>A</math> "has fewer than the number of elements" in set <math>B</math> if there is an injection from <math>A</math> to <math>B</math> but not a bijection between <math>A</math> and <math>B</math>. ==Examples== It is important to specify the domain and codomain of each function since by changing these, functions which we think of as the same may have different ''jectivity''. <!-- someone change this wording please. MarSch --> ===Injective and surjective (bijective)=== * For every set ''A'' the identity function id<sub>''A''</sub> and thus specifically <math>\mathbf{R} \to \mathbf{R} : x \mapsto x</math>. * <math>\mathbf{R}^+ \to \mathbf{R}^+ : x \mapsto x^2</math> and thus also its inverse <math>\mathbf{R}^+ \to \mathbf{R}^+ : x \mapsto \sqrt{x}</math>. * The [[exponential function]] <math>\exp : \mathbf{R} \to \mathbf{R}^+ : x \mapsto \mathrm{e}^x</math> and thus also its inverse the [[natural logarithm]] <math>\ln : \mathbf{R}^+ \to \mathbf{R} : x \mapsto \ln{x}</math> ===Injective and non-surjective=== * The exponential function <math>\exp : \mathbf{R} \to \mathbf{R} : x \mapsto \mathrm{e}^x</math> ===Non-injective and surjective=== * <math>\mathbf{R} \to \mathbf{R} : x \mapsto (x-1)x(x+1) = x^3 - x </math> * <math>\mathbf{R} \to [-1,1] : x \mapsto \sin(x)</math> ===Non-injective and non-surjective=== * <math>\mathbf{R} \to \mathbf{R} : x \mapsto x^2</math> ==Properties== * For every function ''f'', subset ''A'' of the domain and subset ''B'' of the codomain we have ''A'' &sub; ''f''<sup>&nbsp;&minus;1</sup>(''fA'') and ''f''(''f''<sup>&nbsp;&minus;1</sup>''B'') &sub; ''B''. If ''f'' is injective we have ''A'' = ''f''<sup>&nbsp;&minus;1</sup>(''fA'') and if ''f'' is surjective we have ''f''(''f''<sup>&nbsp;&minus;1</sup>''B'') = ''B''. * For every function ''h'' : ''A'' &rarr; ''C'' we can define a surjection ''H'' : ''A'' &rarr; ''h(A)'' : a &rarr; h(a) and an injection ''I'' : ''h(A)'' &rarr; ''C'' : a &rarr; a. It follows that ''h'' = ''I'' <small>o</small> ''H''. This decomposition is unique [[up to isomorphism]]. ==Category theory== In the [[category (mathematics)|category]] of [[set]]s, injections, surjections, and bijections correspond precisely to [[monomorphism]]s, [[epimorphism]]s, and [[isomorphism]]s, respectively. ==History== This terminology was originally coined by the [[Bourbaki]] group. ==See also == *[[Injective module]] *[[Permutation]] *[[Horizontal line test]] [[Category:Set theory]] [[Category:Mathematical relations]] [[Category:Functions and mappings]] [[bg:Биекция]] [[cs:Bijekce]] [[da:Bijektiv]] [[de:Bijektivität]] [[es:Función biyectiva]] [[fr:Bijection]] [[io:Bijektio]] [[he:התאמה על]] [[nl:Bijectie]] [[ja:全単射]] [[pl:Bijekcja]] [[ru:Биекция]] [[fi:Bijektio]] [[sv:Bijektiv]] [[uk:Бієкція]] [[zh:单射、双射与满射]]