<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Surjective_function</id>
	<title>Surjective function - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Surjective_function"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Surjective_function&amp;action=history"/>
	<updated>2026-04-18T22:21:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=Surjective_function&amp;diff=18223&amp;oldid=prev</id>
		<title>202.189.109.82: /* Definition */</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Surjective_function&amp;diff=18223&amp;oldid=prev"/>
		<updated>2025-09-10T08:14:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Definition&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{short description|Mathematical function such that every output has at least one input}}&lt;br /&gt;
{{Redirect|Onto|3=wiktionary:onto}}&lt;br /&gt;
{{Functions}}&lt;br /&gt;
In [[mathematics]], a &amp;#039;&amp;#039;&amp;#039;surjective function&amp;#039;&amp;#039;&amp;#039; (also known as &amp;#039;&amp;#039;&amp;#039;surjection&amp;#039;&amp;#039;&amp;#039;, or &amp;#039;&amp;#039;&amp;#039;onto function&amp;#039;&amp;#039;&amp;#039; {{IPAc-en|ˈ|ɒ|n|.|t|uː}}) is a [[Function (mathematics)|function]] {{math|&amp;#039;&amp;#039;f&amp;#039;&amp;#039;}} such that, for every element {{math|&amp;#039;&amp;#039;y&amp;#039;&amp;#039;}} of the function&amp;#039;s [[codomain]], there exists {{em|at least}} one element {{math|&amp;#039;&amp;#039;x&amp;#039;&amp;#039;}} in the function&amp;#039;s [[Domain of a function|domain]] such that {{math|&amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) {{=}} &amp;#039;&amp;#039;y&amp;#039;&amp;#039;}}. In other words, for a function {{math|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; : &amp;#039;&amp;#039;X&amp;#039;&amp;#039; → &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;}}, the codomain {{math|&amp;#039;&amp;#039;Y&amp;#039;&amp;#039;}} is the [[Image (mathematics)|image]] of the function&amp;#039;s domain {{math|&amp;#039;&amp;#039;X&amp;#039;&amp;#039;}}.&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;{{Cite web|url=https://www.mathsisfun.com/sets/injective-surjective-bijective.html|title=Injective, Surjective and Bijective|website=www.mathsisfun.com|access-date=2019-12-07}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;:1&amp;quot;&amp;gt;{{Cite web|url=https://brilliant.org/wiki/bijection-injection-and-surjection/|title=Bijection, Injection, And Surjection {{!}} Brilliant Math &amp;amp; Science Wiki|website=brilliant.org|language=en-us|access-date=2019-12-07}}&amp;lt;/ref&amp;gt; It is not required that {{math|&amp;#039;&amp;#039;x&amp;#039;&amp;#039;}} be [[unique (mathematics)|unique]]; the function {{math|&amp;#039;&amp;#039;f&amp;#039;&amp;#039;}} may map one or more elements of {{math|&amp;#039;&amp;#039;X&amp;#039;&amp;#039;}} to the same element of {{math|&amp;#039;&amp;#039;Y&amp;#039;&amp;#039;}}.&lt;br /&gt;
&lt;br /&gt;
The term &amp;#039;&amp;#039;surjective&amp;#039;&amp;#039; and the related terms &amp;#039;&amp;#039;[[injective function|injective]]&amp;#039;&amp;#039; and &amp;#039;&amp;#039;[[bijective function|bijective]]&amp;#039;&amp;#039; were introduced by [[Nicolas Bourbaki]],&amp;lt;ref&amp;gt;{{Citation | url = http://jeff560.tripod.com/i.html | title = Earliest Uses of Some of the Words of Mathematics | contribution = Injection, Surjection and Bijection | publisher = Tripod |first=Jeff|last=Miller}}.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite book|url=https://books.google.com/books?id=-CXn6y_1nJ8C&amp;amp;q=injection+surjection+bijection+bourbaki&amp;amp;pg=PA106|title=Bourbaki|last=Mashaal|first=Maurice|date=2006|publisher=American Mathematical Soc.|isbn=978-0-8218-3967-6|pages=106|language=en}}&amp;lt;/ref&amp;gt; a group of mainly [[France|French]] 20th-century [[mathematician]]s who, under this pseudonym, wrote a series of books presenting an exposition of modern advanced mathematics, beginning in 1935. The French word &amp;#039;&amp;#039;[[wikt:sur#French|sur]]&amp;#039;&amp;#039; means &amp;#039;&amp;#039;over&amp;#039;&amp;#039; or &amp;#039;&amp;#039;above&amp;#039;&amp;#039;, and relates to the fact that the [[image (mathematics)|image]] of the domain of a surjective function completely covers the function&amp;#039;s codomain.&lt;br /&gt;
&lt;br /&gt;
Any function induces a surjection by [[restriction of a function|restricting]] its codomain to the image of its domain. Every surjective function has a [[Inverse function#Left and right inverses|right inverse]] assuming the [[axiom of choice]], and every function with a right inverse is necessarily a surjection. The [[function composition|composition]] of surjective functions is always surjective. Any function can be decomposed into a surjection and an injection.&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
{{further|topic=notation|Function (mathematics)#Notation}}&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;surjective function&amp;#039;&amp;#039;&amp;#039; is a [[Function (mathematics)|function]] whose [[image (mathematics)|image]] is equal to its [[codomain]].  Equivalently, a function &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; with [[domain of a function|domain]] &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; and codomain &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt; is surjective if for every &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt; there exists at least one &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;f(x)=y&amp;lt;/math&amp;gt;.&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt; Surjections are sometimes denoted by a two-headed rightwards arrow ({{unichar|21A0|RIGHTWARDS TWO HEADED ARROW|ulink=Unicode}}),&amp;lt;ref name=&amp;quot;Unicode Arrows&amp;quot;&amp;gt;{{cite web| title = Arrows – Unicode| url = https://www.unicode.org/charts/PDF/U2190.pdf| access-date = 2013-05-11}}&amp;lt;/ref&amp;gt; as in &amp;lt;math&amp;gt;f\colon X\twoheadrightarrow Y&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Symbolically,&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;math&amp;gt;f\colon X \rightarrow Y&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is said to be surjective if&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\forall y \in Y, \, \exists x \in X, \;\; f(x)=y&amp;lt;/math&amp;gt;.&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|url=http://www.math.umaine.edu/~farlow/sec42.pdf|title=Injections, Surjections, and Bijections|last=Farlow|first=S. J.|author-link= Stanley Farlow |website=math.umaine.edu|access-date=2019-12-06}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
[[File:Codomain2.SVG|right|thumb|250px|&amp;#039;&amp;#039;&amp;#039;A non-surjective function&amp;#039;&amp;#039;&amp;#039; from [[domain of a function|domain]] &amp;#039;&amp;#039;X&amp;#039;&amp;#039; to [[codomain]] &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;. The smaller yellow oval inside &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; is the [[Image (mathematics)|image]] (also called [[range of a function|range]]) of &amp;#039;&amp;#039;f&amp;#039;&amp;#039;. This function is &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; surjective, because the image does not fill the whole codomain. In other words, &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; is colored in a two-step process: First, for every &amp;#039;&amp;#039;x&amp;#039;&amp;#039; in &amp;#039;&amp;#039;X&amp;#039;&amp;#039;, the point &amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) is colored yellow; Second, all the rest of the points in &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;, that are not yellow, are colored blue. The function &amp;#039;&amp;#039;f&amp;#039;&amp;#039; would be surjective only if there were no blue points.]]&lt;br /&gt;
{{for|more examples|#Gallery}}&lt;br /&gt;
&lt;br /&gt;
* For any set &amp;#039;&amp;#039;X&amp;#039;&amp;#039;, the [[identity function]] id&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;X&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; on &amp;#039;&amp;#039;X&amp;#039;&amp;#039; is surjective.&lt;br /&gt;
* The function {{math|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; : &amp;#039;&amp;#039;&amp;#039;Z&amp;#039;&amp;#039;&amp;#039; → {0, 1}&amp;lt;nowiki/&amp;gt;}} defined by &amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;n&amp;#039;&amp;#039;) = &amp;#039;&amp;#039;n&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;[[Modular arithmetic|mod]]&amp;#039;&amp;#039;&amp;#039; 2 (that is, [[even number|even]] [[integer]]s are mapped to 0 and [[odd number|odd]] integers to 1) is surjective.&lt;br /&gt;
* The function {{math|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; : &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039;}} defined by &amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) = 2&amp;#039;&amp;#039;x&amp;#039;&amp;#039; + 1 is surjective (and even [[bijective function|bijective]]), because for every [[real number]] &amp;#039;&amp;#039;y&amp;#039;&amp;#039;, we have an &amp;#039;&amp;#039;x&amp;#039;&amp;#039; such that &amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) = &amp;#039;&amp;#039;y&amp;#039;&amp;#039;: such an appropriate &amp;#039;&amp;#039;x&amp;#039;&amp;#039; is (&amp;#039;&amp;#039;y&amp;#039;&amp;#039; − 1)/2.&lt;br /&gt;
* The function {{math|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; : &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039;}} defined by &amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) = &amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; − 3&amp;#039;&amp;#039;x&amp;#039;&amp;#039; is surjective, because the pre-image of any [[real number]] &amp;#039;&amp;#039;y&amp;#039;&amp;#039; is the solution set of the cubic polynomial equation &amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; − 3&amp;#039;&amp;#039;x&amp;#039;&amp;#039; − &amp;#039;&amp;#039;y&amp;#039;&amp;#039; = 0, and every cubic polynomial with real coefficients has at least one real root. However, this function is not [[injective function|injective]] (and hence not [[bijective function|bijective]]), since, for example, the pre-image of &amp;#039;&amp;#039;y&amp;#039;&amp;#039; = 2 is {&amp;#039;&amp;#039;x&amp;#039;&amp;#039; = −1, &amp;#039;&amp;#039;x&amp;#039;&amp;#039; = 2}. (In fact, the pre-image of this function for every &amp;#039;&amp;#039;y&amp;#039;&amp;#039;,  −2 ≤ &amp;#039;&amp;#039;y&amp;#039;&amp;#039; ≤ 2 has more than one element.)&lt;br /&gt;
* The function {{math|&amp;#039;&amp;#039;g&amp;#039;&amp;#039; : &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039;}} defined by {{Nowrap begin}}&amp;#039;&amp;#039;g&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) = &amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;{{Nowrap end}} is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; surjective, since there is no real number &amp;#039;&amp;#039;x&amp;#039;&amp;#039; such that {{Nowrap begin}}&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; = −1{{Nowrap end}}. However, the function {{math|&amp;#039;&amp;#039;g&amp;#039;&amp;#039; : &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039;{{sub|≥0}}}} defined by {{math|1=&amp;#039;&amp;#039;g&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) = &amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;}} (with the restricted codomain) &amp;#039;&amp;#039;is&amp;#039;&amp;#039; surjective, since for every &amp;#039;&amp;#039;y&amp;#039;&amp;#039; in the nonnegative real codomain &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;, there is at least one &amp;#039;&amp;#039;x&amp;#039;&amp;#039; in the real domain &amp;#039;&amp;#039;X&amp;#039;&amp;#039; such that {{Nowrap begin}}&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; = &amp;#039;&amp;#039;y&amp;#039;&amp;#039;{{Nowrap end}}.&lt;br /&gt;
* The [[natural logarithm]] function {{math|ln : &amp;lt;nowiki&amp;gt;(0, +∞)&amp;lt;/nowiki&amp;gt; → &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039;}} is a surjective and even bijective (mapping from the set of positive real numbers to the set of all real numbers). Its inverse, the [[exponential function]], if defined with the set of real numbers as the domain and the codomain, is not surjective (as its range is the set of positive real numbers). &lt;br /&gt;
* The [[matrix exponential]] is not surjective when seen as a map from the space of all &amp;#039;&amp;#039;n&amp;#039;&amp;#039;×&amp;#039;&amp;#039;n&amp;#039;&amp;#039; [[matrix (mathematics)|matrices]] to itself. It is, however, usually defined as a map from the space of all &amp;#039;&amp;#039;n&amp;#039;&amp;#039;×&amp;#039;&amp;#039;n&amp;#039;&amp;#039; matrices to the [[general linear group]] of degree &amp;#039;&amp;#039;n&amp;#039;&amp;#039; (that is, the [[group (mathematics)|group]] of all &amp;#039;&amp;#039;n&amp;#039;&amp;#039;×&amp;#039;&amp;#039;n&amp;#039;&amp;#039; [[invertible matrix|invertible matrices]]). Under this definition, the matrix exponential is surjective for complex matrices, although still not surjective for real matrices.&lt;br /&gt;
* The [[projection (set theory)|projection]] from a [[cartesian product]] {{math|&amp;#039;&amp;#039;A&amp;#039;&amp;#039; × &amp;#039;&amp;#039;B&amp;#039;&amp;#039;}} to one of its factors is surjective, unless the other factor is empty.&lt;br /&gt;
* In a 3D video game, vectors are projected onto a 2D flat screen by means of a surjective function.&lt;br /&gt;
&lt;br /&gt;
{{Clear}}&lt;br /&gt;
&lt;br /&gt;
==Properties==&lt;br /&gt;
A function is [[bijective function|bijective]] if and only if it is both surjective and [[injective function|injective]].&lt;br /&gt;
&lt;br /&gt;
If (as is often done) a function is identified with its [[graph of a function|graph]], then surjectivity is not a property of the function itself, but rather a property of the [[Map (mathematics)|mapping]].&amp;lt;ref&amp;gt;{{cite book|author=T. M. Apostol|title=Mathematical Analysis|year=1981|publisher=Addison-Wesley|page=35}}&amp;lt;/ref&amp;gt; This is, the function together with its codomain. Unlike injectivity, surjectivity cannot be read off of the graph of the function alone.&lt;br /&gt;
&lt;br /&gt;
===Surjections as right invertible functions===&lt;br /&gt;
The function {{Nowrap|&amp;#039;&amp;#039;g&amp;#039;&amp;#039; : &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; → &amp;#039;&amp;#039;X&amp;#039;&amp;#039;}} is said to be a [[Inverse function#Left and right inverses|right inverse]] of the function {{Nowrap|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; : &amp;#039;&amp;#039;X&amp;#039;&amp;#039; → &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;}} if {{Nowrap begin}}&amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;g&amp;#039;&amp;#039;(&amp;#039;&amp;#039;y&amp;#039;&amp;#039;)) = &amp;#039;&amp;#039;y&amp;#039;&amp;#039;{{Nowrap end}} for every &amp;#039;&amp;#039;y&amp;#039;&amp;#039; in &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; (&amp;#039;&amp;#039;g&amp;#039;&amp;#039; can be undone by &amp;#039;&amp;#039;f&amp;#039;&amp;#039;).  In other words, &amp;#039;&amp;#039;g&amp;#039;&amp;#039; is a right inverse of &amp;#039;&amp;#039;f&amp;#039;&amp;#039; if the [[function composition|composition]] {{Nowrap|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; &amp;lt;small&amp;gt;o&amp;lt;/small&amp;gt; &amp;#039;&amp;#039;g&amp;#039;&amp;#039;}} of &amp;#039;&amp;#039;g&amp;#039;&amp;#039; and &amp;#039;&amp;#039;f&amp;#039;&amp;#039; in that order is the [[identity function]] on the domain &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; of &amp;#039;&amp;#039;g&amp;#039;&amp;#039;. The function &amp;#039;&amp;#039;g&amp;#039;&amp;#039; need not be a complete [[inverse function|inverse]] of &amp;#039;&amp;#039;f&amp;#039;&amp;#039; because the composition in the other order, {{Nowrap|&amp;#039;&amp;#039;g&amp;#039;&amp;#039; &amp;lt;small&amp;gt;o&amp;lt;/small&amp;gt; &amp;#039;&amp;#039;f&amp;#039;&amp;#039;}}, may not be the identity function on the domain &amp;#039;&amp;#039;X&amp;#039;&amp;#039; of &amp;#039;&amp;#039;f&amp;#039;&amp;#039;. In other words, &amp;#039;&amp;#039;f&amp;#039;&amp;#039; can undo or &amp;quot;&amp;#039;&amp;#039;reverse&amp;#039;&amp;#039;&amp;quot; &amp;#039;&amp;#039;g&amp;#039;&amp;#039;, but cannot necessarily be reversed by it.&lt;br /&gt;
For example, &amp;lt;math&amp;gt;f:\R^2\rightarrow\R,(x,y)\mapsto x&amp;lt;/math&amp;gt; has right inverse &amp;lt;math&amp;gt;g:z\mapsto (z,0);&amp;lt;/math&amp;gt; the composition in the other order gives {{tmath|1=g(f((x,y)))=(x,0)}}, which equals {{tmath|(x,y)}} only if {{tmath|1=x=0}}.&lt;br /&gt;
&lt;br /&gt;
Every function with a right inverse is necessarily a surjection. The proposition that every surjective function has a right inverse is equivalent to the [[axiom of choice]].&lt;br /&gt;
&lt;br /&gt;
If {{Nowrap|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; : &amp;#039;&amp;#039;X&amp;#039;&amp;#039; → &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;}} is surjective and &amp;#039;&amp;#039;B&amp;#039;&amp;#039; is a [[subset]] of &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;, then {{Nowrap begin}}&amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;f&amp;#039;&amp;#039;&amp;lt;sup&amp;gt; −1&amp;lt;/sup&amp;gt;(&amp;#039;&amp;#039;B&amp;#039;&amp;#039;)) = &amp;#039;&amp;#039;B&amp;#039;&amp;#039;{{Nowrap end}}. Thus, &amp;#039;&amp;#039;B&amp;#039;&amp;#039; can be recovered from its [[preimage]] {{Nowrap|&amp;#039;&amp;#039;f&amp;#039;&amp;#039;&amp;lt;sup&amp;gt; −1&amp;lt;/sup&amp;gt;(&amp;#039;&amp;#039;B&amp;#039;&amp;#039;)}}.&lt;br /&gt;
&lt;br /&gt;
For example, in the first illustration in the [[#Gallery|gallery]], there is some function &amp;#039;&amp;#039;g&amp;#039;&amp;#039; such that &amp;#039;&amp;#039;g&amp;#039;&amp;#039;(&amp;#039;&amp;#039;C&amp;#039;&amp;#039;) = 4. There is also some function &amp;#039;&amp;#039;f&amp;#039;&amp;#039; such that &amp;#039;&amp;#039;f&amp;#039;&amp;#039;(4) = &amp;#039;&amp;#039;C&amp;#039;&amp;#039;.  It doesn&amp;#039;t matter that &amp;#039;&amp;#039;g&amp;#039;&amp;#039; is not unique (it would also work if &amp;#039;&amp;#039;g&amp;#039;&amp;#039;(&amp;#039;&amp;#039;C&amp;#039;&amp;#039;) equals 3); it only matters that &amp;#039;&amp;#039;f&amp;#039;&amp;#039;  &amp;quot;reverses&amp;quot; &amp;#039;&amp;#039;g&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
===Surjections as epimorphisms===&lt;br /&gt;
A function {{Nowrap|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; : &amp;#039;&amp;#039;X&amp;#039;&amp;#039; → &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;}} is surjective if and only if it is [[right-cancellative]]:&amp;lt;ref&amp;gt;{{Cite book&lt;br /&gt;
|first=Robert&lt;br /&gt;
|last=Goldblatt&lt;br /&gt;
|title=Topoi, the Categorial Analysis of Logic&lt;br /&gt;
|url=https://historical.library.cornell.edu/cgi-bin/cul.math/docviewer?did=Gold010&amp;amp;id=3|access-date=2009-11-25&lt;br /&gt;
|edition=Revised&lt;br /&gt;
|year=2006&lt;br /&gt;
|orig-year=1984&lt;br /&gt;
|publisher=[[Dover Publications]]&lt;br /&gt;
|isbn=978-0-486-45026-1}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |title=Surjection iff Right Cancellable |url=https://proofwiki.org/wiki/Surjection_iff_Right_Cancellable |access-date=2025-06-30 |website=ProofWiki}}&amp;lt;/ref&amp;gt; given any functions {{Nowrap|&amp;#039;&amp;#039;g&amp;#039;&amp;#039;,&amp;#039;&amp;#039;h&amp;#039;&amp;#039; : &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; → &amp;#039;&amp;#039;Z&amp;#039;&amp;#039;}}, whenever {{Nowrap begin}}&amp;#039;&amp;#039;g&amp;#039;&amp;#039; &amp;lt;small&amp;gt;o&amp;lt;/small&amp;gt; &amp;#039;&amp;#039;f&amp;#039;&amp;#039; = &amp;#039;&amp;#039;h&amp;#039;&amp;#039; &amp;lt;small&amp;gt;o&amp;lt;/small&amp;gt; &amp;#039;&amp;#039;f&amp;#039;&amp;#039;{{Nowrap end}}, then {{Nowrap begin}}&amp;#039;&amp;#039;g&amp;#039;&amp;#039; = &amp;#039;&amp;#039;h&amp;#039;&amp;#039;{{Nowrap end}}. This property is formulated in terms of functions and their [[function composition|composition]] and can be generalized to the more general notion of the [[morphism]]s of a [[category (mathematics)|category]] and their composition. Right-cancellative morphisms are called [[epimorphism]]s. Specifically, surjective functions are precisely the epimorphisms in the [[category of sets]]. The prefix &amp;#039;&amp;#039;epi&amp;#039;&amp;#039; is derived from the Greek preposition &amp;#039;&amp;#039;ἐπί&amp;#039;&amp;#039; meaning &amp;#039;&amp;#039;over&amp;#039;&amp;#039;, &amp;#039;&amp;#039;above&amp;#039;&amp;#039;, &amp;#039;&amp;#039;on&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Any morphism with a right inverse is an epimorphism, but the converse is not true in general. A right inverse &amp;#039;&amp;#039;g&amp;#039;&amp;#039; of a morphism &amp;#039;&amp;#039;f&amp;#039;&amp;#039; is called a [[section (category theory)|section]] of &amp;#039;&amp;#039;f&amp;#039;&amp;#039;. A morphism with a right inverse is called a [[split epimorphism]].&lt;br /&gt;
&lt;br /&gt;
===Surjections as binary relations===&lt;br /&gt;
Any function with domain &amp;#039;&amp;#039;X&amp;#039;&amp;#039; and codomain &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; can be seen as a [[left-total relation|left-total]] and [[right-unique relation|right-unique]] binary relation between &amp;#039;&amp;#039;X&amp;#039;&amp;#039; and &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; by identifying it with its [[function graph]]. A surjective function with domain &amp;#039;&amp;#039;X&amp;#039;&amp;#039; and codomain &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; is then a binary relation between &amp;#039;&amp;#039;X&amp;#039;&amp;#039; and &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; that is right-unique and both left-total and [[right-total relation|right-total]].&lt;br /&gt;
&lt;br /&gt;
===Cardinality of the domain of a surjection===&lt;br /&gt;
The [[cardinality]] of the domain of a surjective function is greater than or equal to the cardinality of its codomain: If {{Nowrap|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; : &amp;#039;&amp;#039;X&amp;#039;&amp;#039; → &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;}} is a surjective function, then &amp;#039;&amp;#039;X&amp;#039;&amp;#039; has at least as many elements as &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;, in the sense of [[cardinal number]]s.   (The proof appeals to the [[axiom of choice]] to show that a function&lt;br /&gt;
{{Nowrap|&amp;#039;&amp;#039;g&amp;#039;&amp;#039; : &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; → &amp;#039;&amp;#039;X&amp;#039;&amp;#039;}} satisfying &amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;g&amp;#039;&amp;#039;(&amp;#039;&amp;#039;y&amp;#039;&amp;#039;)) = &amp;#039;&amp;#039;y&amp;#039;&amp;#039; for all &amp;#039;&amp;#039;y&amp;#039;&amp;#039; in &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; exists. &amp;#039;&amp;#039;g&amp;#039;&amp;#039; is easily seen to be injective, thus the [[Cardinal number#Formal definition|formal definition]] of |&amp;#039;&amp;#039;Y&amp;#039;&amp;#039;| ≤ |&amp;#039;&amp;#039;X&amp;#039;&amp;#039;| is satisfied.)&lt;br /&gt;
&lt;br /&gt;
Specifically, if both &amp;#039;&amp;#039;X&amp;#039;&amp;#039; and &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; are [[finite set|finite]] with the same number of elements, then {{Nowrap|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; : &amp;#039;&amp;#039;X&amp;#039;&amp;#039; → &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;}} is surjective if and only if &amp;#039;&amp;#039;f&amp;#039;&amp;#039; is [[injective]].&lt;br /&gt;
&lt;br /&gt;
===Composition and decomposition===&lt;br /&gt;
The [[function composition|composition]] of surjective functions is always surjective: If &amp;#039;&amp;#039;f&amp;#039;&amp;#039; and &amp;#039;&amp;#039;g&amp;#039;&amp;#039; are both surjective, and the codomain of &amp;#039;&amp;#039;g&amp;#039;&amp;#039; is equal to the domain of &amp;#039;&amp;#039;f&amp;#039;&amp;#039;, then {{Nowrap|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; &amp;lt;small&amp;gt;o&amp;lt;/small&amp;gt; &amp;#039;&amp;#039;g&amp;#039;&amp;#039;}} is surjective. Conversely, if {{Nowrap|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; &amp;lt;small&amp;gt;o&amp;lt;/small&amp;gt; &amp;#039;&amp;#039;g&amp;#039;&amp;#039;}} is surjective, then &amp;#039;&amp;#039;f&amp;#039;&amp;#039; is surjective (but &amp;#039;&amp;#039;g&amp;#039;&amp;#039;, the function applied first, need not be). These properties generalize from surjections in the [[category of sets]] to any [[epimorphism]]s in any [[category (mathematics)|category]].&lt;br /&gt;
&lt;br /&gt;
Any function can be decomposed into a surjection and an [[injective function|injection]]: For any function {{Nowrap|&amp;#039;&amp;#039;h&amp;#039;&amp;#039; : &amp;#039;&amp;#039;X&amp;#039;&amp;#039; → &amp;#039;&amp;#039;Z&amp;#039;&amp;#039;}} there exist a surjection {{Nowrap|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; : &amp;#039;&amp;#039;X&amp;#039;&amp;#039; → &amp;#039;&amp;#039;Y&amp;#039;&amp;#039;}} and an injection {{Nowrap|&amp;#039;&amp;#039;g&amp;#039;&amp;#039; : &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; → &amp;#039;&amp;#039;Z&amp;#039;&amp;#039;}} such that {{Nowrap begin}}&amp;#039;&amp;#039;h&amp;#039;&amp;#039; = &amp;#039;&amp;#039;g&amp;#039;&amp;#039; &amp;lt;small&amp;gt;o&amp;lt;/small&amp;gt; &amp;#039;&amp;#039;f&amp;#039;&amp;#039;{{Nowrap end}}. To see this, define &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; to be the set of [[preimage]]s {{Nowrap|&amp;#039;&amp;#039;h&amp;#039;&amp;#039;&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;(&amp;#039;&amp;#039;z&amp;#039;&amp;#039;)}} where &amp;#039;&amp;#039;z&amp;#039;&amp;#039; is in {{Nowrap|&amp;#039;&amp;#039;h&amp;#039;&amp;#039;(&amp;#039;&amp;#039;X&amp;#039;&amp;#039;)}}. These preimages are [[disjoint sets|disjoint]] and [[partition of a set|partition]] &amp;#039;&amp;#039;X&amp;#039;&amp;#039;. Then &amp;#039;&amp;#039;f&amp;#039;&amp;#039; carries each &amp;#039;&amp;#039;x&amp;#039;&amp;#039; to the element of &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; which contains it, and &amp;#039;&amp;#039;g&amp;#039;&amp;#039; carries each element of &amp;#039;&amp;#039;Y&amp;#039;&amp;#039; to the point in &amp;#039;&amp;#039;Z&amp;#039;&amp;#039; to which &amp;#039;&amp;#039;h&amp;#039;&amp;#039; sends its points. Then &amp;#039;&amp;#039;f&amp;#039;&amp;#039; is surjective since it is a projection map, and &amp;#039;&amp;#039;g&amp;#039;&amp;#039; is injective by definition.&lt;br /&gt;
&lt;br /&gt;
===Induced surjection and induced bijection===&lt;br /&gt;
Any function induces a surjection by restricting its codomain to its range. Any surjective function induces a bijection defined on a [[quotient set|quotient]] of its domain by collapsing all arguments mapping to a given fixed image. More precisely, every surjection {{Nowrap|&amp;#039;&amp;#039;f&amp;#039;&amp;#039; : &amp;#039;&amp;#039;A&amp;#039;&amp;#039; → &amp;#039;&amp;#039;B&amp;#039;&amp;#039;}} can be factored as a projection followed by a bijection as follows. Let &amp;#039;&amp;#039;A&amp;#039;&amp;#039;/~ be the [[equivalence class]]es of &amp;#039;&amp;#039;A&amp;#039;&amp;#039; under the following [[equivalence relation]]: &amp;#039;&amp;#039;x&amp;#039;&amp;#039; ~ &amp;#039;&amp;#039;y&amp;#039;&amp;#039; if and only if &amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) = &amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;y&amp;#039;&amp;#039;). Equivalently, &amp;#039;&amp;#039;A&amp;#039;&amp;#039;/~ is the set of all preimages under &amp;#039;&amp;#039;f&amp;#039;&amp;#039;. Let &amp;#039;&amp;#039;P&amp;#039;&amp;#039;(~) : &amp;#039;&amp;#039;A&amp;#039;&amp;#039; → &amp;#039;&amp;#039;A&amp;#039;&amp;#039;/~ be the [[projection map]] which sends each &amp;#039;&amp;#039;x&amp;#039;&amp;#039; in &amp;#039;&amp;#039;A&amp;#039;&amp;#039; to its equivalence class [&amp;#039;&amp;#039;x&amp;#039;&amp;#039;]&amp;lt;sub&amp;gt;~&amp;lt;/sub&amp;gt;, and let &amp;#039;&amp;#039;f&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; : &amp;#039;&amp;#039;A&amp;#039;&amp;#039;/~ → &amp;#039;&amp;#039;B&amp;#039;&amp;#039; be the well-defined function given by &amp;#039;&amp;#039;f&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt;([&amp;#039;&amp;#039;x&amp;#039;&amp;#039;]&amp;lt;sub&amp;gt;~&amp;lt;/sub&amp;gt;) = &amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;). Then &amp;#039;&amp;#039;f&amp;#039;&amp;#039; = &amp;#039;&amp;#039;f&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; o &amp;#039;&amp;#039;P&amp;#039;&amp;#039;(~).&lt;br /&gt;
&lt;br /&gt;
== The set of surjections ==&lt;br /&gt;
Given fixed finite sets {{Mvar|A}} and {{Mvar|B}}, one can form the set of surjections {{Math|&amp;#039;&amp;#039;A&amp;#039;&amp;#039; ↠ &amp;#039;&amp;#039;B&amp;#039;&amp;#039;}}.  The [[cardinality]] of this set is one of the twelve aspects of Rota&amp;#039;s [[Twelvefold way]], and is given by &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;|B|!\begin{Bmatrix}|A|\\|B|\end{Bmatrix}&amp;lt;/math&amp;gt;, where &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\begin{Bmatrix}|A|\\|B|\end{Bmatrix}&amp;lt;/math&amp;gt; denotes a [[Stirling numbers of the second kind|Stirling number of the second kind]].&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
{{Gallery&lt;br /&gt;
|align=center&lt;br /&gt;
|Image:Surjection.svg|A non-injective &amp;#039;&amp;#039;&amp;#039;surjective&amp;#039;&amp;#039;&amp;#039; function (surjection, not a bijection)&lt;br /&gt;
|Image:Bijection.svg|An injective &amp;#039;&amp;#039;&amp;#039;surjective&amp;#039;&amp;#039;&amp;#039; function (bijection)&lt;br /&gt;
|Image:Injection.svg|An injective non-surjective function (injection, not a bijection)&lt;br /&gt;
|Image:Not-Injection-Surjection.svg|A non-injective non-surjective function (neither a bijection)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Commons category|Surjectivity}}&lt;br /&gt;
{{Wiktionary|surjective|surjection|onto}}&lt;br /&gt;
*[[Bijection, injection and surjection]]&lt;br /&gt;
*[[Cover (algebra)]]&lt;br /&gt;
*[[Covering map]]&lt;br /&gt;
*[[Enumeration]]&lt;br /&gt;
*[[Fiber bundle]]&lt;br /&gt;
*[[Index set]]&lt;br /&gt;
*[[Section (category theory)]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{reflist|30em}}&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
* {{Cite book&lt;br /&gt;
|title=Theory of Sets&lt;br /&gt;
|last=Bourbaki&lt;br /&gt;
|first=N.&lt;br /&gt;
|author-link=Nicolas Bourbaki&lt;br /&gt;
|year=2004&lt;br /&gt;
|orig-year=1968&lt;br /&gt;
|publisher=Springer&lt;br /&gt;
|isbn=978-3-540-22525-6&lt;br /&gt;
|doi=10.1007/978-3-642-59309-3&lt;br /&gt;
|lccn=2004110815&lt;br /&gt;
|series=[[Elements of Mathematics]]&lt;br /&gt;
|volume=1&lt;br /&gt;
|url=https://books.google.com/books?id=7eclBQAAQBAJ&amp;amp;pg=PR1&lt;br /&gt;
|ref=bourbaki}}&lt;br /&gt;
&lt;br /&gt;
{{Mathematical logic}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Functions and mappings]]&lt;br /&gt;
[[Category:Basic concepts in set theory]]&lt;br /&gt;
[[Category:Mathematical relations]]&lt;br /&gt;
[[Category:Types of functions]]&lt;/div&gt;</summary>
		<author><name>202.189.109.82</name></author>
	</entry>
</feed>