section_path: Definition/Partial functions
section_name: Partial functions
paragraph_text: Partial functions
  
  Partial functions are defined similarly to ordinary functions, with the "total" condition removed. That is, a partial function from X to Y is a binary relation R between X and Y such that, for every x ∈ X, {\displaystyle x\in X,} there is at most one y in Y such that (x, y) ∈ R. {\displaystyle (x,y)\in R.}
  
  Using functional notation, this means that, given x ∈ X, {\displaystyle x\in X,} either f (x) {\displaystyle f(x)} is in Y, or it is undefined.
  
  The set of the elements of X such that f (x) {\displaystyle f(x)} is defined and belongs to Y is called the domain of definition of the function. A partial function from X to Y is thus a ordinary function that has as its domain a subset of X called the domain of definition of the function. If the domain of definition equals X, one often says that the partial function is a total function.
  
  In several areas of mathematics the term "function" refers to partial functions rather than to ordinary functions. This is typically the case when functions may be specified in a way that makes difficult or even impossible to determine their domain.
  
  In calculus, a real-valued function of a real variable or real function is a partial function from the set R {\displaystyle \mathbb {R} } of the real numbers to itself. Given a real function f: x ↦ f (x) {\displaystyle f:x\mapsto f(x)} its multiplicative inverse x ↦ 1 / f (x) {\displaystyle x\mapsto 1/f(x)} is also a real function. The determination of the domain of definition of a multiplicative inverse of a (partial) function amounts to compute the zeros of the function, the values where the function is defined but not its multiplicative inverse.
  
  Similarly, a function of a complex variable is generally a partial function with a domain of definition included in the set C {\displaystyle \mathbb {C} } of the complex numbers. The difficulty of determining the domain of definition of a complex function is illustrated by the multiplicative inverse of the Riemann zeta function: the determination of the domain of definition of the function z ↦ 1 / ζ (z) {\displaystyle z\mapsto 1/\zeta (z)} is more or less equivalent to the proof or disproof of one of the major open problems in mathematics, the Riemann hypothesis.
  
  In computability theory, a general recursive function is a partial function from the integers to the integers whose values can be computed by an algorithm (roughly speaking). The domain of definition of such a function is the set of inputs for which the algorithm does not run forever. A fundamental theorem of computability theory is that there cannot exist an algorithm that takes an arbitrary general recursive function as input and tests whether 0 belongs to its domain of definition (see Halting problem).