Function
Function
org/wiki/Function_(mathematics)
In the definition of function, X and Y are respectively called the A function that associates any of the
domain and the codomain of the function f.[7] If (x, y) belongs to four colored shapes to its color.
the set defining f, then y is the image of x under f, or the value of
f applied to the argument x. In the context of numbers in
particular, one also says that y is the value of f for the value x of its variable, or, more concisely, that y
is the value of f of x, denoted as y = f(x).
Two functions f and g are equal, if their domain and codomain sets are the same and their output
values agree on the whole domain. More formally, f = g if f(x) = g(x) for all x ∈ X, where f:X → Y
and g:X → Y.[8][9][note 4]
The domain and codomain are not always explicitly given when a function is defined, and, without
some (possibly difficult) computation, one might only know that the domain is contained in a larger
set. Typically, this occurs in mathematical analysis, where "a function from X to Y " often refers to a
function that may have a proper subset[note 5] of X as domain. For example, a "function from the reals
to the reals" may refer to a real-valued function of a real variable. However, a "function from the reals
to the reals" does not mean that the domain of the function is the whole set of the real numbers, but
only that the domain is a set of real numbers that contains a non-empty open interval. Such a function
is then called a partial function. For example, if f is a function that has the real numbers as domain
and codomain, then a function mapping the value x to the value is a function g from the
reals to the reals, whose domain is the set of the reals x, such that f(x) ≠ 0.
The range of a function is the set of the images of all elements in the domain.[10][11][12][13] However,
range is sometimes used as a synonym of codomain,[13][14] generally in old textbooks.
Relational approach
Any subset of the Cartesian product of two sets and defines a binary relation
between these two sets. It is immediate that an arbitrary relation may contain pairs that violate the
necessary conditions for a function given above.
3 of 26 29-01-2021, 19:09