# Surjective function

A **surjective function** (also called an **onto function** or a **surjection**) is a function \( f: A \to B \) in which every element of the codomain \( B \) is the output of at least one element of the domain \( A \); formally, \( \forall b \in B.\ \exists a \in A.\ (f(a) = b) \)<sup>[1](https://www.cs.toronto.edu/~shaharry/csc236-summer-2025/lectures/l1-b.html)</sup>. Equivalently, a function is surjective if and only if its image, the set \( \{f(x) : x \in A\} \) of all its outputs, equals its codomain<sup>[2](https://www.homepages.ucl.ac.uk/~ucahmto/0005/001.html)</sup>. Surjectivity is one of the two basic counting properties of a function, the other being injectivity (one-to-one-ness); a function with both properties is a bijection<sup>[1](https://www.cs.toronto.edu/~shaharry/csc236-summer-2025/lectures/l1-b.html)</sup>.

| Key fact | Detail |
|---|---|
| Definition | \( f: A \to B \) is surjective if every \( b \in B \) has at least one preimage: \( \forall b \in B.\ \exists a \in A.\ (f(a) = b) \)<sup>[1](https://www.cs.toronto.edu/~shaharry/csc236-summer-2025/lectures/l1-b.html)</sup> |
| Equivalent form | Surjective if and only if the image equals the codomain<sup>[2](https://www.homepages.ucl.ac.uk/~ucahmto/0005/001.html)</sup> |
| Right inverse | \( f \) has a right inverse \( g \) with \( f \circ g = \mathrm{id}_B \) if and only if \( f \) is surjective<sup>[3](https://www.homepages.ucl.ac.uk/~ucahmto/0007/_book/1-3-functions.html)</sup> |
| Set-theoretic status | In Zermelo–Fraenkel set theory, the statement that every surjection has a right inverse is equivalent to the axiom of choice<sup>[4](https://tamnd.github.io/brain/maths/03/08.2/)</sup> |
| Terminology | The terms injection, surjection, and bijection were introduced by the Bourbaki group in *Théorie des ensembles* (1954)<sup>[5](https://web.stanford.edu/class/archive/cs/cs103/cs103.1182/handouts/460%20Timeline%20of%20CS103%20Results.pdf)</sup> |
| Finite sets | For finite \( X, Y \), a surjection \( f: X \to Y \) requires \( |X| \ge |Y| \), the dual of the pigeonhole principle for injections<sup>[6](https://courses.maths.ox.ac.uk/mod/page/view.php?id=65663)</sup> |

## Definition and equivalent formulations

The defining condition is that every element of the codomain is hit at least once. In the language of preimages, a preimage of \( b \) is an element \( a \) with \( f(a) = b \); a function is surjective exactly when every element of the codomain has at least one preimage<sup>[7](https://mathstats-materials.uncg.edu/mat253/web/section-surj-fun.html)</sup>. To prove a function surjective, one must produce a preimage for an arbitrary codomain element, typically a constructive argument that solves \( f(a) = b \) for \( a \) in terms of \( b \)<sup>[8](https://people.math.carleton.ca/~kcheung/math/books/giam-ON/html/sec-functions.html)</sup>.

The image-based formulation is often the shortest to state: \( f \) is surjective if and only if \( \mathrm{im}(f) = B \)<sup>[2](https://www.homepages.ucl.ac.uk/~ucahmto/0005/001.html)</sup>. A summary table used in teaching puts the three properties side by side for \( f: A \to B \): injective means each \( b \in B \) is hit 0 or 1 times, surjective means each \( b \) is hit at least 1 time, and bijective means each \( b \) is hit exactly 1 time<sup>[1](https://www.cs.toronto.edu/~shaharry/csc236-summer-2025/lectures/l1-b.html)</sup>.

## Surjectivity depends on the codomain

Whether a function is surjective is a property of the function together with its stated codomain, not of the rule alone. The Oxford course notes analyze the same map in four variants: \( f_1: \mathbb{R} \to \mathbb{R} \) is neither injective nor surjective; \( f_2 \) with codomain \( [0,\infty) \) is not injective but is surjective; \( f_3 \) with domain restricted to nonnegative reals is injective but not surjective; and \( f_4 \) with both adjustments is a bijection<sup>[6](https://courses.maths.ox.ac.uk/mod/page/view.php?id=65663)</sup>.

Because the domain and codomain are part of the data of a function, changing either creates a new function; the squaring function from \( \mathbb{R} \) to \( \mathbb{R} \) is formally a different function from the squaring function from \( \mathbb{R} \) to \( \mathbb{R}_{\ge 0} \)<sup>[7](https://mathstats-materials.uncg.edu/mat253/web/section-surj-fun.html)</sup>. The same rule can also change status with the domain: \( f(n) = n \) is surjective as a map \( \mathbb{N} \to \mathbb{N} \) but not as a map \( \mathbb{N} \to \mathbb{R} \)<sup>[1](https://www.cs.toronto.edu/~shaharry/csc236-summer-2025/lectures/l1-b.html)</sup>.

## Right inverses and the axiom of choice

Surjectivity has an exact algebraic characterization. A right inverse to \( f: X \to Y \) is a function \( g: Y \to X \) with \( f \circ g = \mathrm{id}_Y \), and \( f \) has a right inverse if and only if \( f \) is surjective<sup>[3](https://www.homepages.ucl.ac.uk/~ucahmto/0007/_book/1-3-functions.html)</sup>. The easy direction needs no choice: if \( g \) is a right inverse, then for any \( y \in Y \), \( f(g(y)) = y \), so \( y \) lies in the image and \( f \) is onto<sup>[3](https://www.homepages.ucl.ac.uk/~ucahmto/0007/_book/1-3-functions.html)</sup>.

The converse direction, choosing for each \( y \) some preimage \( g(y) \), is where set-theoretic foundations enter. The statement that every surjective function has a right inverse is listed among the standard [equivalents of the axiom of choice](https://www.edgepedia.org/equivalents-of-the-axiom-of-choice), alongside the well-ordering theorem and [Zorn's lemma](https://www.edgepedia.org/zorns-lemma)<sup>[4](https://tamnd.github.io/brain/maths/03/08.2/)</sup>. Conversely, assuming that all surjections \( g: Y \to X \) have right inverses implies the existence of choice functions for arbitrary collections of nonempty sets<sup>[9](https://people.math.binghamton.edu/mfochler/bu-mfx/bu-math-arv/math-330-arv/math-330-2022-08/html/lec-notes/bu-ln-330-m330-solns-2022-07-27.pdf)</sup>.

## Surjections and cardinality

For finite sets, surjections and injections impose dual size constraints. The Oxford notes record the injection side: for finite \( X \) and \( Y \), a function \( f: X \to Y \) can only be injective if \( |Y| \ge |X| \), since an [injective function](https://www.edgepedia.org/injective-function) has \( |f(X)| = |X| \) and \( f(X) \subseteq Y \); this is the pigeonhole principle<sup>[6](https://courses.maths.ox.ac.uk/mod/page/view.php?id=65663)</sup>.

Surjections also enter the definition of cardinality itself. Once injective and surjective functions are available, the cardinality of finite sets can be defined through bijections, giving an alternative to counting<sup>[6](https://courses.maths.ox.ac.uk/mod/page/view.php?id=65663)</sup>.

## Role in algebra and topology

Surjective structure-preserving maps classify quotients. In group theory, the first isomorphism theorem states that a surjective homomorphism \( \varphi: G \to H \) with kernel \( N \) yields an isomorphism \( G/N \cong H \); every surjective homomorphism is, up to isomorphism, a quotient group of its domain<sup>[10](https://mosullivan.sdsu.edu/Teaching/Algebra08f/group_notes3.pdf)</sup>. The same pattern holds for rings: the quotient map \( \pi_I: R \to R/I \) is a surjective ring homomorphism with kernel \( I \), and the ring version of the first isomorphism theorem identifies \( R/\ker\varphi \) with \( \mathrm{im}\,\varphi \) for any ring homomorphism \( \varphi \)<sup>[11](https://math.ucla.edu/~sharifi/notes/algebra-ch03.html)</sup>.

In topology, surjections define quotient spaces. A quotient map \( \pi: X \to Y \) is a surjection with the property that, for any subset \( V \) of \( Y \), openness of \( V \) is equivalent to \( \pi^{-1}(V) \) being open in \( X \)<sup>[12](https://www.math.ucla.edu/~sharifi/notes/topology-ch02.html)</sup>. For any surjective function from a topological space \( X \) onto a set \( Y \), there exists a unique topology on \( Y \), the quotient topology, that makes \( \pi \) a quotient map<sup>[12](https://www.math.ucla.edu/~sharifi/notes/topology-ch02.html)</sup>. A continuous surjective map that is either open or closed is automatically a quotient map; the standard example \( f: [0,1] \to S^1 \), \( x \mapsto (\cos 2\pi x, \sin 2\pi x) \), is continuous, surjective, and closed, hence a quotient map<sup>[13](https://www.zaco.au/lib/math/text/topology/IntroToTopology.pdf)</sup>.

## History of the term

The vocabulary is a twentieth-century standardization. In 1954 a group of French mathematicians publishing under the pseudonym [Nicolas Bourbaki](https://www.edgepedia.org/nicolas-bourbaki) introduced the terms injection, surjection, and bijection in their influential textbook *Théorie des ensembles*, replacing the older phrases one-to-one, onto, and one-to-one onto<sup>[5](https://web.stanford.edu/class/archive/cs/cs103/cs103.1182/handouts/460%20Timeline%20of%20CS103%20Results.pdf)</sup>. The prefix sur is French for on or onto, and Bourbaki's treatise was explicitly aimed at supplying standard terms where English-language usage had none that were satisfactory<sup>[14](https://mathshistory.st-andrews.ac.uk/Miller/mathword/i/)</sup>. Bourbaki also fixed the modern convention that a function comes with a specified codomain, which is what makes surjectivity a well-defined property of the function itself rather than of its graph<sup>[14](https://mathshistory.st-andrews.ac.uk/Miller/mathword/i/)</sup>.

## References

1. [Lecture 01: Functions, CSC236 Summer 2025, University of Toronto](https://www.cs.toronto.edu/~shaharry/csc236-summer-2025/lectures/l1-b.html)
2. [MATH0005 Algebra 1 part 1, University College London](https://www.homepages.ucl.ac.uk/~ucahmto/0005/001.html)
3. [1.3 Functions, MATH0007: Algebra for Joint Honours Students, University College London](https://www.homepages.ucl.ac.uk/~ucahmto/0007/_book/1-3-functions.html)
4. [8.2 Equivalent Formulations, brain (mathematics reference)](https://tamnd.github.io/brain/maths/03/08.2/)
5. [Timeline of CS103 Results, Stanford University](https://web.stanford.edu/class/archive/cs/cs103/cs103.1182/handouts/460%20Timeline%20of%20CS103%20Results.pdf)
6. [Introduction to University Mathematics (2025-26): 3 Functions, Mathematical Institute, University of Oxford](https://courses.maths.ox.ac.uk/mod/page/view.php?id=65663)
7. [Surjective functions, MAT 253, University of North Carolina at Greensboro](https://mathstats-materials.uncg.edu/mat253/web/section-surj-fun.html)
8. [A Gentle Introduction to the Art of Mathematics, Carleton University](https://people.math.carleton.ca/~kcheung/math/books/giam-ON/html/sec-functions.html)
9. [Math 330 Lecture Notes, Binghamton University](https://people.math.binghamton.edu/mfochler/bu-mfx/bu-math-arv/math-330-arv/math-330-2022-08/html/lec-notes/bu-ln-330-m330-solns-2022-07-27.pdf)
10. [Group theory notes, M. O'Sullivan, San Diego State University](https://mosullivan.sdsu.edu/Teaching/Algebra08f/group_notes3.pdf)
11. [Abstract Algebra, Chapter 3: Ring theory, R. Sharifi, UCLA](https://math.ucla.edu/~sharifi/notes/algebra-ch03.html)
12. [Point-Set Topology, Chapter 2: Continuous functions, R. Sharifi, UCLA](https://www.math.ucla.edu/~sharifi/notes/topology-ch02.html)
13. [Introduction to Topology](https://www.zaco.au/lib/math/text/topology/IntroToTopology.pdf)
14. [Earliest Known Uses of Some of the Words of Mathematics (I), MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Miller/mathword/i/)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Logic and discrete mathematics › Formal logic and foundations › Set theory › Elementary set theory*

*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
