Go to other chapters or to other volumes of math
Additional Material for this Chapter
Exercises for this Chapter
Answers to Exercises

Chapter 4  Functions

Section 1   Basic Ideas about Functions

This section begins with some seemingly trivial situations, which will serve as physical models of functions. However, from them the ideas of a function and some of its special properties will be deduced, producing general working models. There are two sets involved, which may be the same. Intuitively speaking, a physical function sends things from the first set into the second set falling onto things there.

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,

f(1) = k
f(2) = n
f(3) = p
f(4) = r

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

g(1) = p
g(2) = p
g(3) = p
g(4) = p
g(5) = p
g(6) = p
A function that carries everything onto the same element is called a constant function. All the images of elements in the first set are the same.

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

f(1) = 2,  f(2) = 4,  f(3) = 6, ... ,f(49) = 98,...
The images of 1, 2, 3, ..., 49,... are 2, 4, 6, ..., 98, ....
Letters as well as numbers may be involved.
f(a) = 2a,  f(b) = 2b,  f(a+6) = 2(a + 1) = 2a + 12,  f(c + d) = 2(c + d) = 2c + 2d
The general rule here is:    If function f is defined by an expression, f(x) = defining expression involving x, and if the x in f(x) is replaced by anything, then every x in the defining expression is replaced by that same thing.

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.

If   f(x,y) = 2x + 3y   then   f(5,4) = 2(5) + 3(4) = 22   and   f(u,v) = 2u + 3v
In this situation (x,y) is an ordered pair in the product space (coordinate plane) RxR where R= real number line of elementary algebra. Therefore, f: RxR --> R.   Similarly,
if   g(x,y,z) = x2 + y2 - z2   then   g: RxRxR -> R

[1.5] It is highly recommended to click here to see some examples of more important functions.

Suppose a function carries some, but not all, of the elements of a big set into a second set. All of those elements that the function does carry form a subset (of the big set) called the domain of the function. The domain becomes the first set mentioned earlier. All the images of the function form a subset called the range of the function. The range may be all of the second set or only part of it, as shown in the adjacent figure.

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

f(x) = (x + 1)2,      g(x) = x2 + 2x + 1
The sets involved are the positive integers N. So the two functions have the same domain N.
f              g
1 --> 4     1 -->4
2 --> 9     2 -->9
   3 --> 16   3 -->16
    ................    
The actions of f and g on any integer x are the same because of the identity (x + 1)2 = x2 + 2x + 1. Therefore f = g.