Wikipedia logo
See also the Wikipedia article:

A function (or more strictly, a well-defined function) is a rule that assigns to every element in a set D exactly one element, called the image, from another set C . The set D is called the domain, while the set C is called the codomain. The subset of the codomain which precisely contains the set of all values that are assigned to some value in the domain is called the range


When defining a function f with domain D and codomain C , it is common to denote it by f:D\to C .

For example, the function f:\R\to\R could be defined by the formula


with domain D being the real numbers and the range R being the non-negative real numbers. This function assigns the value 4 in the range to the number −2 in the domain.


Formally, a relation \mapsto from a set D to set C is said to be a function if it satisfies the following properties:

The first condition asserts that every element in the domain has an image in the codomain, while the second states that such an image is unique. This definition, however, allows the following possibilities for a function:

  • Two or more distinct elements in the domain may have the same image;
  • One or more element in the codomain may not be the image of any element in the domain.

One may also speak of multi-valued functions, which only satisfy the totality property, and of partially-defined functions, which only satisfy the functional property.

With those possibilities in mind, we may define a function f:D\rightarrow C to be one of these three types of functions:

  • Injection, injective function, or one-to-one: for any a,b\in D , if f(a)=f(b) then a=b ;
  • Surjection, surjective function, or onto: for any c\in C , there exists an a\in D such that f(a)=c ;
  • one-to-one correspondence, bijection, bijective function, or invertible, if f is both injective and surjective.


As a function f from a set D to a set C is formally a relation, which itself is a subset of the cartesian product D\times C , the notations x\,f\,y (viewing f as a relation), and (x,y)\in f are valid. However, whenever given an arbitrary x\in D , it is cumbersome in writing to state that "there exists a unique y\in C such that x\,f\,y". Therefore, we will define the preferred notation f(x) to refer to the aforementioned unique y\in C . Therefore, the following notations are equivalent:

  • (x,y)\in f , when viewing f as a subset of the Cartesian product D\times C ;
  • x\,f\,y, when viewing f as a relation from D to C ;
  • f(x)=y


In practice, a function is completely determined through a formula that assigns the variables. For example:


y is the depending variable and x is the independent one.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.