{
  "id": "surjective-function",
  "title": "Surjective Function",
  "lang": "en",
  "source_lang": "en",
  "summary": "A surjective function maps its domain onto its entire codomain, so every element of the codomain has at least one preimage.",
  "category": "mathematics",
  "subcategory": "analysis",
  "type": "concept",
  "aliases": [
    "Surjection",
    "Onto function",
    "Onto mapping",
    "Surjective map"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/surjective-function/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/surjective-function/",
      "json": "https://aiwiki.page/zh/surjective-function.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A surjective function, or surjection, is a function whose outputs cover its entire specified target set. If \\(f:A\\to B\\), surjectivity means that every element of \\(B\\) equals \\(f(x)\\) for at least one element \\(x\\) of \\(A\\). Several inputs may produce the same output; surjectivity requires coverage, not uniqueness. It is one of the fundamental properties used to classify functions in set theory. (jirka.org)"
    },
    {
      "heading": "Definition and codomain dependence",
      "text": "For a function \\(f:A\\to B\\), \\(A\\) is its domain and \\(B\\) its codomain. The image of \\(A\\) is\n\n\\[f(A)=\\{f(x):x\\in A\\}.\\]\n\nThe function is surjective precisely when \\(f(A)=B\\). Equivalently,\n\n\\[\\forall y\\in B\\;\\exists x\\in A:\\quad f(x)=y.\\]\n\nThe order of the quantifiers matters: an appropriate input may depend on the chosen output. (jirka.org)\n\nSurjectivity therefore depends on the codomain, not merely on a formula. For example, \\(x\\mapsto x^2\\) is not surjective from the real numbers to \\(\\mathbb R\\), because negative numbers are never outputs. The same rule defines a surjection \\(\\mathbb R\\to[0,\\infty)\\). More generally, every function becomes surjective when its codomain is restricted to its image without changing its domain or values. (richardhammack.github.io)\n\nFor \\(y\\in B\\), the set\n\n\\[f^{-1}(\\{y\\})=\\{x\\in A:f(x)=y\\}\\]\n\nis the fiber over \\(y\\). Surjectivity says exactly that every fiber is nonempty. This preimage notation does not require an inverse function to exist. (ocw.mit.edu)"
    },
    {
      "heading": "Examples and proof methods",
      "text": "Examples illustrate how the choice of sets affects the property:\n\n- \\(f:\\mathbb R\\to\\mathbb R\\), \\(f(x)=x^3\\), is surjective: for any \\(y\\), the input \\(x=\\sqrt[3]{y}\\) satisfies \\(f(x)=y\\).\n- \\(f:\\mathbb R\\to\\mathbb R\\), \\(f(x)=2x+1\\), is surjective because \\(x=(y-1)/2\\) produces any prescribed \\(y\\).\n- \\(f:\\mathbb Z\\to\\mathbb Z\\), \\(f(n)=2n\\), is not surjective, since no odd integer occurs as an output. It is surjective if its codomain is instead \\(2\\mathbb Z\\), the even integers.\n\nThese conclusions follow directly by applying the definition and solving the output equation in the specified domain. (richardhammack.github.io)\n\nA standard proof of surjectivity begins with an arbitrary \\(y\\in B\\), constructs an \\(x\\in A\\), and verifies \\(f(x)=y\\). It must establish both that the proposed input belongs to the domain and that it produces the desired output. To disprove surjectivity, one counterexample in the codomain with no preimage suffices. (richardhammack.github.io)\n\nFor finite sets, an arrow diagram gives a direct test: every codomain element must receive at least one arrow. Checking only selected outputs cannot establish surjectivity when the codomain is infinite. (richardhammack.github.io)"
    },
    {
      "heading": "Relation to injectivity and cardinality",
      "text": "An injective function gives different outputs to different inputs. A bijective function is both injective and surjective, so every codomain element has exactly one preimage. Thus surjectivity expresses existence of inputs, while injectivity expresses uniqueness whenever an input exists. A two-sided inverse exists precisely for a bijection. (homepages.ucl.ac.uk)\n\nFor finite sets, a surjection \\(A\\to B\\) requires\n\n\\[|A|\\geq |B|.\\]\n\nIf the sets have equal finite cardinality, a function between them is surjective if and only if it is injective. This equivalence fails for infinite sets. On the natural numbers \\(\\mathbb N=\\{0,1,2,\\ldots\\}\\), the successor function \\(n\\mapsto n+1\\) is injective but misses \\(0\\). Conversely, the function taking \\(0\\) to \\(0\\) and \\(n\\geq1\\) to \\(n-1\\) is surjective but maps both \\(0\\) and \\(1\\) to \\(0\\). (richardhammack.github.io)"
    },
    {
      "heading": "Composition and right inverses",
      "text": "Surjectivity is preserved by composition. If \\(f:A\\to B\\) and \\(g:B\\to C\\) are surjective, then \\(g\\circ f\\) is surjective: first choose \\(b\\) producing a desired \\(c\\), then choose \\(a\\) producing \\(b\\). If \\(g\\circ f\\) is surjective, \\(g\\) must be surjective, but \\(f\\) need not be. (richardhammack.github.io)\n\nA right inverse, or section, of \\(f\\) is a function \\(s:B\\to A\\) satisfying\n\n\\[f\\circ s=\\operatorname{id}_B.\\]\n\nIts existence implies surjectivity, because \\(s(y)\\) supplies a preimage of every \\(y\\). Conversely, constructing a section requires selecting one element from each fiber. In set theory, the assertion that every surjection has a right inverse is equivalent to the axiom of choice. A finite codomain requires only finitely many choices, so that case needs no choice axiom. (webhomes.maths.ed.ac.uk)"
    },
    {
      "heading": "Linear algebra and quotient constructions",
      "text": "In linear algebra, a linear map \\(T:V\\to W\\) is surjective when its image is the whole target vector space. For an \\(m\\times n\\) matrix \\(M\\), the map \\(x\\mapsto Mx\\) onto \\(\\mathbb R^m\\) is surjective exactly when its columns span \\(\\mathbb R^m\\), equivalently when its rank is \\(m\\). Thus the system \\(Mx=b\\) has a solution for every \\(b\\). For finite-dimensional spaces of equal dimension, the rank–nullity theorem makes surjectivity equivalent to injectivity. (math.mit.edu)\n\nSurjections also describe identification of elements. Define an equivalence relation on \\(A\\) by \\(x\\sim x'\\) when \\(f(x)=f(x')\\). Its equivalence classes are the nonempty fibers. The projection \\(A\\to A/{\\sim}\\) is surjective, and the induced map\n\n\\[A/{\\sim}\\longrightarrow f(A),\\qquad [x]\\longmapsto f(x)\\]\n\nis bijective. When \\(f\\) is surjective, \\(f(A)=B\\): the codomain corresponds exactly to the classes obtained by identifying inputs with equal outputs. (whitman.edu)"
    }
  ],
  "links": [
    "mathematical-function",
    "set-theory",
    "domain-of-a-function",
    "codomain",
    "image-of-a-function",
    "real-number",
    "inverse-function",
    "integer",
    "mathematical-proof",
    "injective-function",
    "bijective-function",
    "cardinality",
    "natural-number",
    "function-composition",
    "axiom-of-choice",
    "linear-algebra",
    "linear-map",
    "vector-space",
    "matrix",
    "matrix-rank",
    "system-of-linear-equations",
    "rank-nullity-theorem",
    "equivalence-relation",
    "equivalence-class"
  ],
  "sources": [
    {
      "title": "jirka.org/ra/realanal.pdf",
      "url": "https://jirka.org/ra/realanal.pdf"
    },
    {
      "title": "richardhammack.github.io/BookOfProof/Main.pdf",
      "url": "https://richardhammack.github.io/BookOfProof/Main.pdf"
    },
    {
      "title": "ocw.mit.edu/courses/18-s097-applied-category-theory-january-iap-2019/a4175d6147…",
      "url": "https://ocw.mit.edu/courses/18-s097-applied-category-theory-january-iap-2019/a4175d61479a35340d6307ae5e48ef5a_18-s097iap19textbook.pdf"
    },
    {
      "title": "homepages.ucl.ac.uk/~ucahmto/0005_2021/Ch2.S10.html",
      "url": "https://www.homepages.ucl.ac.uk/~ucahmto/0005_2021/Ch2.S10.html"
    },
    {
      "title": "webhomes.maths.ed.ac.uk/~tl/ast/ast.pdf",
      "url": "https://webhomes.maths.ed.ac.uk/~tl/ast/ast.pdf"
    },
    {
      "title": "math.mit.edu/~dav/specialMaps.pdf",
      "url": "https://math.mit.edu/~dav/specialMaps.pdf"
    },
    {
      "title": "whitman.edu/mathematics/higher_math_online/section05.02.html",
      "url": "https://www.whitman.edu/mathematics/higher_math_online/section05.02.html"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}