If today we try to answer the difficult question "What is mathematics?" we often respond with an answer such as "It is the study of relations on sets" or "It is the study of functions on sets" or "It is the study of dependencies among variable quantities". If these statements come anywhere close to the truth then it might be logical to suggest that the concept of a function must have arisen in the very earliest stages in the development of mathematics. Indeed if we look at Babylonian mathematics we find tables of squares of the natural numbers, cubes of the natural numbers, and reciprocals of the natural numbers. These tables certainly define functions from N to N. E T Bell wrote in 1945:-
It may not be too generous to credit the ancient Babylonians with the instinct for functionality; for a function has been successively defined as a table or a correspondence.However this surely is the result of modern mathematicians seeing ancient mathematics through modern eyes. Although we can see that the Babylonians were dealing with functions, they would not have thought in these terms. We therefore have to reject the suggestion that the concept of a function was present in Babylonian mathematics even if we can see that they were studying particular functions.
If we move forward to Greek mathematics then we reach the work of Ptolemy. He computed chords of a circle which essentially means that he computed trigonometric functions. Surely, one might think, if he was computing trigonometric functions then Ptolemy must have understood the concept of a function. As O Petersen wrote in 1974 in :-
But if we conceive a function, not as a formula, but as a more general relation associating the elements of one set of numbers with the elements of another set, it is obvious that functions in that sense abound throughout the Almagest.Indeed Petersen is certainly correct to say that functions, in the modern sense, occur throughout the Almagest. Ptolemy dealt with functions, but it is very unlikely that he had any understanding of the concept of a function. As Thiele writes on the first page of :-
From time to time, anachronistic comparisons like the one just given help us with the elucidation of documented facts, but not with the interpretation of their history.Having suggested that the concept of a function is absent in these ancient pieces of mathematics, let us suggest, as Youschkevitch does in , that Oresme was getting closer in 1350 when he described the laws of nature as laws giving a dependence of one quantity on another. Youschkevitch writes :-
The notion of a function first occurred in more general form in the 14th century in the schools of natural philosophy at Oxford and Paris.Galileo was beginning to understand the concept even more clearly. His studies of motion contain the clear understanding of a relation between variables. Again another piece of his mathematics shows how he was beginning to grasp the concept of a mapping between sets. In 1638 he studied the problem of two concentric circles with centre O, the larger circle A with diameter twice that of the smaller one B. The familiar formula gives the circumference of A to be twice that of B. But taking any point P on the circle A, then PA cuts circle B in one point. So Galileo had constructed a function mapping each point of A to a point of B. Similarly if Q is a point on B then OQ produced cuts circle A in exactly one point. Again he has a function, this time from points of B to points of A. Although the circumference of A is twice the length of the circumference of B they have the same number of points. He also produced the standard one-to-one correspondence between the positive integers and their squares which (in modern terms) gave a bijection between N and a proper subset.
At almost the same time that Galileo was coming up with these ideas, Descartes was introducing algebra into geometry in La Géométrie. He says that a curve can be drawn by letting lines take successively an infinite number of different values. This again brings the concept of a function into the construction of a curve, for Descartes is thinking in terms of the magnitude of an algebraic expression taking an infinity of values as a magnitude from which the algebraic expression is composed takes an infinity of values.
Let us pause for a moment before reaching the first use of the word "function". It is important to understand that the concept developed over time, changing its meaning as well as being defined more precisely as decades went by. We have already suggested that a table of values, although defining a function, need not be thought of by the creator of the table as a function. Early uses of the word "function" did encapsulate ideas of the modern concept but in a much more restrictive way.
Like so many mathematical terms, the word function was first used with its usual non-mathematical meaning. Leibniz wrote in August 1673 of:-
... other kinds of lines which, in a given figure, perform some function.Johann Bernoulli, in a letter to Leibniz written on 2 September 1694, described a function as:-
... a quantity somehow formed from indeterminate and constant quantities.In a paper in 1698 on isoperimetric problems Johann Bernoulli writes of "functions of ordinates" (see ). Leibniz wrote to Bernoulli saying:-
... I am pleased that you use the term function in my sense.It was a concept whose introduction was particularly well timed as far as Johann Bernoulli was concerned for he was looking at problems in the calculus of variations where functions occur as solutions. See  for more information about how the author considers the calculus of variations to be the mathematical theory which developed most intimately in connection with the concept of a function.
One can say that in 1748 the concept of a function leapt to prominence in mathematics. This was due to Euler who published Introductio in analysin infinitorum in that year in which he makes the function concept central to his presentation of analysis. Euler defined a function in the book as follows:-
A function of a variable quantity is an analytic expression composed in any way whatsoever of the variable quantity and numbers or constant quantities.This is all very well but Euler gives no definition of "analytic expression" rather he assumes that the reader will understand it to mean expressions formed from the usual operations of addition, multiplication, powers, roots, etc. He divides his functions into different types such as algebraic and transcendental. The type depends on the nature of the analytic expression, for example transcendental functions are not algebraic such as:-
... exponentials, logarithms, and others which integral calculus supplies in abundance.Euler allowed the algebraic operations in his analytic expressions to be used an infinite number of times, resulting in infinite series, infinite products, and infinite continued fractions. He later suggests that a transcendental function should be studied by expanding it in a power series. He does not claim that all transcendental functions can be expanded in this was but says that one should prove it in each specific case. However there was a difficulty in Euler's work which was to lead to confusion, for he failed to distinguish between a function and its representation. However Introductio in analysin infinitorum was to change the way that mathematicians thought about familiar concepts. Jahnke writes :-
Until Euler the trigonometric quantities sine, cosine, tangent etc., were regarded as lines connected with the circle rather than functions. ... It was Euler who introduced the functional point of view.The function concept had led Euler to make many important discoveries before he wrote Introductio in analysin infinitorum. For example it had led him to define the gamma function and to solve the problem which had defeated mathematicians for some considerable time, namely summing the series
Let us return to the contents of Introductio in analysin infinitorum. In it Euler introduced continuous, discontinuous and mixed functions but since the first two of these concepts have different modern meanings we will choose to call Euler's versions E-continuous and E-discontinuous to avoid confusion. An E-continuous function was one which was expressed by a single analytic expression, a mixed function was expressed in terms of two or more analytic expressions, and an E-discontinuous function included mixed functions but was a more general concept. Euler did not clearly indicate what he meant by an E-discontinuous function although it was clear that Euler thought of them as more general than mixed functions. He later defined them as those functions which had arbitrarily handdrawn curves as their graphs (rather confusingly essentailly what we call a continuous function today).
In 1746 d'Alembert published a solution to the problem of a vibrating stretched string. The solution, of course, depended on the initial form of the string and d'Alembert insisted in his solution that the function which described the initial velocities of the each point of the string had to be E-continuous, that is expressed by a single analytic expression. Euler published a paper in 1749 which objected to this restriction imposed by d'Alembert, claiming that for physical reasons more general expressions for the initial form of the string had to be allowed. Youschkevitch writes :-
d'Alembert did not agree with Euler. Thus began the long controversy about the nature of functions to be allowed in the initial conditions and in the integrals of partial differential equations, which continued to appear in an ever increasing number in the theory of elasticity, hydrodynamics, aerodynamics, and differential geometry.In 1755 Euler published another highly influential book, namely Institutiones calculi differentialis. In this book he defined a function in an entirely general way, giving what we might reasonably say was a truly modern definition of a function:-
If some quantities so depend on other quantities that if the latter are changed the former undergoes change, then the former quantities are called functions of the latter. This definition applies rather widely and includes all ways in which one quantity could be determined by other. If, therefore, x denotes a variable quantity, then all quantities which depend upon x in any way, or are determined by it, are called functions of x.This might have been a huge breakthrough but after giving this wide definition, Euler then devoted the book to the development of the differential calculus using only analytic functions. The first problems with Euler's definition of types of functions was pointed out in 1780 when it was shown that a mixed function, given by different formulas, could sometimes be given by a single formula. The clearest example of such a function was given by Cauchy in 1844 when he noted that the function
Other mathematicians gave their own versions of the definition of a function. Condorcet seems to have been the first to take up Euler's general definition of 1755, see  for details. In 1778 the first two parts of Condorcet intended five part work Traité du calcul integral was sent to the Paris Academy. It was never published but was seen by many leading French mathematicians. In this work Condorcet distinguished three types of functions: explicit functions, implicit functions given only by unsolved equations, and functions which are defined from physical considerations such as being the solution to a diffferential equation.
Lacroix, who had read Condorcet's unfinished work, wrote in 1797:-
Every quantity whose value depends on one or more other quantities is called a function of these latter, whether one knows or is ignorant of what operation it is necessary to use to arrive from the latter to the first.Cauchy, in 1821, came up with a definition making the dependence between variables central to the function concept. He wrote in Cours d'anlyse:-
If variable quantities are so joined between themselves that, the value of one of these being given, one can conclude the values of all the others, one ordinarily conceives these diverse quantities expressed by means of the one of them, which then takes the name independent variable; and the other quantities expressed by means of the independent variable are those which one calls functions of this variable.Notice that despite the generality of Cauchy's definition, which is designed to cover the case of explicit and implicit functions, he is still thinking of a function in terms of a formula. In fact he makes the distinction between explicit and implicit functions immediately after giving this definition. He also introduces concepts which indicate that he is still thinking in terms of analytic expressions.
Fourier, in Théorie analytique de la Chaleur in 1822, gave the following definition:-
In general, the function f(x) represents a succession of values or ordinates each of which is arbitrary. An infinity of values being given of the abscissa x, there are an equal number of ordinates f(x). All have actual numerical values, either positive or negative or nul. We do not suppose these ordinates to be subject to a common law; they succeed each other in any manner whatever, and each of them is given as it were a single quantity.It is clear that Fourier has given a definition which deliberately moves away from analytic expressions. However, despite this, when he begins to prove theorems about expressing an arbitrary function as a Fourier series, he uses the fact that his arbitrary function is continuous in the modern sense!
Dirichlet, in 1837, accepted Fourier's definition of a function and immediately after giving this definition he defined a continuous function (using continuous in the modern sense). Dirichlet also gave an example of a function defined on the interval [ 0, 1] which is discontinuous at every point, namely f(x) which is defined to be 0 if x is rational and 1 if x is irrational.
In 1838 Lobachevsky gave a definition of a general function which still required it to be continuous:-
A function of x is a number which is given for each x and which changes gradually together with x. The value of the function could be given either by an analytic expression or by a condition which offers a means for testing all numbers and selecting one from them, or lastly the dependence may exist but remain unknown.Certainly Dirichlet's everywhere discontinuous function will not be a function under Lobachevsky's definition. Hankel, in 1870, deplored the confusion which still reigned in the function concept:-
One person defines functions essentially in Euler's sense, the other requires that y must change with x according to a law, without giving an explanation of this obscure concept, the third defines it in Dirichlet's manner, the fourth does not define it at all. However, everybody deduces from his concept conclusions that are not contained in it.Around this time many pathological functions were constructed. Cauchy gave an early example when he noted that f(x) = exp(-1/x2) for x ≠ 0, f(0) = 0, is a continuous function which has all its derivatives at 0 equal to 0. It therefore has a Taylor series which converges everywhere but only equals the function at 0. In 1876 Paul du Bois-Reymond made the distinction between a function and its representation even clearer when he constructed a continuous function whose Fourier series diverges at a point. This line was taken further in 1885 when Weierstrass showed that any continuous function is the limit of a uniformly convergent sequence of polynomials. Earlier, in 1872, Weierstrass had sent a paper to the Berlin Academy of Science giving an example of a continuous function which is nowhere differentiable. Lützen writes in :-
Weierstrass's function contradicted an intuitive feeling held by most of his contemporaries to the effect that continuous functions were differentiable except at "special points". it created a sensation and, according to Hankel, disbelief when du Bois-Reymond published it in 1875.Poincaré was unhappy with the direction that the definition of functions had taken. He wrote in 1899:-
For half a century we have seen a mass of bizarre functions which appear to be forced to resemble as little as possible honest functions which serve some purpose. ... Formerly, when a new function was invented, it was in view of some practical end. Today they are invented on purpose to show that our ancestor's reasoning was at fault, and we shall never get anything more than that out of them. If logic were the teacher's only guide, he would have to begin with the most general, that is to say, the most weird functions.Where have more modern definitions taken the concept? Goursat, in 1923, gave the definition which will appear in most textbooks today:-
One says that y is a function of x if to a value of x corresponds a value of y. One indicates this correspondence by the equation y = f(x).Just in case this is not precise enough and involves undefined concepts such as 'value' and 'corresponds', look at the definition given by Patrick Suppes in 1960:-
Definition. A is a relation (x)(x ∈ A (y)(z)(x = (y, z)). We write y A z if (y, z) ∈ A.What would Poincaré have thought of Suppes' definition?
Definition. f is a function f is a relation and (x)(y)(z)(x f y and x f z y = z).
Article by: J J O'Connor and E F Robertson
MacTutor History of Mathematics