Function (map)

A relation that assigns to each input exactly one output
Function (map)

Let AA and BB be . A function (or map) ff from AA to BB, written f ⁣:ABf\colon A\to B, can be defined as a fA×Bf \subseteq A\times B (with A×BA\times B the of AA and BB) such that

aA  !bB with (a,b)f, \forall a\in A\;\exists!\,b\in B\text{ with }(a,b)\in f,

where (a,b)(a,b) is an and “!\exists!” means “there exists a unique.”

The of ff is the input set AA and the is the target set BB; the actual outputs form the f(A)Bf(A)\subseteq B. Functions may be or depending on how they hit the codomain.

Examples:

  • f ⁣:ZZf\colon\mathbb{Z}\to\mathbb{Z} given by f(n)=2nf(n)=2n.
  • The inclusion map ι ⁣:{1,2}{1,2,3}\iota\colon \{1,2\}\to\{1,2,3\} with ι(x)=x\iota(x)=x.
  • A constant function c ⁣:ABc\colon A\to B defined by c(a)=b0c(a)=b_0 for a fixed b0Bb_0\in B.