A function (or map) is a rule or correspondence that
associates each element of a set X called the domain with a
unique element of another set Y called the codomain. We typically
give the rule a name such as a letter like f or g (or any letter of your
choice) or a name agreed upon by convention like sine or log or square root.
The term ''unique'' is critical in the definition as this says that one
cannot be associated with 2 or more elements of Y. Thus we can
call the y value corresponding to a particular x under the rule f by
the name f(x) (read f of x) since there is only one such y. However,
associating 2 elements of X with the same
and some elements of Y
not corresponding to any element of X are allowed as they are not ruled
out in the definition. The fact that the correspondence goes from the domain
to the codomain is indicated by the notation
.
For a subset
we use f(A) to mean the set
called the image of A. (Some
authors use
.) The set f(X) is called the range of f. While it is always the case that
, in general
they need not be equal. It is important to distinguish
while
.
For a subset
we use
to mean the set
called the inverse image of B. (Some authors use
.) Keep in mind that
while
.
If
and
we can form a new function
called a composite map denoted by
. The
symbol
is read as ''g circle f.'' The composition is
accomplished by defining
for each
.

The set of ordered pairs
is the
graph of f.