Discrete math question about surjective, injective function and domain, range

165 Views Asked by At

I'm a first year computer science student and I'm learning discrete math by myself (teacher unavailable) due to the quarantine and I dont understand these two little questions :

1) Lets say we have a function $f : X \to Y$ that has an inverse function. How do I find the function $I$($x$) = $f^{-1}(f(x))$ and how can I find the domain and range of $I(x)$ ? This one is very confusing and I love an good explanation for it.

2) Prove that if $f$ and $g$ are both surjective, then $g \circ f$ is surjective. I think that I have to prove that its image is equal to its codomain, but I have no idea how to do this.

Thanks. Your help is very appreciated.

2

There are 2 best solutions below

0
On

To answer your question:

1) Saying that $f: X \to Y$ has an inverse is equivalent to saying that $f$ is bijective, otherwise $f^{-1}: Y \to X$ couldn’t be defined. Furthermore, composing the two always gives the Identity function, whether $X \to X$ or $Y \to Y$ depends on the order of composition (which one is it, in your example?). Not sure if this elucidates you or not :)

2) To prove stuff like this it is always a good idea to work with a specific element of your set and prove the inclusions in question. So, looking back at the definition: $f: X \to Y$ is surjective iff $\forall y \in Y, \exists x \in X$ such that $f(x)=y$ (which is the same thing you said). Now, pick a $z$ in the domain of $g\circ f$ and try to prove its pre image $x$ exists.

0
On

That is not always easy to find the inverse function when you have general sets $X$ and $Y$.

However, if $X$ and $Y$ are subsets of $\mathbb R$, for instance, you can find $f^{-1}$ with the following idea: Solve the equation $f(y)=x$ for $y$, then $y$ will give you the formula for the inverse.

For instance, consider the function $f: (0, 1)\longrightarrow \mathbb R$ given by $$f(x)= \frac{x}{1+x}.$$ Then $f$ is bijective. Let us find $f^{-1}$. Well:

$$f(y)=x\Leftrightarrow \frac{y}{1+y}=x\Leftrightarrow y= x(1+y)\Leftrightarrow y-xy=x\Leftrightarrow y(1-x)=x\Leftrightarrow y= \frac{x}{1-x}.$$ The inverse will be given by $$f^{-1}(x)=\frac{x}{1-x}.$$ Let us check how this works:

$$f(f^{-1}(x))= \frac{f^{-1}(x)}{1+f^{-1}(x)}=\frac{x/(1-x)}{1+(x/(1-x)}=\frac{x/(1-x)}{(1-x+x)/(1-x)}= \frac{x/(1-x)}{1/(1-x)}=x.$$ On the other hand:

$$f^{-1}(f(x))= \frac{f(x)}{1-f(x)}=\frac{x/(1+x)}{1-(x/(1+x))}=\frac{x/(1+x)}{(1+x-x)/(1+x)}=\frac{x/(1+x)}{1/(1+x)}=x.$$

In general, if $f:X\longrightarrow Y$ is bijective then $f^{-1}$ will have $Y$ as domain, and $X$ as image.

Finally, if $f: X\longrightarrow Y$ and $g: Y\longrightarrow Z$ are surjective then $g\circ f: X\longrightarrow Z$ is surjective. In fact, given $z\in Z$ there exists $y\in Y$ such that $g(y)=z$ since $g$ is surjective. Once $f$ is surjective, there exists $x\in X$ such that $f(x)=y$. Hence, the element $x\in X$ is such that $$(g\circ f)(x)=g(f(x))=g(y)=z,$$ that is, every element of $Z$ is in the imagem of $g\circ f$, this show $Z\subset \textrm{Im}(g\circ f)$. Since, $\textrm{Im}(g\circ f)$ is always a subset of $Z$, it follows $Z=\textrm{Im}(g\circ f)$, therefore $g\circ f$ is surjective.