Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Методичка дискретка(англ).doc
Скачиваний:
2
Добавлен:
12.11.2019
Размер:
1.33 Mб
Скачать

1.3 Functions

We begin with a descriptive working definition of “function.” A function f assigns to each element x in some set S a unique element in a set T. We say such an f is defined on S with values in T. The set S is called the domain of f and is sometimes written Dom(f). The element assigned to x is usually written f(x). Care should be taken to avoid confusing a func­tion f with its functional values f(x), especially when people write, as we will later, “the function f(x).” A function f is completely specified by:

(a) the set on which f is defined, namely Dom(f);

(b) the assignment, rule or formula giving the value f(x) for each x  Dom(f).

For x in Dom(f), f(x) is called the image of x under f. The set of all images f(x) is a subset of T called the image of f and written Im(f). Thus we have

Im(f)={f(x):x  Dom(f)}.

It is often convenient to specify a set T of allowable images, i.e., a set T containing Im(f). Such a set is called a codomain of f. While a function f has exactly one domain Dom(f) and exactly one image Im(f), any set containing Im(f) can serve as a codomain. Of course, when we specify a codomain we will try to choose one that is useful or informative in context. The notation f : S  T is shorthand for: “f is a function with domain S and codomain T.” We sometimes refer to a function as a map or mapping and say that f maps S into T. When we feel the need of a picture, we sometimes draw sketches such as those in Figure 1.

Figure 1

EXAMPLE 1 (a) Consider a function f :R R. This means that Dom(f) = R, and for each xR, f(x) represents a unique number in R. Thus R is a codomain for f but the image Im(f) may be a much smaller set. For example, if f1(x) = x2 for all xR, then Im(f1) = [0, ) and we could write f1 :R  [0, ). If f2 is defined by

then Im(f2) = {0, 1} and we could write f2 :R  [0, ) or f2 :RN or f2 :R  {0,1} among other choices.

(b) Recall that the absolute value |x| of x in R is defined by the rule

x

The function f given by f(x) = |x| is a function with domain R and image [0, ); note that |x|  0 for all xR. |x-y| = |x||y| and |x + y|  |x| + |y| for all x, yR.

(c) Consider the function g: NN defined by g(n) = n2n. Here it is useful to specify N as a codomain, since we might not be interested in the exact set Im(g). ■

We will avoid the terminology “range of a function f” because many authors use “range” for what we call the image of f and many others use “range” for what we call a codomain.

Consider a function f :ST. The graph of f is the following subset of ST:

Graph(f)={(x, y)  ST :y = f(x)}.

This definition is compatible with the use of the term in algebra and calculus. The graphs of the functions in Example 1(a) are sketched in Figure 2 on the next page.

Our working definition of “function” is incomplete; in particular, the term “assigns” is undefined. A very precise set-theoretical definition can be given. The key observation is this: Not only does a function determine its graph, but a function can be recovered from its graph. In fact, the graph of a function f: ST is a subset G of ST with the following property:

for each xS there is exactly one yT such that (x, y)  G.

Given G, we have Dom(f) = S, and, for each xS, f(x) is the unique element in T such that (x, f(x))  G. The point to observe is that nothing is lost if we regard functions and their graphs as the same, and we gain some precision in the process. A function with domain S and codomain T is a subset G of ST satisfying:

for each xS there is exactly one yT such that (x, y)  G.

If S and T are subsets of R and if ST is drawn so that S is part of the horizontal axis and T is part of the vertical axis, then a subset G of ST is a function [or the graph of a function] if every vertical line through a point in S intersects G in exactly one point.

A function f: ST is called one-to-one in case distinct elements in S have distinct images in T under f:

if x1, x2S and x1x2 then f(x1)  f(x2).

This condition is logically equivalent to:

if x1, x2 S and f(x1) = f(x2) then x1 = x2,

a form that is often useful. In terms of the graph G of f, f is one-to-one if and only if:

for each yT there is at most one xS such that (x, y)  G.