Definition. A function from a set
to a set
is a relation which satisfies the following two conditions:
, and
That is, a function assigns to each (clause 1) element of an element of
, and that assignment is unambiguous (clause 2). Since we could rewrite clause 1 as
(why?), we'll refer to clause 1 as the "domain clause" and clause 2 as the "unambiguousness clause".
Notation. Instead of the mouthful is a function from
to
, we write the shorthand
.
We also have this familiar notation:
Notation. If is a function from
to
, and
, we write
.
Observe that if and
, then this notation reads as follows:
and
, so we'd darn well better have
, or else something is very wrong.
There is another way to represent a function, by specifying its domain and its rule:
Notation. If is a function from
to
, we write
. To specify the rule that
uses, we write
For example, we could denote the function which takes in a real number as input, and squares it by
Notice that the arrow between the sets is a different shape from the one between elements of the set. As usual we want to let go of our s, so we could as well have written
or
This frees us from the tyranny of always writing .