Partial function

In mathematics, a partial function from a set to a set is a function from a subset of (possibly the whole itself) to .

Uses your system voice; voice and rate in settings.

≈ 4 min read

Cite, export and learn8 citation formats · 8 exports · lesson and quiz

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

In mathematics, a partial function from a set to a set is a function from a subset of (possibly the whole itself) to . The subset , that is, the domain of viewed as a function, is called the domain of definition or natural domain of . If equals , that is, if is defined on every element in , then is said to be a total function.

In other words, a partial function is a binary relation over two sets that associates to every element of the first set at most one element of the second set; it is thus a univalent relation. This generalizes the concept of a (total) function by not requiring every element of the first set to be associated to an element of the second set.

A partial function is often used when its exact domain of definition is not known, or is difficult to specify. However, even when the exact domain of definition is known, partial functions are often used for simplicity or brevity.

This is the case in calculus, where, for example, the quotient of two functions is a partial function whose domain of definition cannot contain the zeros of the denominator; in this context, a partial function is generally simply called a . In computability theory, a general recursive function is a partial function from the integers to the integers; no algorithm can exist for deciding whether an arbitrary such function is in fact total. When arrow notation is used for functions, a partial function f from X to Y is sometimes written as f : X \rightharpoonup Y, f : X \nrightarrow Y, or f : X \hookrightarrow Y. However, there is no general convention, and the latter notation is more commonly used for inclusion maps or embeddings.

Specifically, for a partial function f : X \rightharpoonup Y, and any x \in X, one has either: f(x) = y \in Y (it is a single element in ), or f(x) is undefined. For example, if f is the square root function restricted to the integers defined by: then f(n) is only defined if n is a perfect square (that is, 0, 1, 4, 9, 16, \ldots ). So f(25) = 5 but f(26) is undefined.

[X \rightharpoonup Y] = \bigcup_{D \subseteq X} [D \to Y], the latter also written as \bigcup_{D\subseteq{X}} Y^D. In finite case, its cardinality is |[X \rightharpoonup Y]| = (|Y| + 1)^ , because any partial function can be extended to a function by any fixed value c not contained in Y, so that the codomain is Y \cup \{ c \}, an operation which is injective (unique and invertible by restriction). f(x,y) = x - y. It is defined only when x \geq y. In category theory, when considering the operation of morphism composition in concrete categories, the composition operation \circ \;:\; \hom(C) \times \hom(C) \to \hom(C) is a total function if and only if \operatorname{ob}(C) has one element. The reason for this is that two morphisms f : X \to Y and g : U \to V can only be composed as g \circ f if Y = U, that is, the codomain of f must equal the domain of g. The category of sets and partial functions is equivalent to but not isomorphic with the category of pointed sets and point-preserving maps.

One textbook notes that "This formal completion of sets and partial maps by adding “improper,” “infinite” elements was reinvented many times, in particular, in topology (one-point compactification) and in theoretical computer science." The category of sets and partial bijections is equivalent to its dual. It is the prototypical inverse category.

Text derived from https://en.wikipedia.org/w/index.php?oldid=1374575911 under CC BY-SA 4.0; modifications have been made.

Provenance

snapshot enwiki-001374575911 · captured 2026-09-12 · ledger · version history

Cite this page as: encyclopegia.org, “Partial function”, snapshot enwiki-001374575911. https://encyclopegia.org/a/partial-function

Sources cited in this revision

5 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.