LESSWRONG
LW

Wikitags
Main
6
Physical metaphor
3

Function

Edited by So8res, et al. last updated 9th Jun 2016

Intuitively, a function f is a procedure (or machine) that takes an input and performs some operations to produce an output. For example, the function "+" takes a pair of numbers as input and produces their sum as output: on input (3, 6) it produces 9 as output, on input (2, 18) it produces 20 as output, and so on.

Formally, in mathematics, a function f is a relationship between a X of inputs and a set Y of outputs, which relates each input to exactly one output. For example, − is a function that relates the pair (4,3) to 1, and (19,2) to 17, and so on. In this case, the input set is all possible pairs of , and the output set is numbers. We write (and say "f has the X to Y") to denote that f is some function that relates inputs from the set X to outputs from the set Y. For example, −:(N×N)→N, which is read "subtraction is a function from -pairs to natural numbers."

X is called the of f. Y is called the of f. We can visualize a function as a mapping between domain and codomain that takes every element of the domain to exactly one element of the codomain, as in the image below.

Domain, Codomain, and Image

Examples

There is a function f:R→R from the to the real numbers which sends every real number to its square; symbolically, we can write f(x)=x2.

(TODO)

Parents:
Children:
and 18 more
6
6
set
codomain
type
Mathematics
Range (of a function)
real numbers
numbers
f:X→Y
domain
natural number
Discussion2
Discussion2
Codomain vs image