# Example:Partial function

($1)$2 | $3 ($4) | $5 ($6)

The function given by the following diagram:

is not well-defined (i.e. is not a function). A function must give an output for every input; but this function does not give an output for 2.

Although we would not call this a function, it is an example of a partial function.

A partial function is like a function, except that it does not need to give an output for every input. However, the outputs it does give must be unambiguous. One way to formalize this is by defining a partial function as a function from a restricted domain:

Definition: Partial function
A partial function is a subset (called the support of ), along with a function We say that if and is undefined if .
Definition: Total
A partial function is total if the support is equal to the domain, i.e. if is a function.

Note that, somewhat confusingly, not all partial functions are functions. However, we do consider a (total) function to be a partial function. We use this terminology because it is standard in mathematics and because it simplifies proofs (so that we don't have to say "a partial or total function" in places where the same argument works for both).

To summarize,

is a partial function, but not a function (because it is not total), while

is a partial function, a function and a total function (also an injection, a surjection, a bijection, and a relation).