If
[math]A
[/math] and
[math]B
[/math] are sets, then a
function from [math]A
[/math] to [math]B
[/math] (written
[math]f : A \href{/cs2800/wiki/index.php/%E2%86%92}{→} B
[/math]) is an
unambiguous rule giving, for
every input
[math]x \href{/cs2800/wiki/index.php/%E2%88%88}{∈} A
[/math], an output
[math]f(x) \href{/cs2800/wiki/index.php/%E2%88%88}{∈} B
[/math].
[math]A
[/math] is called the
domain of
[math]f
[/math];
[math]B
[/math] is called the
codomain.