Function

DEFINITION1: Let  X and  Y be two sets and  f\subset{X\times{Y}} be a relation. If the following two conditions are provided, then the relation  f is called a “function” with domain  X and codomain  Y and denoted by  f:X\to{Y} or  X\stackrel{f}{\rightarrow}{Y}.

1.  \forall{x}\in{X}, \exists{y}\in{Y}: (x,y)\in{f},

2.  (x,y),(x,y')\in{f}\Rightarrow{y=y'}.

Henceforth, when we write  f:X\to{Y}, we will consider that “ f is a function from  X to  Y”.

As is seen from the definition, a function is a relation mapping each element in the domain to a unique element in the codomain. So, the notation  y=f(x) is generally used instead of the notations  xfy and  (x,y)\in{f} and read “ x maps to  y” or “ x maps to  f(x)”. The notation  f(x) is read “ f of  x”. Each element of the domain is called an “argument” and for each  x in the domain, the corresponding unique element  y in the codomain is called “the function value at  x”, “output  f for an element  x” or “the image  x” under the function  f. The set defined as  \{f(x)\:|\:x\in{X}\}\subset{Y} is called the “image” or the “range” of  f. Sometimes a function is called a “map” or a “mapping”.

EXAMPLE1 (Identity function): Let  X be a set. The function  I_{X} over  X defined as  \forall{x}\in{X}, I_{X}(x)=x is called the “identity function” of  X.

EXAMPLE2 (Constant function): Let  X and  Y be two non-empty set and  c be a constant in  Y. The function  f from  X to  Y defined as  \forall{x}\in{X}, f(x)=c is called a “constant function”.

EXAMPLE3 (Inclusion function): Let  X be a set and  A\subset{X}. The function  i_{A} from  A to  X defined as  \forall{a}\in{A}, i_{A}(a)=a is called an “inclusion function”.

EXAMPLE4 (Restriction and extension): Let  f:X\to{Y} and  A\subset{X}. The function  f|_{A} from  A to  Y defined as  \forall{a}\in{A}, f|_{A}(a)=f(a) is called a “restriction” of  f. Besides,  f is called an “extension” of  f|_{A}.

EXAMPLE5 (Characteristic function): Let  X be a set and  A\subset{X}. The function  \chi_{A} from  X to  \{0,1\} defined as

 \chi_{A}(x)=\left\{ \begin{array}{l} 1,\text{ }x\in{A}\\0,\text{ }x\in{X\setminus{A}} \end{array} \right.

is called the “characteristic function” of  A.

DEFINITION2: Let  f,g:X\to{Y}. If  \forall{x}\in{X}, f(x)=g(x), then the functions  f and  g are called “equal functions”.

DEFINITION3: Let  f:X\to{Y}. If it holds  f(x_{1})=f(x_{2})\Rightarrow{x_{1}=x_{2}} for  x_{1},x_{2}\in{X}, then  f is called an “injective function”, an “injection” or an “one to one function”. Since the condition of being an injection is equivalent to the condition  x_{1}\ne{x_{2}}\Rightarrow{f(x_{1})\ne{f(x_{2})}}, the last condition can be used as the definition of injection. As is seen from the definition, an injection is a function mapping two distinct arguments to two distinct images.

DEFINITION4: Let  f:X\to{Y}. If it holds  \forall{y}\in{Y}, \exists{x}\in{X} : f(x)=y, then  f is called a “surjective function”, a “surjection” or an “onto function”. A function is a surjection if and only if its image equal to its codomain.

DEFINITION5: A function is called a “bijective function”, a “bijection” or a “one to one correspondence” if it is both injective and surjective. The identity function of a set in Example1 can be given as an example.

EXAMPLE6: Let’s examine the following three functions  f,  g and  h:

 f is injective because it separately maps the elements of  X to the elements of  Y. However, for  e in  Y, there is no an element  x in  X satisfying  f(x)=e.

 g is surjective because each element of  B is the image of at least one element in  A  (g(2)=a, g(5)=b, g(1)=c, g(4)=d). However,  g is not injective because  g(3)=g(4) but  3\ne{4}.

As is seen from the above figure, the function  h is both injective and surjective i.e.,  h is a bijection.

The above three examples show us a function is injective if and only if any two arrows leaving from the domain don’t arrive the same images in the codomain, and a function is surjective if and only if for each element in the codomain, there exists at least one arrow leaving from the domain such that the arrow arrives this element. Unfortunately, these necessary and sufficient conditions cannot be used for a function whose domain or codomain has infinitely many elements because an infinite set cannot be displayed by the Venn diagram. There are many different ways for testing whether a function whose domain or codomain has infinitely many elements is injective (or surjective) or not. Let’s give some examples concerning the infinite sets:

EXAMPLE7: Let  a,b\in{\mathbb{R}},  a\ne{0},  f:\mathbb{R}\to{\mathbb{R}},  \forall{x}\in{\mathbb{R}},  f(x)=ax+b.  f is injective because  x_{1},x_{2}\in{\mathbb{R}}, f(x_{1})=f(x_{2})\Rightarrow{ax_{1}+b=ax_{2}+b}\Rightarrow{ax_{1}=ax_{2}\land{a\ne{0}}}  \Rightarrow{x_{1}=x_{2}}.

Choose  \displaystyle{x=\frac{y-b}{a}} for any  y in  \mathbb{R}. Then,  \displaystyle{f(x)=f(\frac{y-b}{a})=a\frac{y-b}{a}+b=y-b+b=y}. Hence  f is surjective. Since  f is both injective and surjective, it is a bijection.

EXAMPLE8: Let  f:\mathbb{R}\to{\mathbb{R}},  \forall{x}\in{\mathbb{R}},  f(x)=x^{2}.

 f is not injective because  f(-1)=(-1)^{2}=1=1^{2}=f(1) but  -1\ne{1}.

 f is not surjective because there is no an element in  \mathbb{R} such that  f(x)=x^{2}=-1 for  y=-1 in  \mathbb{R}.

EXAMPLE9: Consider the above function  f(x)=x^{2} as  \mathbb{R}\to{[0,+\infty)}. Actually, the function is the same as the above function. Its codomain is only changed. Under the given conditions, we will investigate whether this function is injective (surjective) or not:

Let  y\in{[0+\infty)}. Since  y\ge{0}, it has the square root  \sqrt{y}. Choose  x=\sqrt{y}\in{\mathbb{R}}. Since  f(x)=f\left( \sqrt{y} \right)=\left( \sqrt{y} \right)^{2}=|y|=y, then  f is surjective. As above,  f is not injective because  f(-1)=f(1)=1 but  -1\ne{1} for  -1,1 in the domain.

EXAMPLE10: This time, we consider the function  f(x)=x^{2} as  [0,+\infty)\to{[0,+\infty)}. Then, similar to example9, one can prove that  f is surjective. Now, we will investigate  f is whether injective or not: Take  {{x}_{1}},{{x}_{2}} in  [0,+\infty).

 f\left( {{x}_{1}} \right)=f\left( {{x}_{2}} \right)\Rightarrow x_{1}^{2}=x_{2}^{2}\Rightarrow \sqrt{x_{1}^{2}}=\sqrt{x_{2}^{2}}\Rightarrow \left| {{x}_{1}} \right|=\left| {{x}_{2}} \right|\Rightarrow {{x}_{1}}={{x}_{2}}.

So,  f is injective.

Depending on the domain and the codomain of a function, the injectivity or the surjectivity can be changed. When the injectivity or the surjectivity of the function  f(x)=x^{2} is asked, one should ask this question: What are the domain and the codomain of this function.

PROPOSITION1: Let  X and  Y be two sets with  n elements and  f:X\to{Y}. Then,

 f is injective if and only if it is surjective.

PROOF:

The above proposition is available for the finite sets. Over the infinite sets, an injective function doesn’t have to be surjective and a surjective function doesn’t have to be injective. The function  f(x)=e^{x} from  \mathbb{R} to  \mathbb{R} is injective. However, it is not surjective because it is positive-valued.

DEFINITION6: Let  X and  Y be two sets,  f:X\to{Y},  A\subset{X} and  B\subset{Y}. The sets defined as

 f(A)=\{f(x)\text{ }\vert\text{ }x\in{A}\},

 f^{-1}(B)=\{x\in{X}\text{ }\vert\text{ }f(x)\in{B}\}

are called the image of  A under  f and the preimage or the inverse image of  B under  f, respectively. As is seen from the definition,  f(A) is formed the images of the elements of  A and  f^{-1}(B) is formed the elements in  X whose images are in  B. Particularly, if it is chosen by  A=X, then  f(X) is range and denoted by  \text{Im}f. It is clear that  f(A)\subset{Y},  f^{-1}(B)\subset{X},  f(\varnothing)=\varnothing and  f^{-1}(\varnothing)=\varnothing.

EXAMPLE11:  X=\{1,2,3,4\}, Y=\{a,b,c,d,e\}, f(1)=a, f(2)=e, f(3)=e, f(4)=d,  A_{1}=\{1,4\},  A_{2}=\{2,3\},  A_{3}=\{1,2,4\},  A_{4}=X,  B_{1}=\{e\},  B_{2}=\{b,c\},  B_{3}=\{a,b,c,d\} and  B_{4}=Y. Then,

 f(A_{1})=\{a,d\},

 f(A_{2})=\{e\},

 f(A_{3})=\{a,d,e\},

 f(A_{4})=f(X)=\{a,d,e\},

 f^{-1}(B_{1})=\{2,3\},

 f^{-1}(B_{2})=\varnothing,

 f^{-1}(B_{3})=\{1,4\},

 f^{-1}(B_{4})=f^{-1}(Y)=X.

PROPOSITION2: Let  X and  Y be two sets,  f:X\to{Y},  A,B\subset{X} and  C,D\subset{Y}. Then,

a)  A\subset{B}\Rightarrow{f(A)\subset{f(B)}},

b)  C\subset{D}\Rightarrow{f^{-1}(C)\subset{f^{-1}(D)}}.

PROOF:

PROPOSITION3: Let  X and  Y be two sets and  f:X\to{Y}. If  I and  \Lambda are two index sets and  \{A_{i}\}_{i\in{I}}\subset{\mathbf{P}(X)},  \{B_{\lambda}\}_{\lambda\in{\Lambda}}\subset{\mathbf{P}(Y)} are two families, then

a)  \displaystyle{f\Big{(}\bigcup_{i\in{I}}{A_{i}}\Big{)}=\bigcup_{i\in{I}}{f(A_{i})}},

b)  \displaystyle{f\Big{(}\bigcap_{i\in{I}}{A_{i}}\Big{)}\subset{\bigcap_{i\in{I}}{f(A_{i})}}},

c)  \displaystyle{f^{-1}\Big{(}\bigcup_{\lambda\in{\Lambda}}{B_{\lambda}}\Big{)}=\bigcup_{\lambda\in{\Lambda}}{f^{-1}(B_{\lambda})}},

d)  \displaystyle{f^{-1}\Big{(}\bigcap_{\lambda\in{\Lambda}}{B_{\lambda}}\Big{)}=\bigcap_{\lambda\in{\Lambda}}{f^{-1}(B_{\lambda})}}.

PROOF:

COROLLARY1: Let  X and  Y be two sets,  f:X\to{Y},  A,B\subset{X} and  C,D\subset{Y}. Then,

a)  f(A\cup{B})=f(A)\cup{f(B)},

b)  f(A\cap{B})\subset{f(A)\cap{f(B)}},

c)  f^{-1}(C\cup{D})=f^{-1}(C)\cup{f^{-1}(D)},

d)  f^{-1}(C\cap{D})=f^{-1}(C)\cap{f^{-1}(D)}.

The property "b" in the proposition3 and its corollary attracts our attention. Although there are the equalities in the properties "a", "c" and "d", we can only say that  f(A\cap{B}) is a subset of  f(A)\cap{f(B)}. It is interesting. Since  f(A\cap{B}) is a subset of  f(A)\cap{f(B)}, it may be equal. According to proposition1, there are two probabilities:  f(A\cap{B})\subsetneqq{f(A)\cap{f(B)}} and  f(A\cap{B})=f(A)\cap{f(B)}. The identity function of a set is an example for the second probability. Is there any example for the first probability? The following example is the answer of this question:

EXAMPLE12: Choose  X=\{1,2\},  Y=\{a\},  A=\{1\},  B=\{2\} and define  f:X\to{Y} as  f(1)=f(2)=a. It is clear that  f is a function. Since  A\cap{B}=\varnothing, then  f(A\cap{B})=\varnothing. On the other hand, since  f(A)=f(B)=\{a\}, then  f(A)\cap{f(B)}=\{a\}. As is seen,  f(A\cap{B})\subsetneqq{f(A)\cap{f(B)}}.

There are many examples for the two probabilities. Is there any criterion determining whether the left side is equal to the right side or not? The following proposition is the answer this question:

PROPOSITION4: Let  f:X\to{Y}. Then,

 \forall{A,B}\subset{X}, f(A\cap{B})=f(A)\cap{f(B)}\Leftrightarrow{f} is injective.

PROOF:

PROPOSITION5: Let  f:X\to{Y}. Then,

a)  \forall{A}\subset{X}, A\subset{f^{-1}(f(A))},

b)  \forall{B}\subset{Y}, f(f^{-1}(B))\subset{B}.

PROOF:

PROPOSITION6: Let  f:X\to{Y}. Then,

a)  f is injective  \iff  \forall{A}\subset{X}, f^{-1}(f(A))=A,

b)  f is surjective  \iff  \forall{B}\subset{Y}, f(f^{-1}(B))=B,

c)  f is bijective  \iff  \forall{A}\subset{X}, f(A^{C})=f(A)^{C}.

PROOF:

DEFINITION7: Let  f:X\to Y and  g:Y\to Z. The function  g\circ f:X\to Z defined as  \forall x\in X,\left( g\circ f \right)\left( x \right)=g\left( f\left( x \right) \right) is called the composition of the functions  f and  g. (Note that the codomain of  f is equal to the domain of  g)

EXAMPLE13: Choose  X=Y=Z=\mathbb{R},  f\left( x \right)=\sin x and  g\left( x \right)={{e}^{x}}. Then,  \left( g\circ f \right)\left( x \right)=g\left( f\left( x \right) \right)=g\left( \sin x \right)={{e}^{\sin x}}.

Let  f and  g be two functions with suitably chosen domains and codomains. Is  g\circ{f} equal to  f\circ{g}? We will answer this question by the help of an example:

EXAMPLE14: Choose  X=Y=Z=\mathbb{R},  f\left( x \right)={{x}^{2}} and  g\left( x \right)=x+1. Since

 \left( g\circ f \right)\left( x \right)=g\left( f\left( x \right) \right)=g\left( {{x}^{2}} \right)={{x}^{2}}+1

and

 \left( f\circ g \right)\left( x \right)=f\left( g\left( x \right) \right)=f\left( x+1 \right)={{\left( x+1 \right)}^{2}},

then  g\circ f\ne f\circ g. We have just obtained an example about  g\circ f\ne f\circ g. Is the proposition  g\circ f\ne f\circ g always true? The answer of this question is "no". For example, if we choose  f\left( x \right)=2x and  g\left( x \right)=3x, then

 \left( g\circ f \right)\left( x \right)=g\left( f\left( x \right) \right)=g\left( 2x \right)=3\left( 2x \right)=6x

and

 \left( f\circ g \right)\left( x \right)=f\left( g\left( x \right) \right)=f\left( 3x \right)=2\left( 3x \right)=6x.

I.e., When we choose  f\left( x \right)=2x and  g\left( x \right)=3x, it holds  g\circ f=f\circ g. Consequently, if  f and  g are two functions with suitably chosen domains and codomains, then there are two probabilities:  g\circ f=f\circ g and  g\circ f\ne f\circ g.

PROPOSITION7: Let  f:X\to{Y}. Then,  f\circ {{I}_{X}}=f and  {{I}_{Y}}\circ f=f.

PROOF:

PROPOSITION8: Let  f:X\to Y,  g:Y\to Z and  h:Z\to T. Then,  h\circ \left( g\circ f \right)=\left( h\circ g \right)\circ f.

PROOF:

PROPOSITION9: Let  f:X\to Y and  g:Y\to Z. Then,

a) If  f and  g are injective, then  g\circ f is also injective.

b) If  f and  g are surjective, then  g\circ f is also surjective.

c) If  g\circ f is injective, then  f is also injective.

d) If  g\circ f is surjective, then  g is also surjective.

PROOF:

DEFINITION8: Let  f:X\to Y.

i) If there exists at least one function  R:Y\to X such that  f\circ R={{I}_{Y}}, then the function  R is called a right inverse of  f.

ii) If there exists at least one function  L:Y\to X such that  L\circ f={{I}_{X}}, then the function  L is called a left inverse of  f.

The definitions (i) and (ii) can be given by the follows:

i*) If there exists at least one function  R:Y\to X such that  \forall y\in Y,\left( f\circ R \right)\left( y \right)=y, then the function  R is called a right inverse of  f.

ii*) If there exists at least one function  L:Y\to X such that  \forall x\in X,\left( L\circ f \right)\left( x \right)=x, then the function  L is called a left inverse of  f.

PROPOSITION10: Let  f:X\to{Y}. Then,

a) There exists at least one right inverse of  f  \Leftrightarrow  f is surjective.

b) There exists at least one left inverse of  f  \Leftrightarrow  f is injective.

PROOF:

EXAMPLE15: Choose  f:\mathbb{R}\to \mathbb{R} by  f\left( x \right)={{e}^{x}}. If we define  L:\mathbb{R}\to{\mathbb{R}} as

 L(y)=\left\{ \begin{array}{cl} \ln{y}, & \text{if }y>0\\ 0, & \text{if }y\le{0} \end{array} \right.

then it holds  \left( L\circ f \right)\left( x \right)=L\left( f\left( x \right) \right)=L\left( {{e}^{x}} \right)=\ln {{e}^{x}}=x \ln{e}=x because  \forall x\in \mathbb{R},  {{e}^{x}}>0. So,  f has a left inverse.

Since the function  f given in example15 is injective, then it has a left inverse. However, according to proposition10, it has no a right inverse because it is not surjective. Example15 shows that a function can have a left inverse although it has no a right inverse.

EXAMPLE16: Choose  f:\mathbb{R} \to [0,+\infty) by  f\left( x \right)={{x}^{2}}. Since it is surjective, then it has a right inverse. Define  R:[0,+\infty)\to \mathbb{R} as  R\left( y \right)=\sqrt{y}. Since  \forall y\in [0,+\infty),  \left( f\circ R \right)\left( y \right)=f\left( R\left( y \right) \right)=f\left( \sqrt{y} \right)={{\left( \sqrt{y} \right)}^{2}}=|y|=y, then  R is a right inverse of  f. According to proposition10,  f has no a left inverse because it is not injective.

PROPOSITION11: Let  f:X\to{Y},  {{f}_{1}},{{f}_{2}}:T\to X and  {{g}_{1}},{{g}_{2}}:Y\to Z. Then,

a) If  f is injective and  f\circ {{f}_{1}}=f\circ {{f}_{2}}, then  {{f}_{1}}={{f}_{2}} (an injective function has the left cancellation property)

b) If  f is surjective and  {{g}_{1}}\circ f={{g}_{2}}\circ f, then  {{g}_{1}}={{g}_{2}} (a surjective function has the right cancellation property)

PROOF:

Now, let's introduce the inverse function:

Let  f:X\to{Y}. Assume that  L and  R are left and right inverses of  f, respectively. Then,

 L=L\circ {{I}_{Y}}=L\circ \left( f\circ R \right)=\left( L\circ f \right)\circ R={{I}_{X}}\circ R=R. I.e., if a function has both left and right inverses, then these are equal to each other. A function being both left inverse and right inverse of  f is called an inverse of  f. Now, let's give the definition of "inverse", more properly:

DEFINITION9: Let  f:X\to{Y}. If there exists a function  g such as  g\circ f={{I}_{X}} and  f\circ g={{I}_{Y}}, then the function  g is called an inverse of  f. Besides,  f is called invertible.

PROPOSITION12: Let  f:X\to{Y}. Then,  f has an inverse if and only if  f is bijective.

PROOF: The proof of this proposition can be directly obtained from Proposition10.

EXAMPLE17: If we choose  f:\mathbb{R}\to {{\mathbb{R}}^{+}} by  f\left( x \right)={{e}^{x}}, then the function  g:{{\mathbb{R}}^{+}}\to \mathbb{R} defined by  g\left( y \right)=\ln y is an inverse of  f because

 \forall x\in \mathbb{R},\left( g\circ f \right)\left( x \right)=g\left( f\left( x \right) \right)=g\left( {{e}^{x}} \right)=\ln {{e}^{x}}=x

and

 \forall y\in {{\mathbb{R}}^{+}},\left( f\circ g \right)\left( y \right)=f\left( g\left( y \right) \right)=f\left( \ln y \right)={{e}^{\ln y}}=y.

EXAMPLE18: If we choose  f:[0,+\infty)\to [0,+\infty) by  f\left( x \right)={{x}^{2}}, then the function  g:[0,+\infty)\to [0,+\infty) defined by  g\left( y \right)=\sqrt{y} is an inverse of  f because

 \forall x\in [0,+\infty),\left( g\circ f \right)\left( x \right)=g\left( f\left( x \right) \right)=g\left( {{x}^{2}} \right)=\sqrt{{{x}^{2}}}=\left| x \right|=x

and

 \forall y\in [0,+\infty),\left( f\circ g \right)\left( y \right)=f\left( g\left( y \right) \right)=f\left( \sqrt{y} \right)={{\left( \sqrt{y} \right)}^{2}}=y.

EXAMPLE19: If we choose  \displaystyle{f:\left( -\frac{\pi }{2},\frac{\pi }{2} \right)\to \mathbb{R}} by  f\left( x \right)=\tan x then the function  \displaystyle{g:\mathbb{R}\to \left( -\frac{\pi }{2},\frac{\pi }{2} \right)} defined by  g\left( y \right)=\arctan y is an inverse of  f because

 \displaystyle{\forall x\in \left( -\frac{\pi }{2},\frac{\pi }{2} \right),\left( g\circ f \right)\left( x \right)=g\left( f\left( x \right) \right)=g\left( \tan x \right)=\arctan \left( \tan x \right)=x}

and

 \forall y\in \mathbb{R},\left( f\circ g \right)\left( y \right)=f\left( g\left( y \right) \right)=f\left( \arctan y \right)=\tan \left( \arctan y \right)=y.

Let the functions  {{g}_{1}},{{g}_{2}}:Y\to X be two inverses of the function  f:X\to Y. Then  {{g}_{1}} is a left inverse of  f and  {{g}_{2}} is a right inverse of  f. We have shown that a left inverse and a right inverse of a function are equal to each other. So,  {{g}_{1}}={{g}_{2}}. Consequently, If there exists an inverse of a function, then it is unique. This unique inverse is denoted by  f^{-1}.

PROPOSITION13: Let  f:X\to Y,  g:Y\to Z. Then,

a) If  f is invertible, then  {{f}^{-1}} is also invertible and  {{\left( {{f}^{-1}} \right)}^{-1}}=f. Besides,  {{f}^{-1}} is bijective.

b) If  f and  g are invertible, then  g\circ f is invertible and  {{\left( g\circ f \right)}^{-1}}={{f}^{-1}}\circ {{g}^{-1}}.

PROOF:

THEOREM1: Let  X be a non-empty set and  G=\{f\;|\;f:X\to{X}\:\:\text{is bijective}\}. Then  (G,\circ) is a group with the identity element  I_{X}.  G is commutative if and only if  \left| X \right|\le 2.

PROOF:

DEFINITION10: Let  X be a non-empty set and  f:X\to{X}. Then we can define as,

 {{f}^{0}}={{I}_{X}},  {{f}^{1}}=f,  {{f}^{2}}=f\circ f and

 {{f}^{n}}=\underbrace{f\circ f\circ \cdots \circ f}_{n \text{ times}}.

Where  n is a natural number.

Leave a Reply

Your email address will not be published. Required fields are marked *