{
  "id": "injective-function",
  "title": "Injective Function",
  "lang": "en",
  "source_lang": "en",
  "summary": "An injective function maps distinct inputs to distinct outputs, so every element of its codomain has at most one preimage.",
  "category": "mathematics",
  "subcategory": "analysis",
  "type": "concept",
  "aliases": [
    "Injection",
    "One-to-one function",
    "One-to-one map",
    "Injective map"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/injective-function/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/injective-function/",
      "json": "https://aiwiki.page/zh/injective-function.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "An injective function, or injection, is a function that assigns different outputs to different inputs. If \\(f:A\\to B\\) is injective, no two distinct elements of its domain \\(A\\) have the same image in its codomain \\(B\\). Injectivity concerns uniqueness rather than coverage: some elements of \\(B\\) may never occur as outputs. It is one of the fundamental properties used to classify functions in set theory. (jirka.org)"
    },
    {
      "heading": "Definition and basic distinctions",
      "text": "Formally, \\(f:A\\to B\\) is injective if\n\n\\[\\forall x_1,x_2\\in A,\\qquad f(x_1)=f(x_2)\\Longrightarrow x_1=x_2.\\]\n\nEquivalently, \\(x_1\\ne x_2\\) implies \\(f(x_1)\\ne f(x_2)\\). Thus, for each \\(y\\in B\\), the set\n\n\\[\\{x\\in A:f(x)=y\\}\\]\n\ncontains at most one element. A surjective function, by contrast, reaches every element of its codomain. A bijective function is both injective and surjective, giving every codomain element exactly one preimage. (jirka.org)\n\nThe phrase “one-to-one” must not be confused with the requirement that a function assign exactly one output to each input. Every function satisfies that requirement; injectivity additionally prevents different inputs from sharing an output. A function whose domain is empty or contains only one element is automatically injective, since no pair of distinct inputs can violate the definition. (jirka.org)"
    },
    {
      "heading": "Examples and the role of the domain",
      "text": "The doubling function on the natural numbers,\n\n\\[f:\\mathbb N\\to\\mathbb N,\\qquad f(n)=2n,\\]\n\nis injective: equality \\(2n=2m\\) implies \\(n=m\\). It is not surjective because odd natural numbers are absent from its outputs. This illustrates that injectivity alone does not provide an inverse defined on the entire codomain. (math.uh.edu)\n\nOn the real numbers, the polynomial function \\(q(x)=x^2\\) is not injective, since \\(q(1)=q(-1)\\). Restricting its domain to \\([0,\\infty)\\) makes it injective: two nonnegative numbers with equal squares must be equal. Changing the codomain alone, while retaining all existing outputs, cannot remove a collision between inputs. These conclusions follow directly from the definition. (jirka.org)\n\nFor a real-valued function of a real variable, the horizontal-line test expresses the same condition geometrically: every horizontal line must intersect its graph at most once. Two intersections at the same height would represent distinct inputs with equal outputs. (math.uwaterloo.ca)"
    },
    {
      "heading": "Inverses and composition",
      "text": "Every injection \\(f:A\\to B\\) becomes a bijection when its codomain is restricted to its image \\(f(A)\\). Consequently, it has an inverse function\n\n\\[f^{-1}:f(A)\\to A,\\]\n\nwhich recovers the unique input associated with each actual output. A two-sided inverse \\(B\\to A\\) exists only when \\(f\\) is also surjective. (homepages.ucl.ac.uk)\n\nWhen \\(A\\ne\\varnothing\\), injectivity is equivalent to the existence of a left inverse \\(g:B\\to A\\), satisfying\n\n\\[g\\circ f=\\operatorname{id}_A.\\]\n\nConstruct \\(g\\) by reversing \\(f\\) on \\(f(A)\\) and assigning a fixed element of \\(A\\) to every unused codomain element. Conversely, applying \\(g\\) to \\(f(x_1)=f(x_2)\\) proves \\(x_1=x_2\\). The nonempty-domain condition matters: an injection \\(\\varnothing\\to B\\) has no left inverse when \\(B\\ne\\varnothing\\). (homepages.ucl.ac.uk)\n\nInjectivity is preserved by function composition. If \\(f:A\\to B\\) and \\(h:B\\to C\\) are injective, then\n\n\\[h(f(x_1))=h(f(x_2)) \\Longrightarrow f(x_1)=f(x_2) \\Longrightarrow x_1=x_2.\\]\n\nConversely, injectivity of \\(h\\circ f\\) forces \\(f\\) to be injective, but only requires \\(h\\) to distinguish elements of \\(f(A)\\), not necessarily all of \\(B\\). (math.uwaterloo.ca)"
    },
    {
      "heading": "Cardinality and finite sets",
      "text": "Injections provide a way to compare cardinalities: \\(|A|\\le |B|\\) means that an injection from \\(A\\) into \\(B\\) exists. For finite sets, this agrees with comparing their numbers of elements. If \\(|A|>|B|\\), no function \\(A\\to B\\) can be injective, because some two inputs must share an output. (math.uwaterloo.ca)\n\nWhen finite sets \\(A\\) and \\(B\\) have equal cardinality, a function between them is injective exactly when it is surjective. This equivalence fails for infinite sets, as the doubling function \\(\\mathbb N\\to\\mathbb N\\) demonstrates. Infinite sets can therefore admit injections into proper subsets of themselves. (math.uwaterloo.ca)"
    },
    {
      "heading": "Criteria in analysis and linear algebra",
      "text": "In analysis, every strictly monotone function is injective. For a continuous real-valued function on an interval, the converse also holds: injectivity implies strict monotonicity. Continuity and the interval hypothesis are essential to that converse. (jirka.org)\n\nIn linear algebra, a linear map \\(T:V\\to W\\) between vector spaces is injective exactly when its kernel is trivial:\n\n\\[\\ker T=\\{0\\}.\\]\n\nIndeed, \\(T(v)=T(w)\\) implies \\(T(v-w)=0\\); a trivial kernel then gives \\(v=w\\). This reduces a two-input condition to a statement about vectors mapped to zero. (sites.lsa.umich.edu)\n\nFor an \\(m\\times n\\) matrix \\(M\\), the map \\(x\\mapsto Mx\\) is injective exactly when \\(Mx=0\\) has only the zero solution. Equivalently, its columns are linearly independent and its rank is \\(n\\). In finite dimensions, the rank–nullity theorem expresses the same criterion as zero nullity. (sites.lsa.umich.edu)"
    }
  ],
  "links": [
    "mathematical-function",
    "domain-of-a-function",
    "function-codomain",
    "set-theory",
    "surjective-function",
    "bijective-function",
    "natural-number",
    "real-number",
    "polynomial",
    "inverse-function",
    "function-composition",
    "cardinality",
    "mathematical-analysis",
    "monotonic-function",
    "continuous-function",
    "linear-algebra",
    "linear-map",
    "vector-space",
    "kernel-linear-map",
    "matrix",
    "linear-independence",
    "matrix-rank",
    "rank-nullity-theorem"
  ],
  "sources": [
    {
      "title": "jirka.org/ra/realanal.pdf",
      "url": "https://jirka.org/ra/realanal.pdf"
    },
    {
      "title": "math.uh.edu/~klaus/2012SU_5336_1_2.html",
      "url": "https://www.math.uh.edu/~klaus/2012SU_5336_1_2.html"
    },
    {
      "title": "math.uwaterloo.ca/~snew/MATH147/chap2.pdf",
      "url": "https://www.math.uwaterloo.ca/~snew/MATH147/chap2.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": "jirka.org/ra/realanal-oct07-13.pdf",
      "url": "https://www.jirka.org/ra/realanal-oct07-13.pdf"
    },
    {
      "title": "sites.lsa.umich.edu/kesmith/wp-content/uploads/sites/1309/2024/06/ProofTechniqu…",
      "url": "https://sites.lsa.umich.edu/kesmith/wp-content/uploads/sites/1309/2024/06/ProofTechniqueDocument.pdf"
    },
    {
      "title": "sites.lsa.umich.edu/kesmith/wp-content/uploads/sites/1309/2024/06/3-1AND3-2.pdf",
      "url": "https://sites.lsa.umich.edu/kesmith/wp-content/uploads/sites/1309/2024/06/3-1AND3-2.pdf"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}