For all humankind
Academicsubsite
ZixuanZhang
ZixuanZhang
Ponder...

Function

A function assigns to every uniquely an element ; formally, a subset such that every occurs in exactly one pair .

Definition 2.11 (Function)

Given sets and , a function from to is a rule that assigns to every uniquely to an element .

More formally, a function from to is a subset such that for all , there exists exactly one such that . We usually write

and

Examples

The map with is a function, and so is . By contrast, is not a function because it is undefined at , and is not a function because it assigns two values.

Domain and range

When specifying a function, the domain and range must be specified as well: the same rule with different codomains is a different function.

Related

Stated in