''This article pertains to functions in mathematics and computer science. For other usages see function (disambiguation).
In mathematics, a partial function is a relation that associates each element of a set, sometimes called its domain (but see discussion below), with at most one element of another (possibly the same) set, called the codomain. In particular, this means that some elements of the domain may not be associated with any element of the codomain.
If a partial function f:X→Y associates, to every element in X, an element of Y, then f is termed a total function, or simply a "function" as traditionally understood in mathematics. Not every partial function is a total function.
The above diagram represents a partial function that is not a total function since the element 1 in X is not associated with anything. Until the second half of the 20th century, only total functions were considered "well-defined".
Consider the natural logarithm function mapping the real numbers to themselves. The logarithm of a non-positive real is not a real number, so the natural logarithm function doesn't associate any real number in the codomain with any non-positive real number in the domain. Therefore, the natural logarithm function is not a total function when viewed as a function from the reals to themselves, but it is a partial function. If the domain is restricted to only include the positive reals (that is, if the natural logarithm function is viewed as a function from the positive reals to the reals), then the natural logarithm is a total function.
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Partial function".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world