function such that every element of the codomain has a preimage
A surjective function is a type of mathematical relationship where every possible output value actually gets used—in other words, for every element in the codomain (the set of possible outputs), there's at least one input that produces it. This concept matters because it helps mathematicians precisely describe when a function "covers" its entire target set, which is useful in many areas of mathematics and its applications.
AI-generated from the Wikipedia summary — may contain errors.
In mathematics, a surjective function (also known as surjection, or onto function /ˈɒn.tuː/) is a function f such that, for every element y of the function's codomain, there exists at least one element x in the function's domain such that f(x) = y. In other words, for a function f : X → Y, the codomain Y is the image of the function's domain X. It is not required that x be unique; the function f may map one or more elements of X to the same element of Y.
The term surjective and the related terms injective and bijective were introduced by Nicolas Bourbaki, a group of mainly French 20th-century mathematicians who, under this pseudonym, wrote a series of books presenting an exposition of modern advanced mathematics, beginning in 1935. The French word sur means over or above, and relates to the fact that the image of the domain of a surjective function completely covers the function's codomain.
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).