function

A function is a relation that is total and functional.

Formally,
a function f from domain X to codomain Y is a subset of the Cartesian product X×Y such that

  1. every element of the domain has at least one image element:

    • for all xX there exists a yY such that (x,y)R
      i.e. f is left-total
  2. every element of the domain of definition is uniquely assigned:

    • for all xX and all ya,ybY, if (x,ya)R and (x,yb)R then ya=yb
      i.e. f is right-unique

Thus, to be a function is for every element of the domain to have exactly one existing image element.


If yY is assigned to xX by function f, we say f maps x to y, and this is commonly written y=f(x) or f:xy.

The subset of Y that is paired with elements of X by f is the image of X under f.


A function which is also a bijective relation is a bijection.


Powered by Forestry.md