In a bag are some balls. On the table are some wide cans, all empty. All the balls are to be placed in the cans, subject to three rules:
[1.1]
(a) All the balls are involved (none left in the bag) and
(b) No single ball goes into two different cans.
(c) No balls are left outside the cans.
There is still considerable freedom in the placing of the balls. Most likely some of the cans will contain balls, and some will be empty. (Fig O)
However, there are four "special" situations that may happen, perhaps intentionally. (Each time there is a different number of balls in the bag.)
[1.2]
(A) All the balls go into the same can. (Any remaining cans are left empty.) (Fig A)
(B) Each ball goes into a separate can. (No can receives more than one ball.) (Fig B)
(C) All cans contain balls. (Every can receives a ball possibly more than one.)(Fig C)
(D) Every can has exactly one ball.(Fig D)
The dropping of balls from the bag (first set) into cans on the table (second set) sets up a relation: a ball is related to a can if the ball is in the can: ball ~ can. Therefore, in the relation-set every ordered pair has the form (ball,can).
Suppose the cans are given labels, as shown in the adjacent figure. Not shown are the labels given to the balls. They are the first integers = 1,2,3,.... The assignments
[1.3O]
1 --> k,
2 --> n,
3 --> n,
4 --> p,
5 --> p,
6 --> p,
7 --> p,
8 --> r,
9 --> r
produce the form in Fig O above. There are many other assignments that produce that same form. For example,
1 --> p,
2 --> n,
3 --> r,
4 --> p,
5 --> n,
6 --> r,
7 --> p,
8 --> p,
9 --> k
An example of a distribution in the form of Fig A is:
[1.3A]
1 --> p,
2 --> p,
3 --> p,
4 --> p,
5 --> p,
6 --> p
An example of a distribution in the form of Fig B is:
[1.3B]
1 --> k,
2 --> n,
3 --> p,
4 --> r
An example of a distribution in the form of Fig C is:
[1.3C]
1 --> k,
2 --> k,
3 --> m,
4 --> n,
5 --> n,
6 --> p,
7 --> p,
8 --> p,
9 --> q,
10 --> r,
11 --> r
An example of a distribution in the form of Fig D is:
[1.3D]
1 --> k,
2 --> m,
3 --> n,
4 --> p,
5 --> q,
6 --> r
The arrow notation is really another symbol of a relation. 6 --> r is simply another way of writing (6,r. (But the arrow notation is used only with functions, to be described.) To expand the ideas above, replace balls in the bag by elements in the first set. Also replace cans in the collection on the table by elements in the second set. Then elements of the first set are carried into elements of the second set. This "carrying" creates a special relation between the elements of the first set and the elements of the second set. The relation is called a function. The following is an intuitive description, almost a working definition, of a function. It uses the conditions given in [1.1].
[1.4a] A function f carries each element x in a first set into a second set (which may be the same as the first set). The element of the second set receiving the carried element x is denoted by f(x), called the image of x under f. There is only one image of each element x, and it is in the second set.
The general working definition is the following
[1.4b]
A function from a first set into a second set is a relation between those sets, such that all the elements of the first set appear once and only once as first coordinates, and only elements from the second set appear as second coordinates. If f is the name of the function, then ordered pairs in the relation-set of fhave the form (x,f(x)).
Using this function notation, and f the name of the function in [1.3B] above,
Using the general working definition of function f, the elements k, n, p, r are called images of the corresponding elements 1, 2, 3, 4 respectively. In general, if a, b, c,... are elements in the first set and f is the function (general working definition) from that first set, then then f(a), f(b), f(c)... are their images, respectively.
If g is the function defined in [1.3A] then
In these discussions most functions will have names like f,g,h. And most often the sets will have names that are capital English letters. If f is a function from a set U into a set V the notation f: U --> V will indicate this.
Another introductory example to functions can be seen by clicking here.
Functions involving large sets usually are defined by some formulas. Let N = {1,2,3,...} denote the set of all positive integers. A function f: N --> N might be defined by n --> 2n or f(n) = 2n or by the statement that f doubles each positive integer. Then
The letter x has no special meaning except, as a variable, to help define the function. It could be replaced by u and give a statement that is equivalent to [1.5]
If function g is defined by an expression, g(u) = defining expression involving u, and if the u in g(u) is replaced by anything, then every u in the defining expression is replaced by that same thing.
if g(u) = sin u + cos u + log u, then g(40) = sin 40 + cos 40 + log 40
If h(v) = 8v3 - 6v2 + 9v + 7, then h(r) = 8r3 - 6r2 + 9r + 7 and h(a+b) = 8(a+b)3 - 6(a+b)2 + 9(a+b) + 7.
It is quite possible to have functions of two (or more) variables.
[1.5] It is highly recommended to click here to see some examples of more important functions.
In the discussion of balls in cans, the bags serve as domains. The collections of cans containing balls are the ranges. An empty can is not in the range.
If a function f is defined using an expression, like f(x) = x2, then a method for seeing if an element y in the second set is in the range of f is to solve the equation y = f(x) for x. For example, 9 is in the range of this f because it is possible to solve 9 = x2 for x. But -9 is not in the range of this f because it is not possible to solve 9 = x2 for x. Here only integers are involved.
Here briefly discussed is the equality of functions.
[1.6a] Two functions are equal if they have identical relation-sets.
This is the technical definition of equality. The collection of all the first coordinates in the common relation-set forms the domain for the two equal functions. So they must have the same domain. The images of each element x in the domain (under the two functions) are the same because of the second coordinate of that element x. Therefore a more intuitive definition of equality is:
[1.6b] Two functions are equal if they have the same domain and the images of each element in that domain are equal.
Another way of saying the same thing, but with symbols is:
[1.6c] Let f and g be functions. Then f = g if and only if they have the same domain and f(x) = g(x) for each element x in that domain..
Let f and g be functions defined by