In logic and mathematics a function, also known as a map or mapping, is a relation that associates members of one class X with some unique member y of another class Y. The association is written as y=f(x). The class X is called the domain of the function, and Y its range. Thus ‘the father of x’ is a function whose domain includes all people, and whose range is the class of male parents. But the relation ‘son of x’ is not a function, because a person can have more than one son. ‘Sine x’ is a function from angles onto real numbers; the length of the perimeter of a circle, πx, is a function of its diameter x; and so on. Functions may take sequences <x1…xn> as their arguments, in which case they may be thought of as associating a unique member of Y with any ordered n-tuple as argument. Given the equation y=f(x1…xn), x1…xn are called the independent variables, or arguments of the function, and y the dependent variable or value. Functions may be many-one, meaning that different members of X may take the same member of Y as their value, or one-one, when to each member of X there corresponds a distinct member of Y. A function with domain X and range Y is also called a mapping from X to Y, written fX → Y. If the function is such that
then the function is an injection from X to Y. If alsothen the function is a bijection of X onto Y. A bijection is also known as a one-one correspondence. A bijection is both an injection and a surjection where a surjection is any function whose domain is X and whose range is the whole of Y. Since functions are relations a function may be defined as a set of ordered pairs <
x,
y> where
x is a member of X and
y of Y.
One of Frege’s logical insights was that a concept is analogous to a function, and a predicate analogous to the expression for a function (a functor). Just as ‘the square root of x’ takes us from one number to another, so ‘x is a philosopher’ refers to a function that takes us from persons to truth-values: true for values of x who are philosophers, and false otherwise.