Skip to content

8.15 Function

1.Composition

Consider \(f:A\rightarrow B,g:B\rightarrow C\)

We may construct the function \(g\circ f:A\rightarrow C\) (the compostion of \(g\) with \(f\))(We read: g composes f)

\[ (g\circ f)(a)=g(f(a)) \]

image

Examples

If, \(f(x)=x^{3},g(x)=1+x,x\in \mathbb{R}\)

then, \((f\circ g)(x)=f(g(x))=f(1+x)=(1+x)^{3}\)

Also, \((f\circ g)(x)=f(g(x))=g(x)^{3}=(1+x)^{3}\)

In the reverse order, \((g\circ f)(x)=g(f(x))=1+f(x)=1+x^{3}\)

\((g\circ f)(x)=g(f(x))=g(x^3)=1+x^3\)

In general

\[ f\circ g\neq g\circ f \]

Exercise

If, \(f(x)=\frac{1}{1-x},g(x)=(x-3)^{2}\). \(Dom(f)=\mathbb{R} \setminus \{1\},Dom(g)=\mathbb{R}\)

Then, \(f\circ g=f(g(x))=f((x-3)^{2})=\frac{1}{1-(x-3)^{2}}=\frac{1}{-x^{2}+6x-8}\)

Hence, \((x-3)^{2}\neq1,\quad x\neq2,4\)

So, \(Dom(f\circ g)=R\setminus \{2,4\}\)

Therefore

\[ Dom(f\circ g)=R\setminus \{x\in R,g(x)\notin Dom(f)\} \]

Similarly

\[ Dom(g\circ f)=R\setminus \{x\in R,f(x)\notin Dom(g)\} \]

2.Definition: \(f:A\rightarrow B\) a function

Easy explanation:

image

  1. Injective

    We say that \(f\) is INJECTIVE, \(if~f(a_{1})=f(a_{2})\Rightarrow a_{1}=a_{2}\), (\(f\) is not repeating values)

    v2: \(if~ a_{1}\neq a_{2}\Rightarrow f(a_{1})\neq f(a_{2})\)

    一个函数值对应唯一一个自变量

    Geometric interpretation in the case \(f:\mathbb{R}\rightarrow \mathbb{R}\)

    imageimage

  2. Surjective

    \(\forall b\in B,\exists a\in A,f(a)=b\) A中可以有剩的

    image

    每个函数值都对应一些自变量

    Geometric interpretation in the case \(f:\mathbb{R}\rightarrow \mathbb{R}\)

    imageimage

    \[ Im(f)=Codom(f) \]

3.Invertible functions

Let \(f:A\rightarrow B\) be a function, we say that \(f\) is INVERTIBLE ,

If there exists a function \(g:B\rightarrow A\) such that \((g(f(a))=a)\cap (f(g(b))=b)\) (\(\forall a\in A,\forall b\in B\))

We call in this case \(g=f^{-1}\), \(f^{-1}\) is the inverse function of \(f\)

v2:!!!! \(g\circ f=id_x,~and~f\circ g=id_y\)

Example

To find the inverse: \(f:\mathbb{R}\to\mathbb{R},f(x)=3x+1\)

\(\begin{aligned} & y=f(x)=3x+1\\ & y-1=3x\\ & x=\frac{y-1}{3}\\ & f^{-1}(y)=\frac{y-1}{3}\\ & f^{-1}\left(f(x_{})\right)=f^{-1}(3x+1)=\frac{3x+1-1}{3}=x\\ & f(f^{-1}\left(y\right))=f(\frac{y-1}{3})=3\cdot\frac{y-1}{3}+1=y\end{aligned}\)

Another example

To find the inverse: \(f:\mathbb{R}\rightarrow \mathbb{R}, f(x)=x^{2}\)

Now, try to solve \(y=x^{2}~for~y\in\mathbb{R}\)

If \(y<0\Rightarrow\nexists x\in \mathbb{R}~|~y=x^{2}\)

If \(y>0\), the \(y=x^{2}\) has two solutions.

image

4.Discussion: Injectivity, surjectivity and inverse functions

  1. Define \(g:B\rightarrow A\) , \(f\) is injective, not surjective

\(g(b)=\begin{cases}a,&\mathrm{if~f(a)= b~(There~is~only~one~a)}\\any~a\in A,&\mathrm{if~b\notin Im(f)}\end{cases}\)

image

\(a\in A,g(f(a))=g(b)=a\), (left inverse of \(f\))

But \(f(g(b))=\begin{cases}b\in Im(f),&\mathrm{f(g(f(a)))=f(a)=b}\\b\notin Im(f),&\mathrm{f(g(b))=f(a)\neq b}\end{cases}\)

  1. Define \(g:B\rightarrow A\), \(g(b)=a\in A\) \(\text{(any such that f(a)=b)}\)

    \(f\) is surjective, but not injective

    image

    Checking inverse function properties

    a) \(b\in B,f(g(b))=f(a)=b\). ok! (right inverse)

    b) \(a\in A,g(f(a))=g(b)=a^{\prime}\neq a\)

    ~\(\forall b\in B,\exists a\in A~|~f(a)=b\)

    ~\(\exists a\neq a^{\prime}~|~f(a)=f(a^{\prime})\)

Remark

The essence of left inverse is that if there exists an element \(x\) in the left, then \(x\) maps to the right and becomes \(y\) by \(f\)

And then \(y\) can still go back to the left become \(x\) by \(g\).

This is called left inverse. The process of go and back will not go wrong or go to another element or be out of the domain or image

Similarly, Right inverse.

5.Bijective

if \(f\) is injective and surjective, \(f:A\rightarrow B\) is BIJECTIVE

Namely: \(f\) does not repeat values and covers the codomain (one to one correspondences)

image

6.Some remarks

Suppose: \(f:A\rightarrow B\) is injective but not surjective

Example 1

$f:\mathbb{R} \rightarrow \mathbb{R}, f(x)=e^{x},e^x\in(0,+\infty) $

image

If we restrict the codomain, we have an inverse \(f:\mathbb{R}\rightarrow \mathbb{R}_{>0},f(x)=e^{x}\), \(f\) is bijective

For every \(y\in(0,+\infty)\), there is \(x\in\mathbb{R}|e^{x}=y, x=\ln(y)\)

In general, for a function \(f:A\rightarrow B\), that is injective.

We have that \(f:A\rightarrow Im(f)\subset B\) is bijective

image

\[ \exists g:Im(f)\rightarrow A~|~g=f^{-1} \]

Example 2

\(f=\mathbb{R}\rightarrow \mathbb{R},~f(x)=x^{2}\)

Now \(f(x)=x^{2}\) is surjective from \(\mathbb{R}>\mathbb{R}_{\geq0}\)

We still have the problem of injectivity, we can restrict domain

\(f:\mathbb{R}_{\geq0}\rightarrow \mathbb{R}_{\geq0},~f(x)=x^{2}\)

\(y=x^2,~y\geq0\\x=\sqrt y,~x\geq0\\f^{-1}(y)=\sqrt y,~f^{-1}:\mathbb{R}_{\geq0}\rightarrow \mathbb{R}_{\geq0}\)

if \(f\) is constant we should restrict only one point.

7.More definitions

  • \(f:X\rightarrow Y\) a function \(A\subseteq X\) . We define the image of \(A\) under of \(f\): \(f(A)=\{y\in Y/\exists x\in A: f(x)=y\}\subseteq Y\)
  • \(B\subseteq Y\) The Pre-image of B under \(f\): \(f^{-1}(B)=\{x\in X,f(x)\in B\}\subseteq X\)

\(\begin{aligned}A & =\{x_1,x_2\},f(x)=\{y_1\}\\ B & =\{y_1,y_2,y_5\},f^{-1}(B)=\{x_1,x_2,x_4\}\\ C & =\{y_2,y_3\},f^{-1}(C)=\emptyset\end{aligned}\)

image

8.Functions and set operations

\(f:X\rightarrow Y\), A. B. subsets of \(X\). Prove that

\[ f(A\cap B)\subseteq (f(A)\cap f(B)) \]

Let \(y\in f(A\cap B)\), we need to prove that \(y\in f(A)\cap f(B)\)

Since \(y\in f(A\cap B)\), there is \(x\in A\cap B/f(x)= y\). Then \(y\in f(A),y\in f(B)\Rightarrow y\in f(A)\cap f(B)\)

Sometimes

\(f(A\cap B)\subsetneq f(A)\cap f(B)\)

\(f=\mathbb{R}\rightarrow \mathbb{R},~f(x)=x^{2}\)

\(A=[-1,0],~B=[0,1],~A\cap B=\{0\}\)

Then, Warn‼️: the image of a function should be a set

\(\begin{aligned}&f(A\cap B)=f(\{0\})=\{f(0)\}=\{0\}\\&f(A)=\{ y\in\mathbb{R},y=f(x)~with~ x\in[-2,0]\}=[0,1]\\&f(B)=[0,1]\\&f(A)\cap f(B)=[0,1]\\&\{0\}\subsetneq[0,1]\end{aligned}\)

Exercise=9=

Prove:

\(\bullet\ f~injective\Rightarrow f(A\cap B)=f(A)\cap f(B)\) (没有任意符号因为f出现意味着已经出现了定义域)

\(\bullet\forall A,\forall B,f(A\cap B)=f(A)\cap f(B)\Rightarrow f~injective\)

Strategy: Start from definition

  • Suppose \(f\) is injective, let's prove that \(f(A\cap B)\supseteq f(A)\cap f(B)\)

Analyse:

\(f\) is injective told us: we need to integrate the form like \(f(x_1)=f(x_2),~x_1=x_2\) into the proof.

\(f(A\cap B)\supseteq f(A)\cap f(B)\) told us: we need to pick specific element like x instead of set A.

Let pick \(x_{1}\in A/f(x_{1})=y~~~and~~~x_{2}\in B/f(x_{2})=y\), thus \(y\in f(A)\cap f(B)\)

So, \(f(x_{1})=y=f(x_{2})\). Then Since \(x_{1}=x_{2}\),

Hence \(~x_{1}\in A,~x_{2}=x_{1}\in A\\x_{2}\in B,~x_{1}=x_{2}\in B\)

Let's put $x=x_1=x_2,~x\in(A\cap B) $

Therefore, \(y=f(x)\in f(A\cap B)\)

  • Suppose \(f(A\cap B)= f(A)\cap f(B)\), we need to prove \(f\) is injective.

Namely, If \(f(x_{1})=f(x_{2})\Rightarrow x_{1}=x_{2}\), We know that \(f(x_{1})=f(x_{2})= y\in Y\)

Put \(A=\{x_{1}\},B=\{x_{2}\}\)

By hypothesis, \(f(A\cap B)=f(A)\cap f(B)=\{f(x_1)\}\cap\{f(x_2)\}=\{y\}\neq e\), and \(f(A\cap B)=f(A)\cap f(B)=f(\{x_{1}\}\cap\{x_{2}\})\Rightarrow x_{1}=x_{2}\)