
A function, in mathematics, was originally a relationship between numbers, such as that relating a to a2. The value of the function at the number a was the number related to a. This definition of a function emphasizes the fact that it is an operation: take a number, and find the value of the function there.
However, by the end of the 19th century, this kind of definition was not rigorous enough. As part of the search for the ultimate foundations of mathematics, mathematicians wanted to be able to reduce everything else to set theory, and this definition of a function was too loose to work. The new definition was that a function is a set of pairs, where for each a there is exactly one b such that the pair (a,b) is a member of the function. This definition does obscure the operation element of the previous one, but it has proved to be the standard. The set a such that for some b (a,b) is a member of the function is the domain of the function, and the set b such that for some a (a,b) is in the function is the range of the function. It is also more flexible, because a function does not only have to have numbers in the domain and range as it did originally. SMcL 
