The term “function” only entered mathematics around the 17th century with Leibniz concurrent with the development of calculus and analytical geometry (such as the study of curves in the plane). Before this notions of dependent and independent variables that we are used to when studying
\(y=f(x)\) were not so well formalised. Arguably there was some work in this direction around the 12th-14th centuries by mathematicians such as Sharaf al-Din al-Tusi (who developed systematic method for numerical approximation of the roots of cubic polynomials) and Nicole Oresme (who first proved that the harmonic series diverges). Around the 19th century developments in mathematics required more general notions of functions and mathematicians, such as Dirichlet, Dedekind and Cantor, pushed away from the notion of a function as a formula and towards more general definitions such as the one above.
Once we have this more general idea of a function, we need ways to represent it. A very natural way (once Descartes introduced it — though it was also developed concurrently by Fermat and much earlier by Oresme) is to plot the function as a curve in the plane. Each point on the curve represents a pair of coordinates
\((x,y)\) so that
\(y=f(x)\text{.}\) With this more general idea of a function we might try drawing something like we did above for the days-of-the-week example. That is, we might draw two sets of elements and edges between them to indicate that the function applied to that element in the first set gives the corresponding element in the second.
We could also just explicitly write out the mapping. So, for example, if the sets in the first of these functions are
\begin{equation*}
A = \set{1,2,3,4,5} \qquad B = \set{a,b,c,d}
\end{equation*}
then the function can be written as
\begin{equation*}
f = \set{ (1,b), (2,d), (3,b), (4,a), (5,d)}
\end{equation*}
Both these approaches are reasonably practical when the domain and codomain of the function are small, but is really not going to work as soon as they get a little bigger.
Example 10.2.2.
Consider the sets
\begin{align*}
f &= \set{ (x,y) \in \mathbb{Z}\times \mathbb{Z} \so 3x+2y=0}\\
g &= \set{ (x,y) \in \mathbb{Z}\times \mathbb{Z} \so 3x+y=0}.
\end{align*}
Both are subsets of \(\mathbb{Z} \times \mathbb{Z}\) and so are (by definition) relations on \(\mathbb{Z}\text{.}\) Only one is a function from \(\mathbb{Z}\) to \(\mathbb{Z}\text{.}\)
In order for \(f\) to be a function it has to satisfy two conditions:
-
For every \(x\) in the domain, there must be a \(y\) in the codomain so that \(f(x)=y \text{,}\) and
-
If \(f(x)=y\) and \(f(x)=z\) then \(y=z\text{.}\)
The first of these fails, since if we set \(x=1\text{,}\) then there is no integer \(y\) so that \(3+2y=0\text{.}\) Indeed we require \(y=-\frac{3}{2}\text{.}\) The second condition is satisfied, because if \(f(x)=y\) and \(f(x)=z\text{,}\) then we know that
\begin{equation*}
3x + 2y = 0 \qquad \text{and} \qquad 3x+2z = 0
\end{equation*}
then subtract one equation from the other to get
\begin{equation*}
2y-2z = 0
\end{equation*}
and so \(y=z\text{.}\)
The relation \(g\) satisfies both conditions:
-
Let \(x\) be any integer, then we can set \(y=-3x \in \mathbb{Z}\) and \(3x+y=0\) as required.
-
The second condition is satisfied by the same argument we used for \(f\text{.}\)
The codomain of \(g\) is the set of integers, but its range \(\set{n \in \mathbb{Z} \text{ so that } 3|n}\text{.}\)