1.3. FunctionsΒΆ

Definition 1.47 (Function)

A partial function (or simply function) from a set A to a set B, in symbols f:Aβ†’B (or Aβ†’fB or x↦f(x)) is a specific rule that assigns a unique element y∈B to an element x∈A.

The rule need not be defined for every element in A.

Note

Following [10], our definition of functions is somewhat different from the traditional definition. In particular, we don’t require that f maps each element of A to an element of B. It may map only some elements of A to B.

See also : total function below.

Definition 1.48 (Function value or image)

If f maps an element x∈A to an element y∈B, We say that the element y is the value of the function f at x (or the image of x under f) and denote as f(x), that is, y=f(x). We also say that f attains or assumes the value y at x. We also sometimes say that y is the output of f when the input is x.

Definition 1.49 (Domain of a function)

For a function f:A→B the domain of the function is the subset of A for which the function is defined. It is denoted by domf.

domfβ‰œ{x∈A|βˆƒy∈B such that y=f(x)}.

Definition 1.50 (Total function)

A function f:A→B is called a total function if domf=A.

The normal set-theoretic definition of a function coincides with the definition of total function above.

Definition 1.51 (Range of a function)

The set {y∈B|βˆƒx∈A such that y=f(x)} is called the range of f denoted by rangef.

In other words, the set of values attained by f is called its range.

The domain is a subset of A and the range is a subset of B.

Definition 1.52 (Equality of functions)

Two functions f:Aβ†’B and g:Aβ†’B are said to be equal, in symbols f=g if domf=domg and f(x)=g(x)βˆ€x∈domf.

In words, they map the same elements of A to same elements of B.

Definition 1.53 (Surjective function)

A function f:Aβ†’B is called onto or surjective if rangef is all of B. i.e. for every y∈B, there exists (at least one) x∈A such that y=f(x).

Definition 1.54 (Injective function)

A function f:Aβ†’B is called one-one or injective if x1β‰ x2⟹f(x1)β‰ f(x2).

Definition 1.55 (Bijective function)

A total function f:A→B is called one-one onto or bijective if it is injective as well as surjective.

For a bijective function domf=A, rangef=B, the elements of A and B are in one-to-one mapping.

Example 1.10 (Square root)

Let f:R→R be defined as:

f(x)=x.

domf=[0,∞). rangef=[0,∞).

f is partial and injective. It is neither surjective nor bijective.

Example 1.11 (Logarithm)

Let f:R→R be defined as:

f(x)=log⁑(x).

domf=(0,∞). rangef=(βˆ’βˆž,∞)=R.

f is partial, injective and surjective (but not bijective).

Example 1.12 (Exponential)

Let f:R→R be defined as:

f(x)=ex.

domf=(βˆ’βˆž,∞)=R. rangef=(0,∞)=R.

f is total and injective but not surjective.

Example 1.13 (Extended value extension of exponential)

Let f:Rβˆͺ{βˆ’βˆž,∞}β†’Rβˆͺ{βˆ’βˆž,∞} be defined as:

f(x)={exx∈R0x=βˆ’βˆžβˆžx=∞.

domf=[βˆ’βˆž,∞]. rangef=[0,∞]=R.

f is total and injective but not surjective.

Example 1.14 (Dirichlet’s unruly indicator function for rational numbers)

Let g:R→R be defined as:

g(x)β‰œ{1if x∈Q;0if xβˆ‰Q.

domg=R, rangeg={0, 1 }$.

Example 1.15 (Absolute value function)

f(x)=|x|={xif xβ‰₯0;βˆ’xif x<0.

The domain is R and the range is R+=[0,∞).

f is total. It is not injective. It is not surjective.

Example 1.16 (Logarithm of the determinant)

The set of nΓ—n real symmetric matrices is denoted by Sn. The set of positive semidefinite symmetric matrices is denoted by S+n. The set of positive definite symmetric matrices is denoted by S++n.

Consider the function f:Sn→R given by

f(X)=log⁑det(X).

The domain of the function is domf=S++n. The function is not defined for matrices which are not positive definite.

In summary, for a function f:A→B:

  • If domf=A then, the function is total.

  • If rangef=B then, the function is surjective.

  • If f(x1)=f(x2)⟹x1=x2, then the function is injective.

  • If f is total, injective and surjective, then it is bijective.

1.3.1. Image under a functionΒΆ

Let f:X→Y be a (partial) function.

Definition 1.56 (Image of a set under a function)

If AβŠ†X, then image of A under f denoted as f(A) (a subset of Y) is defined by

f(A)={y∈Y|βˆƒx∈A such that y=f(x)}.

Note that the definition is valid even if some elements of the subset A may not belong to domf.

Definition 1.57 (Inverse image )

If B is a subset of Y then the inverse image fβˆ’1(B) of B under f is the subset of X defined by

fβˆ’1(B)={x∈X|f(x)∈B}.

Remark 1.5

If B∩rangef=βˆ… then fβˆ’1(B)=βˆ….

Proposition 1.7

Let {Ai}i∈I be a family of subsets of X. Let {Bi}i∈I be a family of subsets of Y.

Then, the following results hold:

Image of the union of Ai is the union of the images of Ai.

f(βˆͺi∈IAi)=βˆͺi∈If(Ai).

Image of the intersection of Ai is a subset of the intersection of the images of Ai.

f(∩i∈IAi)βŠ†βˆ©i∈If(Ai).

Inverse image of the union of Bi is the union of the inverse images of Bi.

fβˆ’1(βˆͺi∈IBi)=βˆͺi∈Ifβˆ’1(Bi).

Inverse image of the intersection of Bi is the intersection of the inverse images of Bi.

fβˆ’1(∩i∈IBi)=∩i∈Ifβˆ’1(Bi).

Let BβŠ†Y. Inverse image of complement of B (w.r.t. Y) is the complement of the inverse image of B w.r.t. the domain of f.

fβˆ’1(Yβˆ–B)=domfβˆ–fβˆ’1(B)βŠ†Xβˆ–fβˆ’1(B).

1.3.2. Function CompositionΒΆ

Definition 1.58 (Composition)

Given two functions f:Xβ†’Y and g:Yβ†’Z, their composition g∘f is the function g∘f:Xβ†’Z defined by

(g∘f)(x)=g(f(x))βˆ€x∈domf such that f(x)∈domg.

Remark 1.6

domg∘fβŠ†domfβŠ†X.

The domain of the composition may be smaller than the domain of f as g may not be defined for every y in rangef.

Theorem 1.1

Given two one-one functions f:Xβ†’Y and g:Yβ†’Z, their composition g∘f is one-one.

Proof. Let x1,x2∈domg∘f. We need to show that g(f(x1))=g(f(x2))⟹x1=x2. Since g is one-one, hence

g(f(x1))=g(f(x2))⟹f(x1)=f(x2).

Further, since f is one-one, hence

f(x1)=f(x2)⟹x1=x2.

Theorem 1.2

Given two onto functions f:Xβ†’Y and g:Yβ†’Z, their composition g∘f is onto.

Proof. Let z∈Z. We need to show that there exists x∈X such that g(f(x))=z. Since g is on-to, hence for every z∈Z, there exists y∈Y such that z=g(y). Further, since f is onto, for every y∈Y, there exists x∈X such that y=f(x). Combining the two, for every z∈Z, there exists x∈X such that z=g(f(x)).

Theorem 1.3

Given two one-one onto functions f:Xβ†’Y and g:Yβ†’Z, their composition g∘f is one-one onto.

Proof. This is a direct result of combining Theorem 1.1 and Theorem 1.2.

Corollary 1.1

Given two bijective (total) functions f:Xβ†’Y and g:Yβ†’Z, their composition g∘f is bijective.

Definition 1.59 (Composition of total functions)

Given two total functions f:Xβ†’Y and g:Yβ†’Z, their composition g∘f is the function g∘f:Xβ†’Z defined by

(g∘f)(x)=g(f(x))βˆ€x∈X.

Since domf=X and domg=Y, hence composition is well defined over all of X.

1.3.3. Inverse FunctionΒΆ

Definition 1.60 (Inverse function)

If a function f:Xβ†’Y is one-one, then for every y in rangef, there exists a unique x∈X such that y=f(x).
This unique element is denoted by fβˆ’1(y). Thus, a function fβˆ’1:Yβ†’X can be defined by

fβˆ’1(y)=x whenever f(x)=y.

The function fβˆ’1 is called the inverse of f.

Note that we don’t require f to be onto since our definition of a function allows domfβˆ’1 to be a subset of Y (which happens to be rangef).

Remark 1.7

We can see that (f∘fβˆ’1)(y)=y for all y∈rangef. Also (fβˆ’1∘f)(x)=x for all x∈domf.

domfβˆ’1=rangef.
domf=rangefβˆ’1.

Remark 1.8

The inverse of an injective (partial) function is injective.

Definition 1.61 (Inverse of a total function)

If a total function f:Xβ†’Y is bijective, then for every y in Y, there exists a unique x∈X such that y=f(x).
This unique element is denoted by fβˆ’1(y). Thus, a total function fβˆ’1:Yβ†’X can be defined by

fβˆ’1(y)=x whenever f(x)=y.

The total function fβˆ’1 is called the inverse of f.

Remark 1.9

The inverse of a bijective function is bijective.

Definition 1.62 (Identity function)

We define an identity function on a set X denoted by IX:X→X as:

IX(x)=xβˆ€x∈X

Remark 1.10

Identify function is one-one and onto. It is a total function and is bijective.

Remark 1.11 (Composition of a total function with its inverse)

For a total function f:X→Y:

f∘fβˆ’1=IY.fβˆ’1∘f=IX.

1.3.4. SchrΓΆder-Bernstein TheoremΒΆ

Theorem 1.4 (SchrΓΆder-Bernstein Theorem)

Given two one-one total functions f:X→Y and g:Y→X, there exists a bijective total function h:X→Y.

Proof. Clearly, we can define a one-one onto function fβˆ’1:f(X)β†’X and another one-one onto function gβˆ’1:g(Y)β†’Y. Let the two-sided sequence Cx be defined as

…,fβˆ’1(gβˆ’1(x)),gβˆ’1(x),x,f(x),g(f(x)),f(g(f(x))),….

Note that the elements in the sequence alternate between X and Y. On the left side, the sequence stops whenever fβˆ’1(y) or gβˆ’1(x) is not defined. On the right side the sequence goes on infinitely.

We call the sequence as X stopper if it stops at an element of X or as Y stopper if it stops at an element of Y. If any element in the left side repeats, then the sequence on the left will keep on repeating. We call the sequence doubly infinite if all the elements (on the left) are distinct, or cyclic if the elements repeat. Define Z=XβˆͺY If an element z∈Z occurs in two sequences, then the two sequences must be identical by definition. Otherwise, the two sequences must be disjoint. Thus the sequences form a partition on Z. All elements within one equivalence class of Z are reachable from each other through one such sequence. The elements from different sequences are not reachable from each other at all. Thus, we need to define bijections between elements of X and Y which belong to same sequence separately.

For an X-stopper sequence C, every element y∈C∩Y is reachable from f. Hence f serves as the bijection between elements of X and Y. For an Y-stopper sequence C, every element x∈C∩X is reachable from g. Hence g serves as the bijection between elements of X and Y. For a cyclic or doubly infinite sequence C, every element y∈C∩Y is reachable from f and every element x∈C∩X is reachable from g. Thus either of f and g can serve as a bijection.

1.3.5. Restriction and ExtensionΒΆ

Definition 1.63 (Restriction of a function)

Let f:A→B be a function. Let C be a subset of A. Then, the restriction of f to C is the function f|C:A→B given by

f|C(x)=f(x)βˆ€x∈C∩domf.

In other words, the domain of f gets restricted to C∩domf and f is no longer defined for any x∈domfβˆ–C.

Remark 1.12

For total functions, the convention is to change the signature from f:A→B to f|C:C→B. This way, the restriction f|C is also a total function.

Definition 1.64 (Extension of a function)

An extension of a function f is any function g such that f is a restriction of g.

If g is an extension of f then domfβŠ‚domg.

1.3.6. GraphΒΆ

Definition 1.65 (Graph of a function)

Given a function f:Xβ†’Y, the set of ordered pairs (x,y) where x∈domf and y=f(x), is known as the graph of a function.

grafβ‰œ{(x,f(x))|x∈X}

The graph of a function is the subset of the Cartesian product XΓ—Y.

1.3.7. Set Valued FunctionsΒΆ

For a set X, the notation 2X denotes the power set of X.

Definition 1.66 (Set valued function/operator)

The notation A:Xβ†’2Y means that A maps every element of X to a subset of Y. In other words, A(x)βŠ†Y. A is a mapping from X to the power set of Y. Such a mapping A is called a set valued function or set valued operator.

Observation 1.1

If A is not defined on some values of X, we can simply say that A maps those values to βˆ… which is a subset of Y.

If f:Xβ†’Y is a partial function with domfβŠ†X, then, the corresponding set valued function A:Xβ†’2Y is:

A(x)={{f(x)} if x∈domfβˆ… if xβˆ‰domf.

Remark 1.13

Let A:X→2Y be a set valued function. Then, A is characterized by its graph

graA={(x,y)∈XΓ—Y|y∈A(x)}.

Definition 1.67 (Image of a subset under a set valued function)

Let A:Xβ†’2Y be a set valued function and let CβŠ†X. Then:

A(C)β‰œβ‹ƒx∈CA(x).

Definition 1.68 (Composition of set valued functions)

Let A:X→2Y and B:Y→2Z be set valued functions.

Then the composition B∘A:Xβ†’2Z is defined as:

(B∘A)(x)β‰œB(A(x))=⋃y∈A(x)B(y).

Definition 1.69 (Domain of a set valued function)

The domain of a set valued function A:X→2Y is defined as:

domAβ‰œ{x∈X|A(x)β‰ βˆ…}.

Definition 1.70 (Range of a set valued function)

The range of a set valued function A:X→2Y is defined as:

rangeAβ‰œA(X)=⋃x∈XA(x).

Note that A(X)βŠ†Y.

Remark 1.14

A set valued function A:X→2Y is:

  1. partial if domA≠X.

  2. total if domA=X.

  3. onto if rangeA=Y.

Definition 1.71 (Inverse of a set valued function)

The inverse of a set valued function A:X→2Y is defined using its graph as:

graAβˆ’1={(y,x)∈YΓ—X|(x,y)∈graA}.

For every (x,y)∈XΓ—Y, y∈A(x)⟺x∈Aβˆ’1(y).

The inverse of a set valued function is a set valued function and it always exists.

Definition 1.72 (Single valued function)

Let A:Xβ†’2Y be a set valued function. If for every x∈domA, A(x) is a singleton, then A is called an at most single valued function from X to Y.

This can be identified with a partial function.

Definition 1.73 (Selection of a set valued function)

Let A:Xβ†’2Y be a set valued function. A function f:Xβ†’Y is called a selection of A if f(x)∈A(x) for every x∈domA.

In other words, for every x∈domA, we select one value from the set A(x). Domain of a selection f is same as the domain of A.