Function (mathematics)
Appearance
Informally, a function f is a way to associate each element 'x in a set X, called domain, with a unique element (denoted by f(x)) in another set Y, called codomain.
Formally, a function f with domain X and codomain Y (written as f: X → Y) as a subset of the Cartesian product X × Y (in other words, f is a set of ordered pairs {(x, y)} with x in X, y in Y, often called a binary relation); with the additional properties that f is:
- Functional: if there are two pairs (x, y) and (x, z) in f, then y = z.
- Total: for all x in X, there exists an ordered pair (x, y) in f for some y in Y.
Occasionly, functions as defined here are called total functions to distinguish them from partial functions which don't require condition 2 from above. In this encyclopedia, the terms "total function" and "function" are synonymous.
To illustarte, consider the following three figures:
File:Mathmap.png | This is a function. |
File:NotMap1.png | This is not a function in usual sense because 3&isinX is associated with two elements a and b in Y ( Property 1 is violated). It is a multivalued function. |
![]() | This is not a function in usual sense because 1&isinX is associated with nothing ( Property 2 is violated). It is a partial function. |